// Numbas version: exam_results_page_options {"name": "Differentiation: Anti-differentiation of constant function, graphically.", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {"plot": {"definition": "// This function creates the board and sets it up, then returns an\n// HTML div tag containing the board.\n\n//Put in your values of x here\n\nvar x_min = -4;\nvar x_max = 4;\nvar y_min = -6;\nvar y_max = 6;\n\n\n// First, make the JSXGraph board.\n// The function provided by the JSXGraph extension wraps the board up in \n// a div tag so that it's easier to embed in the page.\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',\n//{boundingBox: [-8,10,8,-10],\n {boundingBox: [x_min,y_max,x_max,y_min], \n axis: false,\n showNavigation: false,\n grid: true\n});\n\n\n\n\n// div.board is the object created by JSXGraph, which you use to \n// manipulate elements\nvar board = div.board; \n\n// create the x-axis.\nvar xaxis = board.create('line',[[0,0],[1,0]], { strokeColor: 'black', fixed: true});\nvar xticks = board.create('ticks',[xaxis,1],{\n drawLabels: true,\n label: {offset: [-4, -10]},\n minorTicks: 0\n});\n\n// create the y-axis\nvar yaxis = board.create('line',[[0,0],[0,1]], { strokeColor: 'black', fixed: true });\nvar yticks = board.create('ticks',[yaxis,1],{\ndrawLabels: true,\nlabel: {offset: [-20, 0]},\nminorTicks: 0\n});\n\n\n // PUT YOUR FUNCTION HERE\n\nm3 = m+Math.floor(Math.random()*2)*2-1; //Same as random(-1..1#2)\nm4 = m+Math.floor(Math.random()*2)*4-2; //Same as random(-2..2#4)\nm5 = m+Math.floor(Math.random()*2)*6-3; //Same as random(-3..3#6)\n\nc2 = Math.floor(Math.random()*6)-3; //Same as random(-3..2)\nc3 = Math.floor(Math.random()*6)-3; //Same as random(-3..2)\nc4 = Math.floor(Math.random()*6)-3; //Same as random(-3..2)\nc5 = Math.floor(Math.random()*6)-3; //Same as random(-3..2)\n\nif(n==1)\n board.create('functiongraph',[function(x){ return m;},x_min,x_max]);\nelse if (n==2)\n board.create('functiongraph',[function(x){ return m*x+c2;},x_min,x_max]);\nelse if (n==3)\n board.create('functiongraph',[function(x){ return m3*x+c3;},x_min,x_max]);\nelse if (n==4)\n board.create('functiongraph',[function(x){ return m4*x+c4;},x_min,x_max]);\nelse if (n==5)\n board.create('functiongraph',[function(x){ return m5*x+c5;},x_min,x_max]);\n\nreturn div;", "type": "html", "parameters": [["n", "number"], ["m", "number"], ["c", "number"]], "language": "javascript"}}, "tags": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

A constant function is drawn and is labelled f'. Student is asked to select the graph which could be f.

"}, "rulesets": {}, "preamble": {"css": "", "js": ""}, "extensions": ["jsxgraph"], "advice": "

Different possible pieces of advice. I do not know which is most helpful, so I've given several thoughts. Let me know which you find helpful!

\n

1) This is the `backwards' process of the previous questions - you're given $f'$ and need to determine $f$.

\n

2) This is equivalent to being asked: \"A velocity-time graph is given, which graph could be its displacement-time graph\". 

\n

3) $f'$ tells us the gradient of $f$.  Therefore, you should select the graph whose gradient matches the value given by $f'$.

\n

4) For each of the four options, work out what its derivative looks like. One of these will match the $f'$ provided in the question.

", "ungrouped_variables": ["m", "c"], "variable_groups": [], "statement": "", "name": "Differentiation: Anti-differentiation of constant function, graphically.", "parts": [{"extendBaseMarkingAlgorithm": true, "prompt": "

Here is the graph of $f'$.

\n

{plot(1,{m},{c})}

\n

Which of the graphs below could be the graph of $f$?

\n

              

", "displayColumns": 0, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "shuffleChoices": true, "type": "1_n_2", "distractors": ["", "", "", ""], "displayType": "radiogroup", "marks": 0, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "variableReplacements": [], "matrix": ["2", "0", 0, 0], "unitTests": [], "choices": ["

{plot(2,{m},{c})}

", "

{plot(3,{m},{c})}

", "

{plot(4,{m},{c})}

", "

{plot(5,{m},{c})}

"], "maxMarks": "2", "scripts": {}, "minMarks": 0}], "variables": {"c": {"group": "Ungrouped variables", "definition": "random(-2..2#0.5)", "description": "", "name": "c", "templateType": "anything"}, "m": {"group": "Ungrouped variables", "definition": "random(-3..3 except 0)", "description": "", "name": "m", "templateType": "anything"}}, "type": "question", "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}]}]}], "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}]}