// Numbas version: exam_results_page_options {"name": "Week 6: Quadratic formula", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variablesTest": {"maxRuns": 100, "condition": ""}, "extensions": [], "statement": "", "tags": [], "preamble": {"css": "", "js": ""}, "functions": {}, "variables": {"dd": {"templateType": "anything", "description": "", "definition": "random(2..5)", "name": "dd", "group": "Ungrouped variables"}, "b": {"templateType": "anything", "description": "", "definition": "random(2..5)", "name": "b", "group": "Ungrouped variables"}, "lcoeff": {"templateType": "anything", "description": "", "definition": "a*d+b*c", "name": "lcoeff", "group": "Ungrouped variables"}, "a": {"templateType": "anything", "description": "", "definition": "random(2..5)", "name": "a", "group": "Ungrouped variables"}, "c": {"templateType": "anything", "description": "", "definition": "random(2..5)", "name": "c", "group": "Ungrouped variables"}, "d": {"templateType": "anything", "description": "", "definition": "if(c*b=a*dd,dd+1,dd)", "name": "d", "group": "Ungrouped variables"}, "scoeff": {"templateType": "anything", "description": "", "definition": "a*b", "name": "scoeff", "group": "Ungrouped variables"}, "ccoeff": {"templateType": "anything", "description": "", "definition": "c*d", "name": "ccoeff", "group": "Ungrouped variables"}, "disc": {"templateType": "anything", "description": "", "definition": "lcoeff^2-4*scoeff*ccoeff", "name": "disc", "group": "Ungrouped variables"}, "lengthdet": {"templateType": "anything", "description": "", "definition": "abs(a*d-b*c)", "name": "lengthdet", "group": "Ungrouped variables"}}, "variable_groups": [], "rulesets": {}, "advice": "", "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "name": "Week 6: Quadratic formula", "parts": [{"steps": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "marks": 0, "variableReplacements": [], "type": "information", "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

 

", "showFeedbackIcon": true}], "variableReplacementStrategy": "originalfirst", "scripts": {}, "marks": 0, "variableReplacements": [], "showCorrectAnswer": true, "type": "gapfill", "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.

", "stepsPenalty": "2", "showFeedbackIcon": true, "gaps": [{"notationStyles": ["plain", "en", "si-en"], "scripts": {}, "variableReplacements": [], "showCorrectAnswer": true, "type": "numberentry", "allowFractions": true, "correctAnswerStyle": "plain", "showFeedbackIcon": true, "mustBeReduced": false, "marks": 1, "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "maxValue": "({-lcoeff}-{sqrt(disc)})/{2*scoeff}", "minValue": "({-lcoeff}-{sqrt(disc)})/{2*scoeff}", "correctAnswerFraction": true}, {"notationStyles": ["plain", "en", "si-en"], "scripts": {}, "variableReplacements": [], "showCorrectAnswer": true, "type": "numberentry", "allowFractions": true, "correctAnswerStyle": "plain", "showFeedbackIcon": true, "mustBeReduced": false, "marks": 1, "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "maxValue": "({-lcoeff}+{sqrt(disc)})/(2*scoeff)", "minValue": "({-lcoeff}+{sqrt(disc)})/(2*scoeff)", "correctAnswerFraction": true}]}], "ungrouped_variables": ["a", "b", "c", "dd", "d", "scoeff", "lcoeff", "ccoeff", "disc", "lengthdet"], "type": "question", "contributors": [{"name": "Ashley Cusack", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1818/"}]}]}], "contributors": [{"name": "Ashley Cusack", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1818/"}]}