// Numbas version: exam_results_page_options {"name": "Johnny's Differentiation: Equation of tangent. Quadratic", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variablesTest": {"condition": "and(m<>0,(absfx<15))", "maxRuns": 100}, "metadata": {"description": "

A quadratic is and a graph of it is given. A tangent is also sketch. The equation of the tangent line is asked for.

", "licence": "Creative Commons Attribution 4.0 International"}, "rulesets": {}, "variables": {"x0": {"name": "x0", "description": "", "templateType": "anything", "definition": "-b/(2a)", "group": "part a"}, "fx0": {"name": "fx0", "description": "", "templateType": "anything", "definition": "a*x0*x0+b*x0+c", "group": "part a"}, "absfx": {"name": "absfx", "description": "", "templateType": "anything", "definition": "abs(fx)", "group": "part a"}, "x": {"name": "x", "description": "", "templateType": "anything", "definition": "random(-3..3 except 0)", "group": "part a"}, "b": {"name": "b", "description": "", "templateType": "anything", "definition": "random(-5..5 except 0)", "group": "part a"}, "m": {"name": "m", "description": "", "templateType": "anything", "definition": "2*a*x+b", "group": "part a"}, "fx": {"name": "fx", "description": "", "templateType": "anything", "definition": "a*x*x+b*x+c", "group": "part a"}, "a": {"name": "a", "description": "", "templateType": "anything", "definition": "random(-2..2 except 0)", "group": "part a"}, "c": {"name": "c", "description": "", "templateType": "anything", "definition": "random(-2..2 except 0)", "group": "part a"}}, "parts": [{"gaps": [{"checkingType": "absdiff", "vsetRangePoints": 5, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "checkVariableNames": false, "answer": "10", "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "vsetRange": [0, 1], "showPreview": true, "showFeedbackIcon": true, "failureRate": 1, "showCorrectAnswer": true, "scripts": {}, "unitTests": [], "variableReplacements": [], "customMarkingAlgorithm": "", "type": "jme", "marks": 1}, {"checkingType": "absdiff", "vsetRangePoints": 5, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "checkVariableNames": false, "answer": "14", "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "vsetRange": [0, 1], "showPreview": true, "showFeedbackIcon": true, "failureRate": 1, "showCorrectAnswer": true, "scripts": {}, "unitTests": [], "variableReplacements": [], "customMarkingAlgorithm": "", "type": "jme", "marks": 1}, {"checkingType": "absdiff", "vsetRangePoints": 5, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "checkVariableNames": false, "answer": "10x-6", "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "vsetRange": [0, 1], "showPreview": true, "showFeedbackIcon": true, "failureRate": 1, "showCorrectAnswer": true, "scripts": {}, "unitTests": [], "variableReplacements": [], "customMarkingAlgorithm": "", "type": "jme", "marks": 1}, {"tolerance": 0, "markPerCell": false, "numRows": 1, "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFractions": true, "allowFractions": true, "numColumns": "2", "showFeedbackIcon": true, "correctAnswer": "matrix([-1/2,3/2])", "showCorrectAnswer": true, "scripts": {}, "unitTests": [], "variableReplacements": [], "customMarkingAlgorithm": "", "allowResize": false, "type": "matrix", "marks": 1}], "extendBaseMarkingAlgorithm": true, "prompt": "

The curve with equation $y = \\simplify{{2}x^2+{2}x+{2}}$ is sketched below.

\n

{plot(2,2,2,2, 14)}

\n

In addition, the tangent to the curve at $x=2$ has been drawn.

\n

\n

(a) What is the gradient of the tagent at $x=2$? [[0]]

\n

(b) What is the $y$ coordinate at the point of contact between the tangent and the parabola? That is, what is the $y$ value when $x=2$? [[1]]

\n

\n

(c) What is the equation of the tangent? $y= $[[2]]

\n

\n

(d) $L$ is a horizontal straight line which is tangent to the curve. Determine the coordinates of where the line $L$ touches the curve. [[3]]

\n

\n

\n

\n

\n

", "variableReplacementStrategy": "originalfirst", "sortAnswers": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "scripts": {}, "unitTests": [], "variableReplacements": [], "customMarkingAlgorithm": "", "type": "gapfill", "marks": 0}], "variable_groups": [{"name": "part a", "variables": ["a", "b", "c", "x", "fx", "m", "absfx", "x0", "fx0"]}], "extensions": ["jsxgraph"], "preamble": {"js": "", "css": ""}, "advice": "

", "tags": [], "statement": "

This is a calculator question.

", "name": "Johnny's Differentiation: Equation of tangent. Quadratic", "functions": {"plot": {"parameters": [["a", "number"], ["b", "number"], ["c", "number"], ["x0", "number"], ["y0", "number"]], "definition": "// This functions plots a cubic with a certain number of\n// stationary points and roots.\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 = -7;\nvar x_max = 7;\nvar y_min = -20;\nvar y_max = 20;\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: false,\n grid: false,\n axis:false,\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 and y-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 });\n\n\n\n\n// Plot the function.\n board.create('functiongraph',\n [function(x){ return a*x*x+b*x+c},x_min,x_max],\n {strokeWidth:2});\n\n//Plot the tangent.\n board.create('functiongraph',\n [function(x){ return y0+(x-x0)*(2*x0*a+b)},x_min,x_max]);\n\n// Plot coordinates.\n board.create('circle',[[x0,y0],0.1],{color:'red'});\n\n\nreturn div;", "type": "html", "language": "javascript"}}, "ungrouped_variables": [], "type": "question", "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Johnny Yi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2810/"}]}]}], "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Johnny Yi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2810/"}]}