{plotgraph(a,r1,r2,r3,r4)}

\n

Above is the graph of some function \$f\$.

\n

The answers to the following questoins are either 'Negative' or 'Positive'.

\n

When \$x=\\var{r2}\$, is the gradient negative or positive? [[0]]

\n

When \$x=\\var{r4}\$, is the gradient negative or positive? [[1]]

\n

When \$x=\\var{r3}\$, is the gradient negative or positive? [[2]]

\n

Is \$f'(\\var{r2})\$ negative or positive? [[3]]

\n

Is \$f'(\\var{r1})\$ negative or positive? [[4]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst"}], "name": "Gradient positive or negative.", "functions": {"plotgraph": {"definition": "// This functions plots a quartic graph\n// It creates the board, sets it up, then returns an\n// HTML div tag containing the board.\n\n\n// Max and min x and y values for the axis.\nvar x_min = -8;\nvar x_max = 8;\nvar y_min = -10;\nvar y_max = 10;\n\n\n// First, make the JSXGraph board.\nvar div = Numbas.extensions.jsxgraph.makeBoard(\n '500px',\n '600px',\n {\n boundingBox: [x_min,y_max,x_max,y_min],\n axis: false,\n showNavigation: true,\n grid: true\n }\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\n\n// Plot the function.\n board.create('functiongraph',\n [function(x){ return a*(x-r1)*(x-r2)*(x-r3)*(x-r4);},x_min,x_max]);\n\n\n\n\nreturn div;", "type": "html", "parameters": [["a", "number"], ["r1", "number"], ["r2", "number"], ["r3", "number"], ["r4", "number"]], "language": "javascript"}}, "variable_groups": [], "variablesTest": {"condition": "", "maxRuns": 100}, "extensions": ["jsxgraph", "geogebra"], "preamble": {"css": "", "js": ""}, "tags": [], "variables": {"r1": {"definition": "random(3..5)", "description": "", "name": "r1", "group": "Ungrouped variables", "templateType": "anything"}, "r2": {"definition": "r1-random(2..3)", "description": "", "name": "r2", "group": "Ungrouped variables", "templateType": "anything"}, "grad1": {"definition": "if(a<0, 'Negative', 'Positive')", "description": "", "name": "grad1", "group": "Ungrouped variables", "templateType": "anything"}, "grad2": {"definition": "if(a>0, 'Negative', 'Positive')", "description": "", "name": "grad2", "group": "Ungrouped variables", "templateType": "anything"}, "grad3": {"definition": "if(a<0, 'Negative', 'Positive')", "description": "", "name": "grad3", "group": "Ungrouped variables", "templateType": "anything"}, "a": {"definition": "random(-1..1 except 0)/10", "description": "

y-intercept of the line

", "name": "a", "group": "Ungrouped variables", "templateType": "anything"}, "grad4": {"definition": "if(a>0, 'Negative', 'Positive')", "description": "", "name": "grad4", "group": "Ungrouped variables", "templateType": "anything"}, "r4": {"definition": "r3-random(2..3)", "description": "", "name": "r4", "group": "Ungrouped variables", "templateType": "anything"}, "r3": {"definition": "r2-random(2..3)", "description": "", "name": "r3", "group": "Ungrouped variables", "templateType": "anything"}}, "advice": "

When the gradient is positive, the function is increasing or 'uphill'.  In more detail, the gradient is positive when moving from left to right causes the height to increase.

\n

When the gradient is negative, the function is decreasing or 'downhill'. In more detail, the gradient is negative when moving from left to right causes the height to decrease.

\n

The last two questions are asking the same thing as the first three, just phrased differently. This is because \$f'\$ is the gradient. So, for example,  (iv) is literally the same question as (i).