// Numbas version: exam_results_page_options {"name": "Solving a quadratic by using the quadratic formula", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "", "variables": {"d": {"description": "", "templateType": "anything", "definition": "if(c*b=a*dd,dd+1,dd)", "group": "Ungrouped variables", "name": "d"}, "ccoeff": {"description": "", "templateType": "anything", "definition": "c*d", "group": "Ungrouped variables", "name": "ccoeff"}, "c": {"description": "", "templateType": "anything", "definition": "random(2..5)", "group": "Ungrouped variables", "name": "c"}, "scoeff": {"description": "", "templateType": "anything", "definition": "a*b", "group": "Ungrouped variables", "name": "scoeff"}, "lengthdet": {"description": "", "templateType": "anything", "definition": "abs(a*d-b*c)", "group": "Ungrouped variables", "name": "lengthdet"}, "lcoeff": {"description": "", "templateType": "anything", "definition": "a*d+b*c", "group": "Ungrouped variables", "name": "lcoeff"}, "b": {"description": "", "templateType": "anything", "definition": "random(2..5)", "group": "Ungrouped variables", "name": "b"}, "disc": {"description": "", "templateType": "anything", "definition": "lcoeff^2-4*scoeff*ccoeff", "group": "Ungrouped variables", "name": "disc"}, "a": {"description": "", "templateType": "anything", "definition": "random(2..5)", "group": "Ungrouped variables", "name": "a"}, "dd": {"description": "", "templateType": "anything", "definition": "random(2..5)", "group": "Ungrouped variables", "name": "dd"}}, "rulesets": {}, "extensions": [], "tags": ["formula", "quadratic", "quadratics", "roots", "solving"], "statement": "", "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "name": "Solving a quadratic by using the quadratic formula", "parts": [{"variableReplacementStrategy": "originalfirst", "steps": [{"showFeedbackIcon": true, "marks": 0, "prompt": "

\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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
 $x$ $=$ $\\displaystyle{\\frac{-(\\var{lcoeff})\\pm\\sqrt{(\\var{lcoeff})^2-4(\\var{scoeff})(\\var{ccoeff})}}{2(\\var{scoeff})}}$ $=$ $\\displaystyle{\\frac{\\var{-lcoeff}\\pm\\sqrt{\\var{lcoeff^2}-(\\var{4*scoeff*ccoeff})}}{\\var{2*scoeff}}}$ $=$ $\\displaystyle{\\frac{\\var{-lcoeff}\\pm\\sqrt{\\var{disc}}}{\\var{2*scoeff}}}$ $=$ $\\displaystyle{\\frac{\\var{-lcoeff}\\pm\\var{lengthdet}}{\\var{2*scoeff}}}$ $=$ $\\displaystyle{\\frac{\\var{-lcoeff-lengthdet}}{\\var{2*scoeff}},\\,\\,\\frac{\\var{-lcoeff+lengthdet}}{\\var{2*scoeff}}}$ $=$ $\\displaystyle{\\simplify{({-lcoeff}-{sqrt(disc)})/(2*{scoeff})},\\,\\,\\simplify{({-lcoeff}+{sqrt(disc)})/(2*{scoeff})}}$
\n

", "showCorrectAnswer": true, "variableReplacements": [], "scripts": {}, "type": "information", "variableReplacementStrategy": "originalfirst"}], "scripts": {}, "stepsPenalty": "2", "marks": 0, "showFeedbackIcon": true, "showCorrectAnswer": true, "variableReplacements": [], "gaps": [{"scripts": {}, "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": true, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "minValue": "({-lcoeff}-{sqrt(disc)})/{2*scoeff}", "correctAnswerStyle": "plain", "maxValue": "({-lcoeff}-{sqrt(disc)})/{2*scoeff}", "showFeedbackIcon": true, "marks": 1, "mustBeReduced": false, "variableReplacements": [], "showCorrectAnswer": true, "mustBeReducedPC": 0, "allowFractions": true}, {"scripts": {}, "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": true, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "minValue": "({-lcoeff}+{sqrt(disc)})/(2*scoeff)", "correctAnswerStyle": "plain", "maxValue": "({-lcoeff}+{sqrt(disc)})/(2*scoeff)", "showFeedbackIcon": true, "marks": 1, "mustBeReduced": false, "variableReplacements": [], "showCorrectAnswer": true, "mustBeReducedPC": 0, "allowFractions": true}], "type": "gapfill", "prompt": "

\n

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

\n

\n

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

\n

\n

Note: Put the smallest value (the one with the negative in front of the square root) in the first gap.

"}], "variable_groups": [], "functions": {}, "ungrouped_variables": ["a", "b", "c", "dd", "d", "scoeff", "lcoeff", "ccoeff", "disc", "lengthdet"], "preamble": {"js": "", "css": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question", "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/"}]}