// Numbas version: finer_feedback_settings {"name": "Christopher's copy of Solve a quadratic with the 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": ""}, "variables": {"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))", "name": "c1", "group": "Ungrouped variables", "templateType": "anything", "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. ')", "name": "rdis", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "s1": {"definition": "random(1,-1)", "name": "s1", "group": "Ungrouped variables", "templateType": "anything", "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))", "name": "d1", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "disc": {"definition": "(b*c+a*d)^2-4*a*b*c*d", "name": "disc", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "a": {"definition": "random(2..5)", "name": "a", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "c": {"definition": "c1*s3", "name": "c", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "n5": {"definition": "a*b", "name": "n5", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "f": {"definition": "a*b", "name": "f", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "n4": {"definition": "abs(n2)", "name": "n4", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "b": {"definition": "random(1..4)", "name": "b", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "rep": {"definition": "switch(disc=0,'repeated', ' ')", "name": "rep", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "s2": {"definition": "random(1,-1)", "name": "s2", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "d": {"definition": "if((a*d1)^2=(b*c)^2, max(d1+1,random(1..5))*s3,d1*s3)", "name": "d", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "s3": {"definition": "random(1,-1)", "name": "s3", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "n1": {"definition": "b*c+a*d", "name": "n1", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "n2": {"definition": "b*c-a*d", "name": "n2", "group": "Ungrouped variables", "templateType": "anything", "description": ""}, "n3": {"definition": "2*a*b", "name": "n3", "group": "Ungrouped variables", "templateType": "anything", "description": ""}}, "parts": [{"variableReplacements": [], "showCorrectAnswer": true, "sortAnswers": true, "unitTests": [], "steps": [{"variableReplacements": [], "showFeedbackIcon": true, "customMarkingAlgorithm": "", "scripts": {}, "type": "information", "marks": 0, "unitTests": [], "showCorrectAnswer": true, "prompt": "
Finding the roots by factorisation.
\nFinding 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$ immediately.
\nIf you cannot find a factorisation then there are several other methods you can use.
\nUsing the formula for the roots.
\nYou can find the roots by using the formula for finding the roots of a general quadratic equation $ax^2+bx+c=0$
\nThe 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$
1. $\\Delta \\gt 0$. The roots are real and distinct
\n2. $\\Delta=0$. The roots are real and equal. Their value is $\\displaystyle \\frac{-b}{2a}$
\n3. $\\Delta \\lt 0$. There are no real roots. The root are complex and form a complex conjugate pair.
\n", "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true}], "prompt": "
Solve for $x$:
\n\\[\\simplify[std]{{a*b} * x ^ 2 + ( {-b*c-a * d}) * x + {c * d}}=0\\]
\n$x=$ [[0]] or [[1]].
\nYou can get more information on solving a quadratic by clicking on Show steps. You will lose 1 mark if you do so.
\nEnter the roots as fractions or integers, not as decimals.
", "showFeedbackIcon": true, "scripts": {}, "customMarkingAlgorithm": "", "stepsPenalty": 1, "type": "gapfill", "marks": 0, "variableReplacementStrategy": "originalfirst", "gaps": [{"variableReplacements": [], "showCorrectAnswer": true, "showPreview": true, "vsetRangePoints": 5, "answerSimplification": "std", "notallowed": {"showStrings": false, "message": "Input numbers as fractions or integers not as a decimals.
", "strings": ["."], "partialCredit": 0}, "unitTests": [], "scripts": {}, "expectedVariableNames": [], "answer": "{n1-n4}/{2*a*b}", "customMarkingAlgorithm": "", "checkingType": "absdiff", "failureRate": 1, "vsetRange": [0, 1], "type": "jme", "checkingAccuracy": 0.001, "marks": 1, "showFeedbackIcon": true, "checkVariableNames": false, "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true}, {"variableReplacements": [], "showCorrectAnswer": true, "showPreview": true, "vsetRangePoints": 5, "answerSimplification": "std", "notallowed": {"showStrings": false, "message": "Input numbers as fractions or integers not as a decimals.
", "strings": ["."], "partialCredit": 0}, "unitTests": [], "scripts": {}, "expectedVariableNames": [], "answer": "{n1+n4}/{2*a*b}", "customMarkingAlgorithm": "", "checkingType": "absdiff", "failureRate": 1, "vsetRange": [0, 1], "type": "jme", "checkingAccuracy": 0.001, "marks": 1, "showFeedbackIcon": true, "checkVariableNames": false, "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true}], "extendBaseMarkingAlgorithm": true}], "extensions": [], "preamble": {"js": "", "css": ""}, "statement": "Find the roots of the following quadratic equation.
", "functions": {}, "name": "Christopher's copy of Solve a quadratic with the formula", "variable_groups": [], "tags": ["Algebra", "algebra", "checked2015", "Factorisation", "factorisation", "find roots of a quadratic equation", "quadratic formula", "Quadratic formula", "quadratics", "roots of a quadratic equation", "solving a quadratic equation", "Solving equations", "solving equations", "steps", "Steps"], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Solve for $x$: $\\displaystyle ax ^ 2 + bx + c=0$.
"}, "advice": "\n\tDirect Factorisation
\n\tIf you can spot a direct factorisation then this is the quickest way to do this question.
\n\tFor this example we have the factorisation
\n\t\\[\\simplify{{a*b} * x ^ 2 + ( {-b*c-a * d}) * x + {c * d} = ({a} * x + { -c}) * ({b} * x + { -d})}\\]
\n\tHence we find the roots:
\\[\\begin{eqnarray} x&=& \\simplify{{n1-n4}/{2*a*b}}\\\\ x&=& \\simplify{{n1+n4}/{2*a*b}} \\end{eqnarray} \\]
Other Methods.
\n\tThere are several methods of finding the roots – here are the main methods.
\n\tFinding the roots of a quadratic using the standard formula.
\n\tWe can use the following formula for finding the roots of a general quadratic equation $ax^2+bx+c=0$
\n\tThe two roots are
\n\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$
1. $\\Delta \\gt 0$. The roots are real and distinct
\n\t2. $\\Delta=0$. The roots are real and equal. Their common value is $\\displaystyle -\\frac{b}{2a}$
\n\t3. $\\Delta \\lt 0$. There are no real roots. The root are complex and form a complex conjugate pair.
\n\tFor 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\t{rdis}.
\n\tSo the {rep} roots are:
\n\t\\[\\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\tCompleting the square.
\n\tFirst 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}\\]