// Numbas version: exam_results_page_options {"name": "Lois's copy of Complete 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", "showCorrectAnswer": true, "scripts": {}, "showFeedbackIcon": true, "gaps": [{"answersimplification": "std", "checkvariablenames": false, "showCorrectAnswer": true, "checkingtype": "absdiff", "checkingaccuracy": 0.0001, "vsetrangepoints": 5, "scripts": {}, "type": "jme", "vsetrange": [0, 1], "showpreview": true, "musthave": {"partialCredit": 0, "strings": ["(", ")", "^"], "message": "

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

", "showStrings": false}, "answer": "(x+{a})^2+{b}", "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "notallowed": {"partialCredit": 0, "strings": ["x^2", "x*x", "x x", "x(", "x*("], "message": "

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

", "showStrings": false}, "variableReplacements": [], "expectedvariablenames": [], "marks": 2}], "variableReplacements": [], "prompt": "

\n

If $q(x) =\\simplify{x^2+{2*a}x+ {a^2+b}}$, write $q(x)$ in the form $(x+a)^2+b$ for suitable numbers $a$ and $b$.

\n

\n

$q(x) =$ [[0]].

", "marks": 0, "type": "gapfill"}, {"variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "showFeedbackIcon": true, "gaps": [{"minValue": "{b}", "variableReplacements": [], "showCorrectAnswer": true, "mustBeReducedPC": 0, "scripts": {}, "type": "numberentry", "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "maxValue": "{b}", "allowFractions": true, "correctAnswerFraction": true, "marks": 1, "correctAnswerStyle": "plain"}], "variableReplacements": [], "prompt": "

What is the minimum value of $q(x)$?

\n

[[0]]

", "marks": 0, "type": "gapfill"}], "name": "Lois's copy of Complete the square", "tags": ["algebra", "algebraic manipulation", "complete the square", "completing the square", "quadratics", "Steps", "steps"], "functions": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "ungrouped_variables": ["a", "s1", "b"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Find $c$ and $d$ such that $x^2+ax+b = (x+c)^2+d$.

"}, "variable_groups": [], "advice": "

a) Given the quadratic $q(x)=\\simplify{x^2+{2*a}x+ {a^2+b}}$ we complete the square as follows:

\n

1. Halving the coefficient of $x$ gives $\\var{a}$

\n

2. Now $\\simplify[all]{p(x)=(x+{a})^2=x^2+{2*a}x+{a^2}}$.
This matches the first two terms of $q(x)$.

\n

3. But the constant term $\\simplify[all]{{a^2}}$ in $p(x)$ is not the same as in $q(x)$, so we need to adjust by adding on $\\simplify[std,!fractionNumbers]{{a^2+b}-{a^2}={b}}$ to $p(x)$.
Hence we get \\[q(x) = \\simplify[all]{p(x)+{b} = (x+{a})^2+{b}}\\]

\n

b) The minimum value of $q(x)$ will occur when $(x+\\var{a})^2 = 0$ and $q(x)=\\var{b}$

", "statement": "

This question is about a quadratic expression$q(x). 

\n

", "variables": {"b": {"group": "Ungrouped variables", "definition": "random(1..20)-a^2", "name": "b", "description": "", "templateType": "anything"}, "a": {"group": "Ungrouped variables", "definition": "s1*random(1.0..9.5#0.5)", "name": "a", "description": "", "templateType": "anything"}, "s1": {"group": "Ungrouped variables", "definition": "random(1,-1)", "name": "s1", "description": "", "templateType": "anything"}}, "preamble": {"js": "", "css": ""}, "extensions": [], "type": "question", "contributors": [{"name": "Lois Rollings", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/326/"}]}]}], "contributors": [{"name": "Lois Rollings", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/326/"}]}