// Numbas version: exam_results_page_options {"name": "Solve a quadratic with the a-b-c-formula (the quadratic formula) ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a", "c", "b", "d", "f", "s3", "s2", "s1", "n4", "n2", "disc", "rdis", "n1", "rep", "n3", "c1", "n5", "d1"], "name": "Solve a quadratic with the a-b-c-formula (the quadratic formula) ", "tags": [], "preamble": {"css": "", "js": ""}, "advice": "

\n

\n

Direct Factorisation

\n

If you can spot a direct factorisation then this is the quickest way to do this question.

\n

For this example we have the factorisation

\n

\\[\\simplify{{a*b} * x ^ 2 + ( {-b*c-a * d}) * x + {c * d} = ({a} * x + { -c}) * ({b} * x + { -d})}\\]

\n

Hence we find the roots:
\\[\\begin{eqnarray} x&=& \\simplify{{n1-n4}/{2*a*b}}\\\\ x&=& \\simplify{{n1+n4}/{2*a*b}} \\end{eqnarray} \\]

\n

Other Methods.

\n

There are several methods of finding the roots – here are the main methods.

\n

Finding the roots of a quadratic using the standard formula.

\n

We can use the following formula for finding the roots of a general quadratic equation $ax^2+bx+c=0$

\n

The two roots are

\n

\\[ x = \\frac{-b +\\sqrt{b^2-4ac}}{2a}\\mbox{ and } x = \\frac{-b -\\sqrt{b^2-4ac}}{2a}\\]
there are three main types of solutions depending upon the value of the discriminant $\\Delta=b^2-4ac$

\n

1. $\\Delta \\gt 0$. The roots are real and distinct

\n

2. $\\Delta=0$. The roots are real and equal. Their common value is $\\displaystyle -\\frac{b}{2a}$

\n

3. $\\Delta \\lt 0$. There are no real roots. The root are complex and form a complex conjugate pair.

\n

For this question the discriminant of $\\simplify{{a*b}x^2+{-b*c-a*d}x+{c*d}}$ is $\\Delta = \\simplify[std]{{-n1}^2-4*{a*b*c*d}}=\\var{disc}$

\n

{rdis}.

\n

So the {rep} roots are:

\n

\\[\\begin{eqnarray} x = \\frac{\\var{n1} - \\sqrt{\\var{disc}}}{\\var{n3}} &=& \\frac{\\var{n1} - \\var{n4} }{\\var{n3}} &=& \\simplify{{n1 - n4}/ {n3}}\\\\ x = \\frac{\\var{n1} + \\sqrt{\\var{disc}}}{\\var{n3}} &=& \\frac{\\var{n1} + \\var{n4} }{\\var{n3}} &=& \\simplify{{n1 + n4}/ {n3}} \\end{eqnarray}\\]

\n

Completing the square.

\n

First we complete the square for the quadratic expression $\\simplify{{a*b}x^2+{-n1}x+{c*d}}$
\\[\\begin{eqnarray} \\simplify{{a*b}x^2+{-n1}x+{c*d}}&=&\\var{n5}\\left(\\simplify{x^2+({-n1}/{a*b})x+ {c*d}/{a*b}}\\right)\\\\ &=&\\var{n5}\\left(\\left(\\simplify{x+({-n1}/{2*a*b})}\\right)^2+ \\simplify{{c*d}/{a*b}-({-n1}/({2*a*b}))^2}\\right)\\\\ &=&\\var{n5}\\left(\\left(\\simplify{x+({-n1}/{2*a*b})}\\right)^2 -\\simplify{ {n2^2}/{4*(a*b)^2}}\\right) \\end{eqnarray} \\]
So to solve $\\simplify{{a*b}x^2+{-n1}x+{c*d}}=0$ we have to solve:
\\[\\begin{eqnarray} \\left(\\simplify{x+({-n1}/{2*a*b})}\\right)^2&\\phantom{{}}& -\\simplify{ {n2^2}/{4*(a*b)^2}}=0\\Rightarrow\\\\ \\left(\\simplify{x+({-n1}/{2*a*b})}\\right)^2&\\phantom{{}}&=\\simplify{ {n2^2}/{4*(a*b)^2}=({abs(n2)}/{2*a*b})^2} \\end{eqnarray}\\]
So we get the two {rep} solutions:
\\[\\begin{eqnarray} \\simplify{x+({-n1}/{2*a*b})}&=&\\simplify{-{abs(n2)}/{2*a*b}} \\Rightarrow &x& = \\simplify{({-abs(n2)+n1}/{2*a*b})}\\\\ \\simplify{x+({-n1}/{2*a*b})}&=&\\simplify{({abs(n2)}/{2*a*b})} \\Rightarrow &x& = \\simplify{({n1+abs(n2)}/{2*a*b})} \\end{eqnarray}\\]

", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "parts": [{"stepsPenalty": 1, "prompt": "

Solve for $x$:  \\[\\simplify[std]{{a*b} * x ^ 2 + ( {-b*c-a * d}) * x + {c * d}}=0\\]
The least root is $x=\\;$ [[0]]. The greatest root is $x=\\;$ [[1]].

\n

You can get more information on solving a quadratic by clicking on \"Show steps\". You will lose 1 mark if you do so.

\n

Enter the least root first. If the roots are equal, enter the root in both input boxes.

\n

Enter the roots as fractions or integers, not as decimals.

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "steps": [{"prompt": "\n\t\t\t\t\t

Finding the roots by factorisation.

\n\t\t\t\t\t

Finding a factorisation of a quadratic $q(x)=a(x-r)(x-s)$ where $a$ is the coefficient of $x^2$ gives the roots $x=r$, $x=s$ immendiately.

\n\t\t\t\t\t

If you cannot find a factorisation then there are several other methods you can use.

\n\t\t\t\t\t

Using the formula for the roots.

\n\t\t\t\t\t

You can find the roots by using the formula for finding the roots of a general quadratic equation $ax^2+bx+c=0$

\n\t\t\t\t\t

The two roots are:

\n\t\t\t\t\t

\\[ x = \\frac{-b +\\sqrt{b^2-4ac}}{2a}\\mbox{ and } x = \\frac{-b -\\sqrt{b^2-4ac}}{2a}\\]
there are three main types of solutions depending upon the value of the discriminant $\\Delta=b^2-4ac$

\n\t\t\t\t\t

1. $\\Delta \\gt 0$. The roots are real and distinct

\n\t\t\t\t\t

2. $\\Delta=0$. The roots are real and equal. Their value is $\\displaystyle \\frac{-b}{2a}$

\n\t\t\t\t\t

3. $\\Delta \\lt 0$. There are no real roots. The root are complex and form a complex conjugate pair.

\n\t\t\t\t\t

 

\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "gaps": [{"notallowed": {"message": "

Input numbers as fractions or integers not as a decimals.

", "showStrings": false, "strings": ["."], "partialCredit": 0}, "vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.0001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "{n1-n4}/{2*a*b}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"notallowed": {"message": "

Input numbers as fractions or integers not as a decimals.

", "showStrings": false, "strings": ["."], "partialCredit": 0}, "vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.0001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "{n1+n4}/{2*a*b}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "extensions": [], "statement": "

Find the roots of the following quadratic equation.

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "c1*s3", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "random(1..4)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "d": {"definition": "if((a*d1)^2=(b*c)^2, max(d1+1,random(1..5))*s3,d1*s3)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "f": {"definition": "a*b", "templateType": "anything", "group": "Ungrouped variables", "name": "f", "description": ""}, "s3": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s3", "description": ""}, "s2": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s2", "description": ""}, "s1": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s1", "description": ""}, "n5": {"definition": "a*b", "templateType": "anything", "group": "Ungrouped variables", "name": "n5", "description": ""}, "disc": {"definition": "(b*c+a*d)^2-4*a*b*c*d", "templateType": "anything", "group": "Ungrouped variables", "name": "disc", "description": ""}, "c1": {"definition": "switch(f=1, random(1..6),f=2,random(1,3,5,7,9),f=3,random(1,2,5,7,8),f=4,random(1,3,5,7,9),f=6, random(1,5,7,8),f=9,random(1,2,4,7,8),f=8,random(1,3,5,7,9),f=12,random(1,5,7),random(1,3,5,7))", "templateType": "anything", "group": "Ungrouped variables", "name": "c1", "description": ""}, "rep": {"definition": "switch(disc=0,'repeated', ' ')", "templateType": "anything", "group": "Ungrouped variables", "name": "rep", "description": ""}, "n1": {"definition": "b*c+a*d", "templateType": "anything", "group": "Ungrouped variables", "name": "n1", "description": ""}, "n2": {"definition": "b*c-a*d", "templateType": "anything", "group": "Ungrouped variables", "name": "n2", "description": ""}, "n3": {"definition": "2*a*b", "templateType": "anything", "group": "Ungrouped variables", "name": "n3", "description": ""}, "n4": {"definition": "abs(n2)", "templateType": "anything", "group": "Ungrouped variables", "name": "n4", "description": ""}, "rdis": {"definition": "switch(disc=0,'The discriminant is '+ 0+' and so we get two repeated roots in this case.',disc<0, 'There are no real roots.','The roots exist and are distinct. ')", "templateType": "anything", "group": "Ungrouped variables", "name": "rdis", "description": ""}, "d1": {"definition": "switch(f=1, random(1..6),f=2,random(1,3,5,7,9),f=3,random(1,2,5,7,8),f=4,random(1,3,5,7,9),f=6, random(1,5,7,8),f=9,random(1,2,4,7,8),f=8,random(1,3,5,7,9),f=12,random(1,5,7),random(1,3,5,7))", "templateType": "anything", "group": "Ungrouped variables", "name": "d1", "description": ""}}, "metadata": {"description": "

Solve for $x$: $\\displaystyle ax ^ 2 + bx + c=0$.

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Richard Miles", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/882/"}]}]}], "contributors": [{"name": "Richard Miles", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/882/"}]}