// Numbas version: exam_results_page_options {"name": "Differentiation: Derivative of a graph. III", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Differentiation: Derivative of a graph. III", "variable_groups": [], "metadata": {"description": "

A graph is drawn. A student is to identify the derivative of this graph from four other graphs. There are four version of this question: I: cubic, II: linear, III: quadratic, IV: sinusoisal.

", "licence": "Creative Commons Attribution 4.0 International"}, "ungrouped_variables": ["root1", "root2", "a"], "functions": {"plot": {"language": "javascript", "parameters": [["n", "number"], ["r1", "number"], ["r2", "number"], ["a", "number"]], "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: false,\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: false,\nlabel: {offset: [-20, 0]},\nminorTicks: 0\n});\n\n\n // PUT YOUR FUNCTION HERE\n\n\nif(n==1)\n board.create('functiongraph',[function(x){ return a*(x+r1)*(x+r2);},x_min,x_max]);\nelse if (n==2)\n board.create('functiongraph',[function(x){ return a*(2*x+r1+r2);},x_min,x_max]);\nelse if (n==3)\n board.create('functiongraph',[function(x){ return -a*(2*x+r1+r2);},x_min,x_max]);\nelse if (n==4)\n board.create('functiongraph',[function(x){ return a*(2*(x-1)+r1+r2);},x_min,x_max]);\nelse if (n==5)\n board.create('functiongraph',[function(x){ return -a*(2*(x-1)+r1+r2);},x_min,x_max]);\n\nreturn div;", "type": "html"}}, "extensions": ["jsxgraph"], "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question", "statement": "", "preamble": {"js": "", "css": ""}, "tags": [], "parts": [{"customMarkingAlgorithm": "", "choices": ["

{plot(2,{root1},{root2},{a})}

", "

{plot(3,{root1},{root2},{a})}

", "

{plot(4,{root1},{root2},{a})}

", "

{plot(5,{root1},{root2},{a})}

"], "maxMarks": "2", "scripts": {}, "prompt": "

{plot(1,{root1},{root2},{a})}

\n

Select the graph that shows the derivative of of the graph above.

\n

", "displayType": "radiogroup", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "shuffleChoices": true, "showFeedbackIcon": true, "type": "1_n_2", "marks": 0, "displayColumns": 0, "matrix": ["2", "0", 0, 0], "unitTests": [], "distractors": ["", "", "", ""], "minMarks": 0, "variableReplacements": []}], "rulesets": {}, "advice": "