// Numbas version: exam_results_page_options {"name": "Gizem's copy of Algebra: solving a quadratic equation graphically.", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"extensions": ["jsxgraph"], "preamble": {"js": "", "css": ""}, "variables": {"b": {"description": "", "name": "b", "templateType": "anything", "definition": "random(1..3)", "group": "part a"}, "rand": {"description": "", "name": "rand", "templateType": "anything", "definition": "shuffle(0..3)", "group": "part a"}, "a": {"description": "", "name": "a", "templateType": "anything", "definition": "random(1..5)", "group": "part a"}, "x": {"description": "", "name": "x", "templateType": "anything", "definition": "[ matrix([-a]),\n matrix([[-1-a],[1-a]]),\n matrix([[-2-a],[2-a]]),\n matrix([[-3-a],[3-a]])\n]", "group": "part a"}, "y": {"description": "", "name": "y", "templateType": "anything", "definition": "[-b,-b+1,-b+4,-b+9]", "group": "part a"}}, "advice": "

See 4.1 for background on quadratics. See 1.1 for what solving means.

", "metadata": {"description": "

A quadratic equation (equivalent to $(x+a)^2-b$) is given and sketched. Three equations are given that can be solved using the graph. There is a chance there will only be one solution.

", "licence": "Creative Commons Attribution 4.0 International"}, "name": "Gizem's copy of Algebra: solving a quadratic equation graphically.", "rulesets": {}, "statement": "", "parts": [{"variableReplacements": [], "showCorrectAnswer": true, "type": "gapfill", "scripts": {}, "gaps": [{"correctAnswer": "x[rand[0]]", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "numRows": 1, "type": "matrix", "scripts": {}, "tolerance": 0, "variableReplacementStrategy": "originalfirst", "markPerCell": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "unitTests": [], "allowResize": true, "customMarkingAlgorithm": "", "marks": 1, "numColumns": "1", "allowFractions": false, "correctAnswerFractions": false}, {"correctAnswer": "x[rand[1]]", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "numRows": 1, "type": "matrix", "scripts": {}, "tolerance": 0, "variableReplacementStrategy": "originalfirst", "markPerCell": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "unitTests": [], "allowResize": true, "customMarkingAlgorithm": "", "marks": 1, "numColumns": "1", "allowFractions": false, "correctAnswerFractions": false}, {"correctAnswer": "x[rand[2]]", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "numRows": 1, "type": "matrix", "scripts": {}, "tolerance": 0, "variableReplacementStrategy": "originalfirst", "markPerCell": false, "showCorrectAnswer": true, "showFeedbackIcon": true, "unitTests": [], "allowResize": true, "customMarkingAlgorithm": "", "marks": 1, "numColumns": "1", "allowFractions": false, "correctAnswerFractions": false}], "variableReplacementStrategy": "originalfirst", "prompt": "

Below is the graph of the quadratic $y=\\simplify{x^2 + {2*a}*x + {a^2-b}}$.

\n

{plot(a,b)}

\n

\n

Use the graph to solve the following equations. If there is more than one answer, increase the number of rows and enter the answers in ascending order.

\n

\n

$\\simplify{x^2 + {2*a}*x + {a^2-b}}=\\var{y[rand[0]]}$

\n

[[0]]

\n

\n

\n

$\\simplify{x^2 + {2*a}*x + {a^2-b}}=\\var{y[rand[1]]}$

\n

[[1]]

\n

\n

\n

$\\simplify{x^2 + {2*a}*x + {a^2-b}}=\\var{y[rand[2]]}$

\n

[[2]]

\n

", "sortAnswers": false, "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "unitTests": [], "customMarkingAlgorithm": "", "marks": 0}], "variable_groups": [{"name": "part a", "variables": ["a", "b", "y", "x", "rand"]}], "variablesTest": {"condition": "", "maxRuns": 100}, "functions": {"plot": {"language": "javascript", "definition": "// This functions plots a quadratic graph of the form y = (x+a)^2 - b\n\n\n// Max and min x and y values for the axis.\nvar x_min = -10;\nvar x_max = 4;\nvar y_min = -6;\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 and y-axis\nvar xaxis = board.create('axis',[[0,0],[1,0]]);\n\n// create the y-axis\nvar yaxis = board.create('axis',[[0,0],[0,1]], );\n\n\n\n\n// Plot the function.\n board.create('functiongraph',\n [function(x){ return (x+a)*(x+a)-b},x_min,x_max]);\n\n\n\nreturn div;", "parameters": [["a", "number"], ["b", "number"]], "type": "html"}}, "tags": [], "ungrouped_variables": [], "type": "question", "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Gizem Intepe", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2097/"}]}]}], "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "Gizem Intepe", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2097/"}]}