// Numbas version: exam_results_page_options {"name": "Praneetha's copy of Integration: Integral of a graph. Version III", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"marks": 0, "maxMarks": "2", "minMarks": 0, "displayType": "radiogroup", "distractors": ["", "", "", ""], "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "1_n_2", "customMarkingAlgorithm": "", "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "displayColumns": 0, "matrix": ["2", "0", 0, 0], "prompt": "

Here is a graph of $\\frac{\\text{d}f}{\\text{d}x}$.

\n

{plotpoly(1,{root1},{root2},{root3},{a})}

\n

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

\n

", "unitTests": [], "showFeedbackIcon": true, "shuffleChoices": true, "choices": ["

{plotpoly(2,{root1},{root2},{root3},{a})}

", "

{plotpoly(3,{root1},{root2},{root3},{a})}

", "

{plotpoly(4,{root1},{root2},{root3},{a})}

", "

{plotpoly(5,{root1},{root2},{root3},{a})}

"], "variableReplacements": []}], "statement": "", "tags": [], "ungrouped_variables": ["root1", "root2", "root3", "a"], "variablesTest": {"maxRuns": 100, "condition": ""}, "extensions": ["jsxgraph"], "advice": "", "name": "Praneetha's copy of Integration: Integral of a graph. Version III", "functions": {"plotpoly": {"parameters": [["n", "number"], ["r1", "number"], ["r2", "number"], ["r3", "number"], ["a", "number"]], "type": "html", "language": "javascript", "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 = -10;\nvar y_max = 10;\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\nb=(r1+r2+r3)/3;\nc=(r1*r2+r1*r3+r2*r3)/2;\nd=(r1*r2*r3);\n\ne2=Math.floor(Math.random()*4)-3;\ne3=Math.floor(Math.random()*4)-3;\ne4=Math.floor(Math.random()*4)-2;\ne5=Math.floor(Math.random()*4)-3;\n\nif(n==1)\n board.create('functiongraph',[function(x){ return a*(x+r1)*(x+r2)*(x+r3);},x_min,x_max]);\nelse if (n==2)\n board.create('functiongraph',[function(x){ return a*(x*x*x*x/4 + x*x*x*b + c*x*x + d*x)+e2;},x_min,x_max]);\nelse if (n==3)\n board.create('functiongraph',[function(x){ return -a*(x*x*x*x/4 + x*x*x*b + c*x*x + d*x)+e3;},x_min,x_max]);\nelse if (n==4)\n board.create('functiongraph',[function(x){ return a*(x*x*x*x/4 + x*x*x*(b-1) + c*x*x + d*x)+e4;},x_min,x_max]);\nelse if (n==5)\n board.create('functiongraph',[function(x){ return -a*(x*x*x*x/4 + x*x*x*b + (c-1)*x*x + d*x)+e5;},x_min,x_max]);\n\nreturn div;"}}, "preamble": {"css": "", "js": ""}, "variables": {"a": {"name": "a", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "random(1,-1)"}, "root2": {"name": "root2", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "root1 - random(1..2)"}, "root1": {"name": "root1", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "random(2..3)"}, "root3": {"name": "root3", "templateType": "anything", "description": "", "group": "Ungrouped variables", "definition": "root2-random(1..3)"}}, "metadata": {"description": "

A graph is drawn. A student is to identify the derivative of this graph from four other graphs.

\n

\n

Version II. Graph is horizontal

\n

Version III. Graph is cubic

\n

Version IV. Graph is sinusoidal

", "licence": "Creative Commons Attribution 4.0 International"}, "variable_groups": [], "rulesets": {}, "type": "question", "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Praneetha Singh", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2552/"}]}]}], "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Praneetha Singh", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2552/"}]}