// Numbas version: exam_results_page_options {"name": "Differentiation: gradient positive or negative", "extensions": ["geogebra", "jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "metadata": {"description": "

A quartic graph is given. The question is to determine whether the gradient is positive or negative at various values of x. Non-calculator. Advice is given.

", "licence": "Creative Commons Attribution 4.0 International"}, "ungrouped_variables": ["a", "r1", "r2", "r3", "r4", "grad1", "grad2", "grad3", "grad4"], "functions": {"plotgraph": {"language": "javascript", "parameters": [["a", "number"], ["r1", "number"], ["r2", "number"], ["r3", "number"], ["r4", "number"]], "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"}}, "extensions": ["geogebra", "jsxgraph"], "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question", "statement": "

When is the gradient positive and when is it negative?

", "preamble": {"js": "", "css": ""}, "tags": [], "parts": [{"customMarkingAlgorithm": "", "scripts": {}, "prompt": "

{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]]

", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "showFeedbackIcon": true, "marks": 0, "unitTests": [], "gaps": [{"customMarkingAlgorithm": "", "scripts": {}, "answer": "{grad2}", "matchMode": "regex", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "patternmatch", "showFeedbackIcon": true, "marks": "1", "unitTests": [], "displayAnswer": "{grad2}", "variableReplacements": []}, {"customMarkingAlgorithm": "", "scripts": {}, "answer": "{grad4}", "matchMode": "regex", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "patternmatch", "showFeedbackIcon": true, "marks": "1", "unitTests": [], "displayAnswer": "{grad4}", "variableReplacements": []}, {"customMarkingAlgorithm": "", "scripts": {}, "answer": "{grad3}", "matchMode": "regex", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "patternmatch", "showFeedbackIcon": true, "marks": "1", "unitTests": [], "displayAnswer": "{grad3}", "variableReplacements": []}, {"customMarkingAlgorithm": "", "scripts": {}, "answer": "{grad2}", "matchMode": "regex", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "patternmatch", "showFeedbackIcon": true, "marks": "1", "unitTests": [], "displayAnswer": "{grad2}", "variableReplacements": []}, {"customMarkingAlgorithm": "", "scripts": {}, "answer": "{grad1}", "matchMode": "regex", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "patternmatch", "showFeedbackIcon": true, "marks": "1", "unitTests": [], "displayAnswer": "{grad1}", "variableReplacements": []}], "variableReplacements": []}], "rulesets": {}, "variables": {"r2": {"templateType": "anything", "definition": "r1-random(2..3)", "description": "", "group": "Ungrouped variables", "name": "r2"}, "grad3": {"templateType": "anything", "definition": "if(a<0, 'Negative', 'Positive')", "description": "", "group": "Ungrouped variables", "name": "grad3"}, "r1": {"templateType": "anything", "definition": "random(3..5)", "description": "", "group": "Ungrouped variables", "name": "r1"}, "a": {"templateType": "anything", "definition": "random(-1..1 except 0)/10", "description": "

y-intercept of the line

", "group": "Ungrouped variables", "name": "a"}, "r3": {"templateType": "anything", "definition": "r2-random(2..3)", "description": "", "group": "Ungrouped variables", "name": "r3"}, "r4": {"templateType": "anything", "definition": "r3-random(2..3)", "description": "", "group": "Ungrouped variables", "name": "r4"}, "grad4": {"templateType": "anything", "definition": "if(a>0, 'Negative', 'Positive')", "description": "", "group": "Ungrouped variables", "name": "grad4"}, "grad1": {"templateType": "anything", "definition": "if(a<0, 'Negative', 'Positive')", "description": "", "group": "Ungrouped variables", "name": "grad1"}, "grad2": {"templateType": "anything", "definition": "if(a>0, 'Negative', 'Positive')", "description": "", "group": "Ungrouped variables", "name": "grad2"}}, "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).

", "name": "Differentiation: gradient positive or negative", "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}