// Numbas version: exam_results_page_options {"name": "Terry's copy of 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": [{"type": "question", "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "pickQuestions": 0, "name": ""}], "variable_groups": [], "variables": {"div": {"group": "Ungrouped variables", "name": "div", "definition": "lcoeff/scoeff", "templateType": "anything", "description": ""}, "a": {"group": "Ungrouped variables", "name": "a", "definition": "random(2..5)", "templateType": "anything", "description": ""}, "dd": {"group": "Ungrouped variables", "name": "dd", "definition": "random(2..5)", "templateType": "anything", "description": ""}, "lcoeff": {"group": "Ungrouped variables", "name": "lcoeff", "definition": "a*d+b*c", "templateType": "anything", "description": ""}, "disc": {"group": "Ungrouped variables", "name": "disc", "definition": "(lcoeff^2-4*scoeff*ccoeff)", "templateType": "anything", "description": ""}, "argtop": {"group": "Ungrouped variables", "name": "argtop", "definition": "lcoeff^2-4*ccoeff*scoeff", "templateType": "anything", "description": ""}, "sqrtargtop": {"group": "Ungrouped variables", "name": "sqrtargtop", "definition": "sqrt(argtop)", "templateType": "anything", "description": ""}, "lengthdet": {"group": "Ungrouped variables", "name": "lengthdet", "definition": "abs(a*d-b*c)", "templateType": "anything", "description": ""}, "scoeff": {"group": "Ungrouped variables", "name": "scoeff", "definition": "a*b", "templateType": "anything", "description": ""}, "argbot": {"group": "Ungrouped variables", "name": "argbot", "definition": "4*scoeff^2", "templateType": "anything", "description": ""}, "sqrtargbot": {"group": "Ungrouped variables", "name": "sqrtargbot", "definition": "sqrt(argbot)", "templateType": "anything", "description": ""}, "b": {"group": "Ungrouped variables", "name": "b", "definition": "random(2..5)", "templateType": "anything", "description": ""}, "ccoeff": {"group": "Ungrouped variables", "name": "ccoeff", "definition": "c*d", "templateType": "anything", "description": ""}, "d": {"group": "Ungrouped variables", "name": "d", "definition": "if(c*b=a*dd,dd+1,dd)", "templateType": "anything", "description": ""}, "c": {"group": "Ungrouped variables", "name": "c", "definition": "random(2..5)", "templateType": "anything", "description": ""}}, "showQuestionGroupNames": false, "preamble": {"js": "", "css": ""}, "tags": ["completing the square", "formula", "quadratic", "quadratics", "roots", "solving"], "name": "Terry's copy of Solving a quadratic by completing the square", "rulesets": {}, "statement": "", "ungrouped_variables": ["a", "b", "c", "dd", "d", "scoeff", "lcoeff", "ccoeff", "disc", "lengthdet", "div", "argtop", "argbot", "sqrtargtop", "sqrtargbot"], "functions": {}, "extensions": [], "parts": [{"type": "gapfill", "steps": [{"type": "information", "variableReplacements": [], "marks": 0, "showCorrectAnswer": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "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)$.
"}], "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).
", "stepsPenalty": "8", "variableReplacements": [], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "integerPartialCredit": 0, "variableReplacements": [], "maxValue": "{-ccoeff}", "showCorrectAnswer": false, "variableReplacementStrategy": "originalfirst", "showPrecisionHint": false, "type": "numberentry", "correctAnswerFraction": false, "marks": 1, "scripts": {}, "integerAnswer": true, "minValue": "{-ccoeff}"}, {"allowFractions": true, "maxValue": "{lcoeff}/{scoeff}", "variableReplacements": [], "correctAnswerFraction": true, "marks": 1, "type": "numberentry", "showCorrectAnswer": false, "scripts": {}, "variableReplacementStrategy": "originalfirst", "minValue": "{lcoeff}/{scoeff}", "showPrecisionHint": false}, {"allowFractions": true, "maxValue": "{-ccoeff}/{scoeff}", "variableReplacements": [], "correctAnswerFraction": true, "marks": 1, "type": "numberentry", "showCorrectAnswer": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "minValue": "{-ccoeff}/{scoeff}", "showPrecisionHint": false}, {"allowFractions": true, "maxValue": "{lcoeff^2}/{4*scoeff^2}", "variableReplacements": [], "correctAnswerFraction": true, "marks": 1, "type": "numberentry", "showCorrectAnswer": false, "scripts": {}, "variableReplacementStrategy": "originalfirst", "minValue": "{lcoeff^2}/{4*scoeff^2}", "showPrecisionHint": false}, {"allowFractions": true, "maxValue": "{argtop}/{argbot}", "variableReplacements": [], "correctAnswerFraction": true, "marks": 1, "type": "numberentry", "showCorrectAnswer": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "minValue": "{argtop}/{argbot}", "showPrecisionHint": false}, {"allowFractions": true, "maxValue": "{lcoeff}/{2*scoeff}", "variableReplacements": [], "correctAnswerFraction": true, "marks": 1, "type": "numberentry", "showCorrectAnswer": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "minValue": "{lcoeff}/{2*scoeff}", "showPrecisionHint": false}, {"allowFractions": true, "maxValue": "{sqrtargtop}/{sqrtargbot}", "variableReplacements": [], "correctAnswerFraction": true, "marks": 1, "type": "numberentry", "showCorrectAnswer": true, "scripts": {}, "variableReplacementStrategy": "originalfirst", "minValue": "{sqrtargtop}/{sqrtargbot}", "showPrecisionHint": false}, {"vsetrangepoints": 5, "answer": "set({-c}/{a},{-d}/{b})", "variableReplacements": [], "vsetrange": [0, 1], "showCorrectAnswer": true, "checkingaccuracy": 0.001, "showpreview": true, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme", "expectedvariablenames": [], "marks": 1, "scripts": {}, "variableReplacementStrategy": "originalfirst"}]}], "variablesTest": {"maxRuns": 100, "condition": ""}, "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": ""}, "advice": "", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Terry Young", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3130/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Terry Young", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3130/"}]}