// 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, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"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$.)

", "preamble": {"js": "", "css": ""}, "variables": {"r1": {"group": "Ungrouped variables", "definition": "random(-2..-2 except 0)", "name": "r1", "description": "", "templateType": "anything"}, "a": {"group": "Ungrouped variables", "definition": "random(-3..3 except 0)", "name": "a", "description": "", "templateType": "anything"}, "r2": {"group": "Ungrouped variables", "definition": "r1+random(-4..4 except [1,-1])", "name": "r2", "description": "", "templateType": "anything"}}, "rulesets": {}, "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": "r1<>r2"}, "functions": {"plotgraph": {"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", "type": "html", "parameters": [["r1", "number"], ["r2", "number"], ["a", "number"]]}}, "tags": [], "ungrouped_variables": ["r1", "r2", "a"], "name": "Quadratics: Determine the equation of a parabola", "parts": [{"gaps": [{"vsetRangePoints": 5, "variableReplacements": [], "answer": "{a}(x-{r1})(x-{r2})", "failureRate": 1, "marks": "4", "unitTests": [], "showPreview": true, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "scripts": {}, "expectedVariableNames": [], "checkingAccuracy": 0.001, "answerSimplification": "all", "checkingType": "absdiff", "showFeedbackIcon": true, "vsetRange": [0, 1], "type": "jme", "checkVariableNames": false, "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true}], "variableReplacements": [], "unitTests": [], "customMarkingAlgorithm": "", "scripts": {}, "marks": 0, "showFeedbackIcon": true, "prompt": "

{plotgraph(r1,r2,a)}

\n

Write the equation of the quadratic graph.

\n

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

", "type": "gapfill", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true}], "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.

"}, "statement": "

Give the equation of a quadratic graph.

", "extensions": ["geogebra", "jsxgraph"], "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/"}]}