// Numbas version: exam_results_page_options {"name": "Solving a quadratic ( formula)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"preamble": {"css": "", "js": ""}, "variables": {"disc": {"templateType": "anything", "definition": "lcoeff^2-4*scoeff*ccoeff", "name": "disc", "group": "Ungrouped variables", "description": ""}, "ccoeff": {"templateType": "anything", "definition": "c*d", "name": "ccoeff", "group": "Ungrouped variables", "description": ""}, "lengthdet": {"templateType": "anything", "definition": "abs(a*d-b*c)", "name": "lengthdet", "group": "Ungrouped variables", "description": ""}, "scoeff": {"templateType": "anything", "definition": "a*b", "name": "scoeff", "group": "Ungrouped variables", "description": ""}, "c": {"templateType": "anything", "definition": "random(2..5)", "name": "c", "group": "Ungrouped variables", "description": ""}, "lcoeff": {"templateType": "anything", "definition": "a*d+b*c", "name": "lcoeff", "group": "Ungrouped variables", "description": ""}, "dd": {"templateType": "anything", "definition": "random(2..5)", "name": "dd", "group": "Ungrouped variables", "description": ""}, "a": {"templateType": "anything", "definition": "random(2..5)", "name": "a", "group": "Ungrouped variables", "description": ""}, "b": {"templateType": "anything", "definition": "random(2..5)", "name": "b", "group": "Ungrouped variables", "description": ""}, "d": {"templateType": "anything", "definition": "if(c*b=a*dd,dd+1,dd)", "name": "d", "group": "Ungrouped variables", "description": ""}}, "advice": "", "tags": [], "rulesets": {}, "parts": [{"extendBaseMarkingAlgorithm": 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.

", "showFeedbackIcon": true, "sortAnswers": false, "variableReplacementStrategy": "originalfirst", "stepsPenalty": "", "type": "gapfill", "variableReplacements": [], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "gaps": [{"maxValue": "({-lcoeff}-{sqrt(disc)})/{2*scoeff}", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "mustBeReducedPC": 0, "mustBeReduced": false, "showFeedbackIcon": true, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "type": "numberentry", "variableReplacements": [], "scripts": {}, "correctAnswerFraction": true, "notationStyles": ["plain", "en", "si-en"], "marks": 1, "allowFractions": true, "showCorrectAnswer": true, "minValue": "({-lcoeff}-{sqrt(disc)})/{2*scoeff}", "unitTests": []}, {"maxValue": "({-lcoeff}+{sqrt(disc)})/(2*scoeff)", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "mustBeReducedPC": 0, "mustBeReduced": false, "showFeedbackIcon": true, "correctAnswerStyle": "plain", "variableReplacementStrategy": "originalfirst", "type": "numberentry", "variableReplacements": [], "scripts": {}, "correctAnswerFraction": true, "notationStyles": ["plain", "en", "si-en"], "marks": 1, "allowFractions": true, "showCorrectAnswer": true, "minValue": "({-lcoeff}+{sqrt(disc)})/(2*scoeff)", "unitTests": []}], "customMarkingAlgorithm": "", "steps": [{"marks": 0, "variableReplacements": [], "scripts": {}, "extendBaseMarkingAlgorithm": true, "type": "information", "showFeedbackIcon": true, "showCorrectAnswer": 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

 

", "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "unitTests": []}], "unitTests": []}], "variable_groups": [], "statement": "", "variablesTest": {"condition": "", "maxRuns": 100}, "name": "Solving a quadratic ( formula)", "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "extensions": [], "functions": {}, "ungrouped_variables": ["a", "b", "c", "dd", "d", "scoeff", "lcoeff", "ccoeff", "disc", "lengthdet"], "type": "question", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "heike hoffmann", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2960/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "heike hoffmann", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2960/"}]}