// 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, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Solving a quadratic by using the quadratic formula", "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": ""}, "ungrouped_variables": ["a", "b", "c", "dd", "d", "scoeff", "lcoeff", "ccoeff", "disc", "lengthdet"], "extensions": [], "type": "question", "statement": "", "variable_groups": [], "functions": {}, "variables": {"scoeff": {"templateType": "anything", "name": "scoeff", "description": "", "group": "Ungrouped variables", "definition": "a*b"}, "b": {"templateType": "anything", "name": "b", "description": "", "group": "Ungrouped variables", "definition": "random(2..5)"}, "lengthdet": {"templateType": "anything", "name": "lengthdet", "description": "", "group": "Ungrouped variables", "definition": "abs(a*d-b*c)"}, "dd": {"templateType": "anything", "name": "dd", "description": "", "group": "Ungrouped variables", "definition": "random(2..5)"}, "lcoeff": {"templateType": "anything", "name": "lcoeff", "description": "", "group": "Ungrouped variables", "definition": "a*d+b*c"}, "d": {"templateType": "anything", "name": "d", "description": "", "group": "Ungrouped variables", "definition": "if(c*b=a*dd,dd+1,dd)"}, "ccoeff": {"templateType": "anything", "name": "ccoeff", "description": "", "group": "Ungrouped variables", "definition": "c*d"}, "disc": {"templateType": "anything", "name": "disc", "description": "", "group": "Ungrouped variables", "definition": "lcoeff^2-4*scoeff*ccoeff"}, "a": {"templateType": "anything", "name": "a", "description": "", "group": "Ungrouped variables", "definition": "random(2..5)"}, "c": {"templateType": "anything", "name": "c", "description": "", "group": "Ungrouped variables", "definition": "random(2..5)"}}, "tags": ["formula", "quadratic", "quadratics", "roots", "solving"], "parts": [{"variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showFeedbackIcon": true, "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

\n

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

", "showCorrectAnswer": true, "stepsPenalty": "2", "type": "gapfill", "marks": 0, "gaps": [{"variableReplacements": [], "minValue": "({-lcoeff}-{sqrt(disc)})/{2*scoeff}", "type": "numberentry", "maxValue": "({-lcoeff}-{sqrt(disc)})/{2*scoeff}", "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "correctAnswerFraction": true, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "mustBeReduced": false, "allowFractions": true, "mustBeReducedPC": 0, "showCorrectAnswer": true, "scripts": {}, "marks": 1}, {"variableReplacements": [], "minValue": "({-lcoeff}+{sqrt(disc)})/(2*scoeff)", "type": "numberentry", "maxValue": "({-lcoeff}+{sqrt(disc)})/(2*scoeff)", "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "correctAnswerFraction": true, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "mustBeReduced": false, "allowFractions": true, "mustBeReducedPC": 0, "showCorrectAnswer": true, "scripts": {}, "marks": 1}], "scripts": {}, "steps": [{"variableReplacements": [], "showFeedbackIcon": true, "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\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, "type": "information", "scripts": {}, "variableReplacementStrategy": "originalfirst", "marks": 0}]}], "variablesTest": {"condition": "", "maxRuns": 100}, "preamble": {"js": "", "css": ""}, "rulesets": {}, "advice": "", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}