// Numbas version: exam_results_page_options {"name": "Complete the square", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"s1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "s1"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9)-a^2*k", "description": "", "name": "b"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s1*random(1.0..4.5#0.5)", "description": "", "name": "a"}, "k": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "name": "k"}}, "ungrouped_variables": ["a", "s1", "b", "k"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Complete the square", "functions": {}, "showQuestionGroupNames": false, "parts": [{"stepsPenalty": 1, "scripts": {}, "gaps": [{"answer": "{k}(x+{a})^2+{b}", "musthave": {"message": "

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

", "showStrings": false, "partialCredit": 0, "strings": ["(", ")", "^"]}, "vsetrange": [0, 1], "checkingaccuracy": 0.0001, "showCorrectAnswer": true, "expectedvariablenames": [], "notallowed": {"message": "

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

", "showStrings": false, "partialCredit": 0, "strings": ["x^2", "x*x", "x x", "x(", "x*("]}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "answersimplification": "std", "marks": 2, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "

$\\simplify{{k}x^2+{2*a*k}x+ {a^2*k+b}} = \\phantom{{}}$ [[0]].

", "steps": [{"type": "information", "prompt": "

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

\n

1. Writing $\\simplify{{k}x^2+{2*a*k}x}$ as $\\var{k}(\\simplify{x^2+{2*a}x})$ and complete the square for $\\simplify{x^2+{2*a}x}$.

\n

2. Multiplying the completed square for $\\simplify{x^2+{2*a}x}$ by $\\var{k}$.

\n

3. Adding  $\\var{a^2*k+b}$.

", "showCorrectAnswer": true, "scripts": {}, "marks": 0}], "showCorrectAnswer": true, "marks": 0}], "statement": "

Put the following quadratic expression in the form $a(x+B)^2+C$ for suitable numbers $a$, $B$ and $C$.

\n

Note that you have to input your answer in the form $a(x+B)^2+C$  and  the numbers $a, \\;B,\\;C$ must be input exactly (as integers, fractions or exact decimals).

", "tags": ["algebra", "algebraic manipulation", "checked2015", "complete the square", "completing the square", "quadratics", "SFY0001", "Steps", "steps"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n \t\t\n \t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "

Find $a$, $B$ and $C$ such that $ax^2+bx+c = a(x+B)^2+C$.

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

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

\n

1. Considering first $\\simplify{{k}x^2+{2*a*k}x}$, taking out the factor $\\var{k}$ so that we get $\\var{k}(\\simplify{x^2+{2*a}x})$, and complete the square for $\\simplify{x^2+{2*a}x}$.

\n

2. Comparing $\\simplify{x^2+{2*a}x}$ to $(x+B)^2=x^2+2Bx+B^2$: both start with $x^2$ and we set $2B=\\var{2*a}$, so $B=\\var{a}$. Thus $\\simplify{(x+{a})^2=x^2+{2*a}x+{a}^2}$ and $\\simplify{x^2+{2*a}x=(x+{a})^2-{a}^2}$.

\n

3. It follows that $\\simplify{{k}x^2+{2*a*k}x ={k}((x+{a})^2-{a}^2)={k}(x+{a})^2-{a^2 *k}}$ .

\n

4. Therefore $\\simplify{{k}x^2+{2*a*k}x+ {a^2*k+b}={k}(x+{a})^2 +{b}} $.

\n

", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}