// Numbas version: finer_feedback_settings {"name": "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": [{"name": "Differentiation: Equation of tangent. Quadratic", "tags": [], "metadata": {"description": "
A quadratic is and a graph of it is given. A tangent is also sketched. The equation of the tangent line is asked for.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "This is a calculator question.
\n-----------------------------------
", "advice": "See ??
\nSee Maths 1 for equations of lines and for background on gradients of curves.
", "rulesets": {}, "extensions": ["jsxgraph"], "variables": {"fx": {"name": "fx", "group": "part a", "definition": "a*x*x+b*x+c", "description": "", "templateType": "anything"}, "m": {"name": "m", "group": "part a", "definition": "2*a*x+b", "description": "", "templateType": "anything"}, "absfx": {"name": "absfx", "group": "part a", "definition": "abs(fx)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "part a", "definition": "random(-2..2 except 0)", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "part a", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything"}, "x": {"name": "x", "group": "part a", "definition": "random(-3..3 except 0)", "description": "", "templateType": "anything"}, "c": {"name": "c", "group": "part a", "definition": "random(-2..2 except 0)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "and(m<>0,(absfx<15))", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "part a", "variables": ["a", "b", "c", "x", "fx", "m", "absfx"]}], "functions": {"plot": {"parameters": [["a", "number"], ["b", "number"], ["c", "number"], ["x0", "number"], ["y0", "number"]], "type": "html", "language": "javascript", "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;"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "{plot(a,b,c,x, fx)}
\nThe curve with equation $y = \\simplify{{a}x^2+{b}x+{c}}$ is sketched above. The tangent to the curve at $x=\\var{x}$ has also been drawn.
\n(a) What are the coordinates of the point where the tangent touches the curve?
\n[[0]]
\n\n(b) What is the gradient of the tangent line? (Hint, you need differentiation)
\n[[1]]
\n\n(c) What is the equation of the tangent line?
\n$y=$ [[2]]
\n\n\n", "gaps": [{"type": "matrix", "useCustomName": false, "customName": "", "marks": "1", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "correctAnswer": "matrix([x,fx])", "correctAnswerFractions": false, "numRows": 1, "numColumns": "2", "allowResize": false, "tolerance": 0, "markPerCell": false, "allowFractions": true, "minColumns": 1, "maxColumns": 0, "minRows": 1, "maxRows": 0}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1.5", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "m", "maxValue": "m", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "jme", "useCustomName": false, "customName": "", "marks": "1.5", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "x*{m}+{fx-x*m}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "type": "question", "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}]}]}], "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}]}