// Numbas version: finer_feedback_settings {"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": [{"name": "Solving a quadratic by completing the square", "tags": ["completing the square", "formula", "quadratic", "quadratics", "roots", "solving"], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "if(c*b=a*dd,dd+1,dd)", "description": "", "templateType": "anything", "can_override": false}, "sqrtargtop": {"name": "sqrtargtop", "group": "Ungrouped variables", "definition": "sqrt(argtop)", "description": "", "templateType": "anything", "can_override": false}, "dd": {"name": "dd", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "ccoeff": {"name": "ccoeff", "group": "Ungrouped variables", "definition": "c*d", "description": "", "templateType": "anything", "can_override": false}, "argbot": {"name": "argbot", "group": "Ungrouped variables", "definition": "4*scoeff^2", "description": "", "templateType": "anything", "can_override": false}, "sqrtargbot": {"name": "sqrtargbot", "group": "Ungrouped variables", "definition": "sqrt(argbot)", "description": "", "templateType": "anything", "can_override": false}, "argtop": {"name": "argtop", "group": "Ungrouped variables", "definition": "lcoeff^2-4*ccoeff*scoeff", "description": "", "templateType": "anything", "can_override": false}, "lcoeff": {"name": "lcoeff", "group": "Ungrouped variables", "definition": "a*d+b*c", "description": "", "templateType": "anything", "can_override": false}, "lengthdet": {"name": "lengthdet", "group": "Ungrouped variables", "definition": "abs(a*d-b*c)", "description": "", "templateType": "anything", "can_override": false}, "div": {"name": "div", "group": "Ungrouped variables", "definition": "lcoeff/scoeff", "description": "", "templateType": "anything", "can_override": false}, "scoeff": {"name": "scoeff", "group": "Ungrouped variables", "definition": "a*b", "description": "", "templateType": "anything", "can_override": false}, "disc": {"name": "disc", "group": "Ungrouped variables", "definition": "(lcoeff^2-4*scoeff*ccoeff)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "dd", "d", "scoeff", "lcoeff", "ccoeff", "disc", "lengthdet", "div", "argtop", "argbot", "sqrtargtop", "sqrtargbot"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "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", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "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)$.
"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{-ccoeff}", "maxValue": "{-ccoeff}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{lcoeff}/{scoeff}", "maxValue": "{lcoeff}/{scoeff}", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{-ccoeff}/{scoeff}", "maxValue": "{-ccoeff}/{scoeff}", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{lcoeff^2}/{4*scoeff^2}", "maxValue": "{lcoeff^2}/{4*scoeff^2}", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{argtop}/{argbot}", "maxValue": "{argtop}/{argbot}", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{lcoeff}/{2*scoeff}", "maxValue": "{lcoeff}/{2*scoeff}", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{sqrtargtop}/{sqrtargbot}", "maxValue": "{sqrtargtop}/{sqrtargbot}", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "set({-c}/{a},{-d}/{b})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "resources": []}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}