// Numbas version: exam_results_page_options {"name": "Differentiation: Equation of tangent. Chain rule. Shorter", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"statement": "

This is a calculator question.

", "variables": {"x": {"templateType": "anything", "description": "", "group": "part a", "name": "x", "definition": "random(2..6)"}, "m": {"templateType": "anything", "description": "", "group": "part a", "name": "m", "definition": "c*(2*a*x+b)/(a*x^2+b*x)-1"}, "b'": {"templateType": "anything", "description": "", "group": "part a", "name": "b'", "definition": "b-2*a*c"}, "c'": {"templateType": "anything", "description": "", "group": "part a", "name": "c'", "definition": "-c*b"}, "a": {"templateType": "anything", "description": "", "group": "part a", "name": "a", "definition": "random(1..3)"}, "y_int": {"templateType": "anything", "description": "", "group": "part a", "name": "y_int", "definition": "fx-x*m"}, "c": {"templateType": "anything", "description": "", "group": "part a", "name": "c", "definition": "random(2..5)"}, "fx": {"templateType": "anything", "description": "", "group": "part a", "name": "fx", "definition": "c*ln(a*x^2+b*x)-x"}, "x0": {"templateType": "anything", "description": "", "group": "part a", "name": "x0", "definition": "(-b'+sqrt(b'*b'-4*a'*c'))/(2*a')"}, "b": {"templateType": "anything", "description": "", "group": "part a", "name": "b", "definition": "random(1..5)"}, "fx0": {"templateType": "anything", "description": "", "group": "part a", "name": "fx0", "definition": "c*ln(a*(x0)^2+b*x0)-x0"}, "a'": {"templateType": "anything", "description": "", "group": "part a", "name": "a'", "definition": "a"}, "absfx": {"templateType": "anything", "description": "", "group": "part a", "name": "absfx", "definition": "abs(fx)"}}, "parts": [{"customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "variableReplacements": [], "prompt": "

The curve with equation $y = \\simplify{{c}ln({a}x^2+{b}x) -x}$ is sketched below.

\n

{plot(a,b,c,x,fx,m)}

\n

In addition, the tangent to the curve at $x=\\var{x}$ has been drawn.

\n

\n

\n

What is the equation of the tangent? Give all coefficients to 3 s.f.

\n

$y=$  [[0]]

", "type": "gapfill", "gaps": [{"customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "variableReplacements": [], "checkVariableNames": false, "type": "jme", "checkingAccuracy": 0.001, "showPreview": true, "expectedVariableNames": [], "checkingType": "absdiff", "showCorrectAnswer": true, "vsetRange": [0, 1], "vsetRangePoints": 5, "variableReplacementStrategy": "originalfirst", "marks": "3", "failureRate": 1, "answer": "x*{siground(m,3)}+{siground(y_int,3)}", "showFeedbackIcon": true, "scripts": {}}], "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "marks": 0, "showFeedbackIcon": true, "scripts": {}}], "extensions": ["jsxgraph"], "rulesets": {}, "name": "Differentiation: Equation of tangent. Chain rule. Shorter", "variable_groups": [{"variables": ["a", "b", "c", "x", "fx", "m", "absfx", "y_int", "x0", "fx0", "a'", "b'", "c'"], "name": "part a"}], "preamble": {"js": "", "css": ""}, "functions": {"plot": {"type": "html", "parameters": [["a", "number"], ["b", "number"], ["c", "number"], ["x0", "number"], ["y0", "number"], ["m", "number"]], "definition": "// It creates the board, sets it up, then returns an\n// HTML div tag containing the board.\n\n\n\n// Max and min x and y values for the axis.\nvar x_min = -1.1;\nvar x_max = 9;\nvar y_min = -5;\nvar y_max = 10;\n\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// div.board is the object created by JSXGraph, which you use to \n// manipulate elements\nvar board = div.board; \n\n\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 c*Math.log(a*x*x+b*x)-x},0,x_max],\n {strokeWidth:2});\n\n//Plot the tangent.\n board.create('functiongraph',\n [function(x){ return y0+(x-x0)*(m)},x_min,x_max]);\n\n// Plot coordinates.\n board.create('circle',[[x0,y0],0.1],{color:'red'});\n\n\nreturn div;", "language": "javascript"}}, "advice": "

Similar questions are in lectures and in workshops.  To differentiate, you need to use the chain rule. You should get: $\\frac{\\mathrm{d}y}{\\mathrm{d}x} = \\simplify{(({2*a*c}x+{b*c}))/({a}x^2+{b}x)}-1$.

\n

\n

Remember to make use of the support made available to you, if you're unsure of anything. See your emails/blackboard for information.

$f(x)= c\\ln(ax^2+bx)-x$ is sketched. A tangent is also sketched. The equation of the tangent line is asked for. Shorter because in the original, I also ask for the $x$-coordinate of the maximum point.