// Numbas version: exam_results_page_options {"name": "Quadratics: Determine the equation of a parabola", "extensions": ["geogebra", "jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

A parabolic graph is given. The question is to determine the equation of the graph. Non-calculator. Advice is given.

"}, "preamble": {"css": "", "js": ""}, "advice": "

The graph crosses the $x$-axis in two places, namely at $(\\var{r1},0)$ and $(\\var{r2},0)$. Therefore, our quadratic can be written as $a(x-\\var{r1})(x-\\var{r2})$, but we still need to determine $a$.  To find $a$, you need to pick a value of $x$ (which is not $\\var{r1}$ or $\\var{r2}$) and use the graph to determine what $f(x)$ is.  Then you plug in these numbers into the equation and solve for $a$. Unfortunately, there is no fixed choice for $x$ so feedback on this exact question is not available.  However, we present an example from a different question:

\n

\n

Imagine after the first step you reached $f(x) = a(x-3)(x+2)$.  By looking at the graph we saw that $f(4) = 12$.  Plugging $x=4$ into our equation we get:

\n

$12 = f(4) = a(4-3)(4+2) = a \\cdot 1 \\cdot 6 = 6a$, so $a = 2$.

\n

Then the final answer in this example would be $f(x) = 2(x-3)(x+2)$.  (Depending on the wording of the question, you may have to expand the brackets too.  In this example, expanding the brackets gives $f(x) = 2x^2 - 2x - 12$.)

", "rulesets": {}, "extensions": ["geogebra", "jsxgraph"], "name": "Quadratics: Determine the equation of a parabola", "ungrouped_variables": ["r1", "r2", "a"], "functions": {"plotgraph": {"type": "html", "definition": "// This functions plots a graph of y = a(x-r1)(x-r2)\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\nboard.create('functiongraph',\n [function(x){ return a*(x-r1)*(x-r2);},x_min,x_max]);\n\n\n\nreturn div;", "language": "javascript", "parameters": [["r1", "number"], ["r2", "number"], ["a", "number"]]}}, "tags": [], "variablesTest": {"condition": "r1<>r2", "maxRuns": 100}, "variable_groups": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-3..3 except 0)", "description": "", "templateType": "anything"}, "r2": {"name": "r2", "group": "Ungrouped variables", "definition": "r1+random(-4..4 except [1,-1])", "description": "", "templateType": "anything"}, "r1": {"name": "r1", "group": "Ungrouped variables", "definition": "random(-2..-2 except 0)", "description": "", "templateType": "anything"}}, "statement": "

Give the equation of a quadratic graph.

", "parts": [{"customName": "", "type": "gapfill", "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "marks": 0, "showFeedbackIcon": true, "gaps": [{"customName": "", "type": "jme", "vsetRangePoints": 5, "answer": "{a}(x-{r1})(x-{r2})", "showFeedbackIcon": true, "failureRate": 1, "checkingType": "absdiff", "checkVariableNames": false, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "answerSimplification": "all", "variableReplacementStrategy": "originalfirst", "marks": "4", "valuegenerators": [{"name": "x", "value": ""}], "checkingAccuracy": 0.001, "scripts": {}, "extendBaseMarkingAlgorithm": true, "showPreview": true, "unitTests": [], "variableReplacements": [], "vsetRange": [0, 1]}], "sortAnswers": false, "prompt": "

{plotgraph(r1,r2,a)}

\n

Write the equation of the quadratic graph.

\n

$y(x)=\\;$[[0]]

", "scripts": {}, "useCustomName": false, "showCorrectAnswer": true, "unitTests": [], "variableReplacements": [], "extendBaseMarkingAlgorithm": true}], "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/"}]}