// Numbas version: exam_results_page_options {"name": "Solving a quadratic by using the quadratic formula - integer coefficients", "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 using the quadratic formula - integer coefficients", "tags": ["formula", "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}, "constants": [], "variables": {"d": {"name": "d", "group": "Ungrouped variables", "definition": "if(c*b=a*dd,dd+1,dd)", "description": "", "templateType": "anything", "can_override": false}, "ccoeff": {"name": "ccoeff", "group": "Ungrouped variables", "definition": "c*d", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "scoeff": {"name": "scoeff", "group": "Ungrouped variables", "definition": "a*b", "description": "", "templateType": "anything", "can_override": false}, "lcoeff": {"name": "lcoeff", "group": "Ungrouped variables", "definition": "a*d+b*c", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "disc": {"name": "disc", "group": "Ungrouped variables", "definition": "lcoeff^2-4*scoeff*ccoeff", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "dd": {"name": "dd", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "lengthdet": {"name": "lengthdet", "group": "Ungrouped variables", "definition": "abs(a*d-b*c)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "dd", "d", "scoeff", "lcoeff", "ccoeff", "disc", "lengthdet"], "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": "

Use the quadratic formula to solve the following quadratic:

\n

$\\simplify{{scoeff}x^2+{lcoeff}x+{ccoeff}=0}$.

\n

\n

$x=$ [[0]], [[1]]

\n

", "stepsPenalty": "2", "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": "

Given the quadratic

\n

$ax^2+bx+c=0$,

\n

the quadratic formula (which itself is a result of completing the square) is the solution

\n

$x=\\displaystyle{\\frac{-b\\pm\\sqrt{b^2-4ac}}{2a}}$.

\n

\n

For our quadratic $\\simplify{{scoeff}x^2+{lcoeff}x+{ccoeff}=0}$ we have $a=\\var{scoeff}$, $b=\\var{lcoeff}$ and $c=\\var{ccoeff}$, which gives us:

\n

\n

$\\begin{align*}x &=\\frac{-(\\var{lcoeff})\\pm\\sqrt{(\\var{lcoeff})^2-4(\\var{scoeff})(\\var{ccoeff})}}{2(\\var{scoeff})}\\\\
&=\\frac{\\var{-lcoeff}\\pm\\sqrt{\\var{lcoeff^2}-(\\var{4*scoeff*ccoeff})}}{\\var{2*scoeff}}\\\\
&= \\frac{\\var{-lcoeff}\\pm\\sqrt{\\var{disc}}}{\\var{2*scoeff}}\\\\
&= \\frac{\\var{-lcoeff}\\pm\\var{lengthdet}}{\\var{2*scoeff}}\\\\
&= \\frac{\\var{-lcoeff-lengthdet}}{\\var{2*scoeff}},\\,\\,\\frac{\\var{-lcoeff+lengthdet}}{\\var{2*scoeff}}\\\\
&=\\simplify{({-lcoeff}-{sqrt(disc)})/(2*{scoeff})},\\,\\,\\simplify{({-lcoeff}+{sqrt(disc)})/(2*{scoeff})} \\end{align*}$

\n

"}], "gaps": [{"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}-{sqrt(disc)})/{2*scoeff}", "maxValue": "({-lcoeff}-{sqrt(disc)})/{2*scoeff}", "correctAnswerFraction": true, "allowFractions": true, "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": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "({-lcoeff}+{sqrt(disc)})/(2*scoeff)", "maxValue": "({-lcoeff}+{sqrt(disc)})/(2*scoeff)", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "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/"}]}