// Numbas version: exam_results_page_options {"name": "Solving a quadratic by completing the square", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a", "b", "c", "dd", "d", "scoeff", "lcoeff", "ccoeff", "disc", "lengthdet", "div", "argtop", "argbot", "sqrtargtop", "sqrtargbot"], "name": "Solving a quadratic by completing the square", "tags": ["completing the square", "formula", "quadratic", "quadratics", "roots", "solving"], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"stepsPenalty": "8", "prompt": "
Fill in the blanks to solve the quadratic by completing the square:
\n\n | $\\simplify{{scoeff}x^2+{lcoeff}x+{ccoeff+c}}$ | \n$=$ | \n$\\var{c}$ | \n
$\\Longrightarrow$ | \n$\\simplify{{scoeff}x^2+{lcoeff}x}$ | \n$=$ | \n[[0]] | \n
$\\Longrightarrow$ | \n$x^2+$[[1]]$x$ | \n$=$ | \n[[2]] | \n
$\\Longrightarrow$ | \n$x^2+$[[1]]$x+$[[3]] | \n$=$ | \n[[4]] | \n
$\\Longrightarrow$ | \n$(x+$[[5]]$)^2$ | \n$=$ | \n[[4]] | \n
$\\Longrightarrow$ | \n$(x+$[[5]]$)$ | \n$=$ | \n$\\pm$[[6]] | \n
$\\Longrightarrow$ | \n$x$ | \n$=$ | \n[[7]] | \n
Note: In the last gap, if $x=1,2$, enter set(1,2).
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "steps": [{"prompt": "Recall
\n$(x+a)^2=x^2+2ax+a^2$
\nis called a perfect square. Now, notice if we let $b=2a$ this equation would become
\n$\\left(x+\\frac{b}{2}\\right)^2=x^2+bx+\\left(\\frac{b}{2}\\right)^2$.
\n\n\n$\\simplify{{scoeff}x^2+{lcoeff}x+{ccoeff+c}}$ | \n$=$ | \n$\\var{c}$ | \n\n |
$\\simplify{{scoeff}x^2+{lcoeff}x}$ | \n$=$ | \n$\\var{-ccoeff}$ | \n(get all constants on the right hand side) | \n
$x^2+\\simplify{{lcoeff}/{scoeff}}x$ | \n$=$ | \n$\\simplify{{-ccoeff}/{scoeff}}$ | \n(divide every term by the coefficient of $x^2$) | \n
$x^2+\\simplify{{lcoeff}/{scoeff}}x+\\simplify{{lcoeff^2}/{4*scoeff^2}}$ | \n$=$ | \n$\\simplify{{argtop}/{argbot}}$ | \n(halve the coefficient of $x$, then square, then add to both sides) | \n
$(x+\\simplify{{lcoeff}/{2*scoeff}})^2$ | \n$=$ | \n$\\simplify{{argtop}/{argbot}}$ | \n(rewrite the left hand side as a perfect square) | \n
$(x+\\simplify{{lcoeff}/{2*scoeff}})$ | \n$=$ | \n$\\pm \\simplify{{sqrtargtop}/{sqrtargbot}}$ | \n(take the plus or minus square root of both sides) | \n
$x$ | \n$=$ | \n$\\simplify{{-c}/{a}},\\simplify{{-d}/{b}}$ | \n(solve for $x$) | \n
Note: we would enter the final answer as set$\\left(\\simplify{{-c}/{a}},\\simplify{{-d}/{b}}\\right)$.
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "gaps": [{"integerPartialCredit": 0, "integerAnswer": true, "allowFractions": false, "variableReplacements": [], "maxValue": "{-ccoeff}", "minValue": "{-ccoeff}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": false, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "{lcoeff}/{scoeff}", "minValue": "{lcoeff}/{scoeff}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": false, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "{-ccoeff}/{scoeff}", "minValue": "{-ccoeff}/{scoeff}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "{lcoeff^2}/{4*scoeff^2}", "minValue": "{lcoeff^2}/{4*scoeff^2}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": false, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "{argtop}/{argbot}", "minValue": "{argtop}/{argbot}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "{lcoeff}/{2*scoeff}", "minValue": "{lcoeff}/{2*scoeff}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "{sqrtargtop}/{sqrtargbot}", "minValue": "{sqrtargtop}/{sqrtargbot}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "set({-c}/{a},{-d}/{b})", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "extensions": [], "statement": "", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "d": {"definition": "if(c*b=a*dd,dd+1,dd)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "sqrtargtop": {"definition": "sqrt(argtop)", "templateType": "anything", "group": "Ungrouped variables", "name": "sqrtargtop", "description": ""}, "dd": {"definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "dd", "description": ""}, "ccoeff": {"definition": "c*d", "templateType": "anything", "group": "Ungrouped variables", "name": "ccoeff", "description": ""}, "argbot": {"definition": "4*scoeff^2", "templateType": "anything", "group": "Ungrouped variables", "name": "argbot", "description": ""}, "sqrtargbot": {"definition": "sqrt(argbot)", "templateType": "anything", "group": "Ungrouped variables", "name": "sqrtargbot", "description": ""}, "argtop": {"definition": "lcoeff^2-4*ccoeff*scoeff", "templateType": "anything", "group": "Ungrouped variables", "name": "argtop", "description": ""}, "lcoeff": {"definition": "a*d+b*c", "templateType": "anything", "group": "Ungrouped variables", "name": "lcoeff", "description": ""}, "lengthdet": {"definition": "abs(a*d-b*c)", "templateType": "anything", "group": "Ungrouped variables", "name": "lengthdet", "description": ""}, "div": {"definition": "lcoeff/scoeff", "templateType": "anything", "group": "Ungrouped variables", "name": "div", "description": ""}, "scoeff": {"definition": "a*b", "templateType": "anything", "group": "Ungrouped variables", "name": "scoeff", "description": ""}, "disc": {"definition": "(lcoeff^2-4*scoeff*ccoeff)", "templateType": "anything", "group": "Ungrouped variables", "name": "disc", "description": ""}}, "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}