// Numbas version: exam_results_page_options {"name": "Algebra: Solving quadratics by completing the square. shorter", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "statement": "

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

", "advice": "

See Lecture 5.4 for examples of me completing the square.

", "parts": [{"type": "gapfill", "sortAnswers": false, "showFeedbackIcon": true, "showCorrectAnswer": true, "unitTests": [], "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetRangePoints": 5, "type": "jme", "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "checkVariableNames": false, "answer": "(x+{a[0]})^2+{b[0]}", "customMarkingAlgorithm": "", "checkingAccuracy": 0.001, "vsetRange": [0, 1], "checkingType": "absdiff", "showCorrectAnswer": true, "unitTests": [], "failureRate": 1, "expectedVariableNames": [], "musthave": {"message": "

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

", "partialCredit": 0, "showStrings": false, "strings": ["(", ")", "^"]}, "notallowed": {"message": "

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

", "partialCredit": 0, "showStrings": false, "strings": ["x^2", "x*x", "x x", "x(", "x*("]}, "answerSimplification": "std", "showPreview": true, "marks": "1", "scripts": {}}, {"correctAnswerFractions": false, "allowResize": true, "numColumns": 1, "type": "matrix", "showFeedbackIcon": true, "showCorrectAnswer": true, "unitTests": [], "tolerance": 0, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "numRows": 1, "allowFractions": false, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "correctAnswer": "matrix([{xmin[0]}],[{xmax[0]}])", "marks": 1, "markPerCell": false, "scripts": {}}, {"correctAnswerFractions": false, "allowResize": true, "numColumns": 1, "type": "matrix", "showFeedbackIcon": true, "showCorrectAnswer": true, "unitTests": [], "tolerance": 0, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "numRows": 1, "allowFractions": false, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "correctAnswer": "matrix([{xmin[3]}])", "marks": 1, "markPerCell": false, "scripts": {}}], "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "marks": 0, "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]]

", "scripts": {}}], "variables": {"shift": {"definition": "vector(shuffle(1..9#4)+[0]+shuffle(1..9#4)+[0])", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "shift"}, "a": {"definition": "vector([random(1..5)]+[random(-1..-5)]+[random(-1..-5)]+[random(-1..-5)]+[random(1..5)])", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "a"}, "b": {"definition": "vector([random(-10..25)] + [random(-10..25)] + [random(-10..25)] + [random(-10..25)] + [random(-10..25)] )", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "b"}, "fx": {"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]])", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "fx"}, "xmin": {"definition": "vector([-a[0]]+[-a[0]]+[-a[0]]+[-a[0]]+[-a[1]]+[-a[1]]+[-a[1]]+[-a[1]])-shift", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "xmin"}, "xmax": {"definition": "vector([-a[0]]+[-a[0]]+[-a[0]]+[-a[0]]+[-a[1]]+[-a[1]]+[-a[1]]+[-a[1]])+shift", "description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "xmax"}}, "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "functions": {}, "preamble": {"js": "", "css": ""}, "extensions": [], "metadata": {"description": "

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

", "licence": "Creative Commons Attribution 4.0 International"}, "tags": [], "name": "Algebra: Solving quadratics by completing the square. shorter", "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "shift", "xmin", "xmax", "fx"], "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/"}]}