// Numbas version: exam_results_page_options {"name": "Vekstfart - grafisk og ved regning", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [["question-resources/rett_linje_stigningstall.png", "/srv/numbas/media/question-resources/rett_linje_stigningstall.png"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {"eqnline": {"definition": "// This function creates the board and sets it up, then returns an\n// HTML div tag containing the board.\n \n// The curve is described by the equation \n// y = x^2-(a+b)x+a*b\n\n\n// First, make the JSXGraph board.\n// The function provided by the JSXGraph extension wraps the board up in \n// a div tag so that it's easier to embed in the page.\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px',\n{boundingBox: [-6,10,6,-10],\n axis: false,\n showNavigation: false,\n grid: true\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// Draw the function\n\n\nboard.create('functiongraph',[function(x){ return (x-a)*(x-b);},-6,6]);\nboard.create('functiongraph',[function(x){ return (2*x1-a-b)*(x-x1)+y1; strokeColor: 'black'},-6,6]);\nboard.create('point',[x2,y2],{size:2});\n\nreturn div;", "type": "html", "language": "javascript", "parameters": [["a", "number"], ["b", "number"], ["x1", "number"], ["y1", "number"], ["x2", "number"], ["y2", "number"]]}}, "ungrouped_variables": ["a", "b", "c", "x1", "y1", "dist", "x2", "y2"], "name": "Vekstfart - grafisk og ved regning", "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

We know that the graph crosses the $x$-axis at both $(\\var{a},0)$ and $(\\var{b},0)$. Since this is a quadratic, we know our equations has two roots, and by the previous observation, they are at $\\var{a}$ and $\\var{b}$. Hence we can write our equation as $\\simplify{y=(x-{a})(x-{b})}$ which simplifies to $\\simplify{y=x^2-({a}+{b})x+({a}*{b})}$.

\n

\n

To find the coefficients of the turning point of the quadratic, we know the x-coordinate of the turning point will correspond to the solution to $dy/dx=0$. So we get $\\simplify{2x-({a}+{b})}=0$ hence $\\simplify{x=({a}+{b})/2}$. We substitute this value of x back into the equation of the quadratic to find the corresponding y-coordinate.

", "rulesets": {}, "parts": [{"stepsPenalty": 0, "prompt": "

Finn grafisk vekstfarten til $f$ i punktet $(\\var{x1}, \\var{y1})$

\n

Vekstfarten er: [[0]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": true, "variableReplacements": [], "maxValue": "2*x1-(a+b)", "minValue": "2*x1-(a+b)", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "showPrecisionHint": false, "type": "numberentry"}], "steps": [{"prompt": "

Hint: Vekstfarten til funksjonen i punktet $(\\var{x1}, \\var{y1})$ er stigningstallet til tangenten i dette punktet. Dette stigningstallet kan vi finne ved grafisk avlesning. Se for eksempel på den rette linjen tegnet nedenfor (som ikke nødvendigvis svarer til tangenten i denne oppgaven):

\n

\n

Her er stigningstallet $a = \\frac{\\Delta x}{\\Delta y}=\\frac{2}{1}=2$

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}, {"stepsPenalty": 0, "prompt": "

Finn ved regning vekstfarten til $f$ i punktet A med koordinatene $(\\var{x2}, \\var{y2})$

\n

Vekstfart: [[0]]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": true, "variableReplacements": [], "maxValue": "2*x2-(a+b)", "minValue": "2*x2-(a+b)", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "showPrecisionHint": false, "type": "numberentry"}], "steps": [{"prompt": "

Hint: Vekstfarten i punktet $(\\var{x2}, \\var{y2})$ er gitt ved $f'(\\var{x2})$.

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}], "extensions": ["jsxgraph"], "statement": "

{eqnline(a,b,x1,y1,x2,y2)}

\n

Figuren ovenfor viser grafen til funksjonen

\n

$\\displaystyle\\simplify[all, !Noleadingminus]{f(x)=x^2-{a+b}x+{a*b}}$

\n

sammen med tangenten til grafen i punktet $(\\var{x1}, \\var{y1})$ og punktet A med koordinater $(\\var{x2}, \\var{y2})$

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "type": "question", "variables": {"a": {"definition": "random(-3..3 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "a*b", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "random(-2..2 except [0,a,-a])", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "dist": {"definition": "random(-2..2 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "dist", "description": ""}, "y2": {"definition": "(x2-a)*(x2-b)", "templateType": "anything", "group": "Ungrouped variables", "name": "y2", "description": ""}, "x2": {"definition": "floor((a+b)/2)-dist", "templateType": "anything", "group": "Ungrouped variables", "name": "x2", "description": ""}, "y1": {"definition": "(x1-a)*(x1-b)", "templateType": "anything", "group": "Ungrouped variables", "name": "y1", "description": ""}, "x1": {"definition": "floor((a+b)/2)+dist", "templateType": "anything", "group": "Ungrouped variables", "name": "x1", "description": ""}}, "metadata": {"description": "", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Morten Brekke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/478/"}]}]}], "contributors": [{"name": "Morten Brekke", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/478/"}]}