// Numbas version: exam_results_page_options {"name": "grant's copy of Algebra: Solving quadratics by completing the square", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"variableReplacementStrategy": "originalfirst", "sortAnswers": false, "gaps": [{"failureRate": 1, "checkingType": "absdiff", "variableReplacements": [], "scripts": {}, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "checkVariableNames": false, "extendBaseMarkingAlgorithm": true, "vsetRange": [0, 1], "notallowed": {"showStrings": false, "partialCredit": 0, "strings": ["x^2", "x*x", "x x", "x(", "x*("], "message": "

Input your answer in the form $(x+a)^2+b$.

"}, "variableReplacementStrategy": "originalfirst", "vsetRangePoints": 5, "showPreview": true, "checkingAccuracy": 0.001, "showFeedbackIcon": true, "marks": "1", "answerSimplification": "std", "expectedVariableNames": [], "musthave": {"showStrings": false, "partialCredit": 0, "strings": ["(", ")", "^"], "message": "

please input in the form $(x+a)^2+b$

"}, "unitTests": [], "answer": "(x+{a[0]})^2+{b[0]}", "type": "jme"}, {"variableReplacementStrategy": "originalfirst", "allowResize": true, "correctAnswerFractions": false, "numRows": 1, "tolerance": 0, "correctAnswer": "matrix([{xmin[0]},{xmax[0]}])", "showFeedbackIcon": true, "variableReplacements": [], "scripts": {}, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "allowFractions": false, "marks": 1, "markPerCell": false, "extendBaseMarkingAlgorithm": true, "numColumns": 1, "unitTests": [], "type": "matrix"}, {"variableReplacementStrategy": "originalfirst", "allowResize": true, "correctAnswerFractions": false, "numRows": 1, "tolerance": 0, "correctAnswer": "matrix([{xmin[3]}])", "showFeedbackIcon": true, "variableReplacements": [], "scripts": {}, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "allowFractions": false, "marks": 1, "markPerCell": false, "extendBaseMarkingAlgorithm": true, "numColumns": 1, "unitTests": [], "type": "matrix"}], "showFeedbackIcon": true, "variableReplacements": [], "scripts": {}, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "marks": 0, "extendBaseMarkingAlgorithm": true, "prompt": "

Complete the square on $\\simplify{x^2+{2*a[0]}x+ {a[0]^2+b[0]}}$ [[0]]

\n

Hence solve $\\simplify{x^2+{2*a[0]}x+ {a[0]^2+b[0]}} = \\var{fx[0]}$ [[1]]

\n

Also solve $\\simplify{x^2+{2*a[0]}x+ {a[0]^2+b[0]}} = \\var{fx[3]}$ [[2]]

", "unitTests": [], "type": "gapfill"}, {"variableReplacementStrategy": "originalfirst", "sortAnswers": false, "gaps": [{"failureRate": 1, "checkingType": "absdiff", "variableReplacements": [], "scripts": {}, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "checkVariableNames": false, "extendBaseMarkingAlgorithm": true, "vsetRange": [0, 1], "notallowed": {"showStrings": false, "partialCredit": 0, "strings": ["x^2", "x*x", "x x", "x(", "x*("], "message": "

Input your answer in the form $(x+a)^2+b$.

"}, "variableReplacementStrategy": "originalfirst", "vsetRangePoints": 5, "showPreview": true, "checkingAccuracy": 0.001, "showFeedbackIcon": true, "marks": "1", "answerSimplification": "std", "expectedVariableNames": [], "musthave": {"showStrings": false, "partialCredit": 0, "strings": ["(", ")", "^"], "message": "

please input in the form $(x+a)^2+b$

"}, "unitTests": [], "answer": "(x+{a[1]})^2+{b[1]}", "type": "jme"}, {"variableReplacementStrategy": "originalfirst", "allowResize": true, "correctAnswerFractions": false, "numRows": 1, "tolerance": 0, "correctAnswer": "matrix([{xmin[4]},{xmax[4]}])", "showFeedbackIcon": true, "variableReplacements": [], "scripts": {}, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "allowFractions": false, "marks": 1, "markPerCell": false, "extendBaseMarkingAlgorithm": true, "numColumns": 1, "unitTests": [], "type": "matrix"}, {"variableReplacementStrategy": "originalfirst", "allowResize": true, "correctAnswerFractions": false, "numRows": 1, "tolerance": 0, "correctAnswer": "matrix([{xmin[5]},{xmax[5]}])", "showFeedbackIcon": true, "variableReplacements": [], "scripts": {}, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "allowFractions": false, "marks": 1, "markPerCell": false, "extendBaseMarkingAlgorithm": true, "numColumns": 1, "unitTests": [], "type": "matrix"}], "showFeedbackIcon": true, "variableReplacements": [], "scripts": {}, "customMarkingAlgorithm": "", "showCorrectAnswer": true, "marks": 0, "extendBaseMarkingAlgorithm": true, "prompt": "

Complete the square on $\\simplify{x^2+{2*a[1]}x+ {a[1]^2+b[1]}}$ [[0]]

\n

Hence solve $\\simplify{x^2+{2*a[1]}x+ {a[1]^2+b[1]}} = \\var{fx[4]}$ [[1]]

\n

Also solve $\\simplify{x^2+{2*a[1]}x+ {a[1]^2+b[1]}} = \\var{fx[5]}$ [[2]]

", "unitTests": [], "type": "gapfill"}], "preamble": {"js": "", "css": ""}, "tags": [], "functions": {}, "name": "grant's copy of Algebra: Solving quadratics by completing the square", "ungrouped_variables": ["a", "b", "shift", "xmin", "xmax", "fx"], "variable_groups": [], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

A few quadratic equations are given, to be solved by completing the square. The number of solutions is randomised.

"}, "variablesTest": {"maxRuns": 100, "condition": ""}, "advice": "

See Lecture 5.4 for examples of me completing the square.

", "statement": "

Solve these equations by completing the square. If there is more than one answer increase the number of COLUMNS and enter your answers in ASCENDING ORDER.

", "variables": {"xmax": {"group": "Ungrouped variables", "name": "xmax", "templateType": "anything", "description": "", "definition": "vector([-a[0]]+[-a[0]]+[-a[0]]+[-a[0]]+[-a[1]]+[-a[1]]+[-a[1]]+[-a[1]])+shift"}, "shift": {"group": "Ungrouped variables", "name": "shift", "templateType": "anything", "description": "", "definition": "vector(shuffle(1..9#4)+[0]+shuffle(1..9#4)+[0])"}, "fx": {"group": "Ungrouped variables", "name": "fx", "templateType": "anything", "description": "", "definition": "vector([(xmax[0]+a[0])^2+b[0]]+[(xmax[1]+a[0])^2+b[0]]+[(xmax[2]+a[0])^2+b[0]]+[(xmax[3]+a[0])^2+b[0]]+[(xmax[4]+a[1])^2+b[1]]+[(xmax[5]+a[1])^2+b[1]]+[(xmax[6]+a[1])^2+b[1]]+[(xmax[7]+a[1])^2+b[1]])"}, "b": {"group": "Ungrouped variables", "name": "b", "templateType": "anything", "description": "", "definition": "vector([random(-10..25)] + [random(-10..25)] + [random(-10..25)] + [random(-10..25)] + [random(-10..25)] )"}, "a": {"group": "Ungrouped variables", "name": "a", "templateType": "anything", "description": "", "definition": "vector([random(1..5)]+[random(-1..-5)]+[random(-1..-5)]+[random(-1..-5)]+[random(1..5)])"}, "xmin": {"group": "Ungrouped variables", "name": "xmin", "templateType": "anything", "description": "", "definition": "vector([-a[0]]+[-a[0]]+[-a[0]]+[-a[0]]+[-a[1]]+[-a[1]]+[-a[1]]+[-a[1]])-shift"}}, "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "extensions": [], "type": "question", "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "grant smith", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2569/"}]}]}], "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}, {"name": "grant smith", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2569/"}]}