// Numbas version: finer_feedback_settings {"name": "Solving quadratics", "duration": 0, "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "allQuestions": true, "shuffleQuestions": false, "percentPass": 0, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "pickQuestions": 0, "navigation": {"onleave": {"action": "none", "message": ""}, "reverse": true, "allowregen": true, "showresultspage": "oncompletion", "preventleave": true, "browse": true, "showfrontpage": true}, "feedback": {"showtotalmark": true, "advicethreshold": 0, "showanswerstate": true, "showactualmark": true, "allowrevealanswer": true, "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "never"}, "type": "exam", "questions": [], "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": [{"name": "Null factor law", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "functions": {}, "ungrouped_variables": ["a", "b", "c", "tworoots", "blist", "d", "f", "g", "h", "j", "k", "l", "plist", "m", "n", "p", "q", "fiveroots"], "tags": ["factorisation", "Factorisation", "factorised", "null factor law", "product", "solving", "zero divisor"], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"stepsPenalty": "1", "prompt": "
Given that $\\displaystyle{(\\simplify{x+{a}})(\\simplify{{b}x+{c}})=0}$. Determine the set of possible values of $x$.
\n$x=$ [[0]]
\nNote: if your answer is $1$ and $2$ input set(1,2)
\n", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "fractionNumbers", "scripts": {}, "answer": "{tworoots}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "steps": [{"prompt": "Notice, this is a quadratic that has already been factorised. You don't need to expand it since we have the null factor law:
\n\\[\\text{If } ab=0, \\text{ then } a=0 \\text{ or } b=0.\\]
\n\nSince
\n\\[(\\simplify{x+{a}})(\\simplify{{b}x+{c}})=0,\\]
\nthis means $\\simplify{x+{a}}=0$ or $\\simplify{{b}x+{c}}=0$. Solving each of these equations gives $x=\\var{-a}$ or $x=\\simplify{-{c}/{b}}$.
\nFor this question, we input our answer as set$\\left(\\var{-a},\\simplify{-{c}/{b}}\\right)$.
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}, {"stepsPenalty": 0, "prompt": "Solve $\\displaystyle{\\simplify{{l}a}(\\simplify{a+{d}})(\\simplify{{f}a+{g}})\\left(\\simplify{{h}a+{j}/{k}}\\right)\\left(\\simplify{{m}a/{n}+{p}/{q}}\\right)=0}$ for $a$.
\n$a=$ [[0]]
\nNote: if your answer is $1$, $2$ and $3$ input set(1,2,3)
\n", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "fractionNumbers", "scripts": {}, "answer": "{fiveroots}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "steps": [{"prompt": "Notice, this expression that has already been factorised. You don't need to expand it since we have the null factor law:
\n\\[\\text{If } ab=0, \\text{ then } a=0 \\text{ or } b=0.\\]
\nSince
\n\\[\\simplify{{l}a}(\\simplify{a+{d}})(\\simplify{{f}a+{g}})\\left(\\simplify{{h}a+{j}/{k}}\\right)\\left(\\simplify{{m}a/{n}+{p}/{q}}\\right)=0,\\]
\nthis means $\\simplify{{l}a}=0$, $\\simplify{a+{d}}=0$, $\\simplify{{f}a+{g}}=0$, $\\simplify{{h}a+{j}/{k}}=0$, or $\\simplify{{m}a/{n}+{p}/{q}}=0$. Solving each of these equations gives $x=0$, $x=\\var{-d}$, $x=\\var[fractionnumbers]{-g/f}$, $x=\\var[fractionnumbers]{-j/(k*h)}$, or $x=\\var[fractionnumbers]{(-p*n)/(q*m)}$.
\nFor this question, we input our answer as set$\\left(0,\\var{-d},\\var[fractionnumbers]{-g/f},\\var[fractionnumbers]{-j/(k*h)},\\var[fractionnumbers]{(-p*n)/(q*m)}\\right)$.
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}], "statement": "", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(-12..12 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "random(-12..12 except [0,a*b])", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "random(2..12)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "d": {"definition": "blist[0]", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "g": {"definition": "blist[2]", "templateType": "anything", "group": "Ungrouped variables", "name": "g", "description": ""}, "f": {"definition": "blist[1]", "templateType": "anything", "group": "Ungrouped variables", "name": "f", "description": ""}, "h": {"definition": "blist[3]", "templateType": "anything", "group": "Ungrouped variables", "name": "h", "description": ""}, "k": {"definition": "abs(j)+1", "templateType": "anything", "group": "Ungrouped variables", "name": "k", "description": ""}, "j": {"definition": "blist[4]", "templateType": "anything", "group": "Ungrouped variables", "name": "j", "description": ""}, "m": {"definition": "(-1)^(random(0,1))*plist[0]", "templateType": "anything", "group": "Ungrouped variables", "name": "m", "description": ""}, "fiveroots": {"definition": "set(0,-d,-g/f,-j/(k*h),(-p*n)/(q*m))", "templateType": "anything", "group": "Ungrouped variables", "name": "fiveroots", "description": ""}, "l": {"definition": "blist[5]", "templateType": "anything", "group": "Ungrouped variables", "name": "l", "description": ""}, "q": {"definition": "plist[3]", "templateType": "anything", "group": "Ungrouped variables", "name": "q", "description": ""}, "p": {"definition": "(-1)^(random(0,1))*plist[2]", "templateType": "anything", "group": "Ungrouped variables", "name": "p", "description": ""}, "blist": {"definition": "shuffle(-12..12 except 0)[0..6]", "templateType": "anything", "group": "Ungrouped variables", "name": "blist", "description": ""}, "tworoots": {"definition": "set(-a,-c/b)", "templateType": "anything", "group": "Ungrouped variables", "name": "tworoots", "description": ""}, "n": {"definition": "plist[1]", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": ""}, "plist": {"definition": "shuffle([2,3,5,7,11,13,19,23,29])[0..4]", "templateType": "anything", "group": "Ungrouped variables", "name": "plist", "description": ""}}, "metadata": {"notes": "", "description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Solving a monic quadratic by factorising", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "functions": {}, "ungrouped_variables": ["a", "b", "linear", "const", "monicsoln"], "tags": ["binomial", "factorisation", "Factorisation", "factorising", "factors", "Factors", "monic", "quadratic", "quadratics", "solving"], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"stepsPenalty": "1", "prompt": "Solve the following quadratic by factorisation:
\n\n | $\\simplify{x^2+{linear}x+{const}}$ | \n$=$ | \n0 | \n
$\\Longrightarrow$ | \n[[0]] | \n$=$ | \n0 | \n
$\\Longrightarrow$ | \n$x$ | \n$=$ | \n[[1]] | \n
Note: In the first gap, enter the quadratic in factored form.
\nNote: In the second gap, if $x=1,2$, enter set(1,2).
\n\n", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"notallowed": {"message": "Ensure you factorise the expression.
", "showStrings": false, "strings": ["xx", "x^2", "x**2"], "partialCredit": 0}, "vsetrangepoints": 5, "expectedvariablenames": ["x"], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "(x+{a})(x+{b})", "marks": 1, "checkvariablenames": true, "checkingtype": "absdiff", "type": "jme", "musthave": {"message": "Ensure you factorise the expression.
", "showStrings": false, "strings": ["(", ")"], "partialCredit": 0}}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{monicsoln}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "steps": [{"prompt": "Since $(x+a)(x+b)=x^2+(a+b)x+ab$, when we are factorising a quadratic, such as $x^2+cx+d$, we must find the numbers $a$ and $b$ such that $c=a+b$ and $d=ab$.
\n\nIn the case of $\\simplify{x^2+{linear}x+{const}}$ we ask
\nwhat two numbers add to give $\\var{linear}$ and multiply to give $\\var{const}$?
\nTherefore the numbers must be $\\var{a}$ and $\\var{b}$, that is
\n$\\simplify{x^2+{linear}x+{const}}=(\\simplify{x+{a}})(\\simplify{x+{b}}).$
\nYou can check this by expanding the binomial product.
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}, {"prompt": "Now, using the null factor law we have, either $\\simplify{x+{a}}=0$ or $\\simplify{x+{b}}=0$. In otherwords, either $x=\\var{-a}$ or $\\var{-b}$.
\n\n\n | $\\simplify{x^2+{linear}x+{const}}$ | \n$=$ | \n0 | \n
$\\Longrightarrow$ | \n$ (\\simplify{x+{a}})(\\simplify{x+{b}})$ | \n$=$ | \n0 | \n
$\\Longrightarrow$ | \n$x$ | \n$=$ | \n$\\var{-a},\\var{-b}$ | \n
Solve the following quadratic by factorisation:
\n\n | $\\simplify{{aa}x^2+{mid}x+{bb}}$ | \n$=$ | \n0 | \n
$\\Longrightarrow$ | \n[[0]] | \n$=$ | \n0 | \n
$\\Longrightarrow$ | \n$x$ | \n$=$ | \n[[1]] | \n
Note: In the first gap, enter the quadratic in factored form.
\nNote: In the second gap, there should only be one solution.
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"notallowed": {"message": "Ensure you factorise the expression.
", "showStrings": false, "strings": ["xx", "x^2", "x**2", "x*x"], "partialCredit": 0}, "vsetrangepoints": 5, "expectedvariablenames": ["x"], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "({gg})({a/g}x+{b/g})^2", "marks": 1, "checkvariablenames": true, "checkingtype": "absdiff", "type": "jme", "musthave": {"message": "Ensure you factorise the expression.
", "showStrings": false, "strings": ["(", ")"], "partialCredit": 0}}, {"allowFractions": true, "variableReplacements": [], "maxValue": "{-b}/{a}", "minValue": "{-b}/{a}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "steps": [{"prompt": "Recall that $(a+b)^2=(a+b)(a+b)=a^2+2ab+b^2$ is called a perfect square.
\nIn fact, $\\simplify{{aa}x^2+{mid}x+{bb}}$ is also a perfect square, since $\\var{aa}x^2=(\\var{a}x)^2$, $\\var{bb}=\\simplify{({b})^2}$, and $\\var{mid}x=2(\\var{a}x)(\\var{b})$.
\nThat is, $\\simplify{{aa}x^2+{mid}x+{bb}}=\\simplify{({a}x+{b})^2}$.
\nNow, since $\\simplify{({a}x+{b})^2}=0$ we can take the (plus or minus) square root of both sides to get $\\simplify{({a}x+{b})}=0$. We can then solve this for $x$ to find $x=\\simplify{-{b}/{a}}$.
\n\nEach bracket has a common factor of $\\var{g}$, so we can move both of them to the front, to write
\n$\\simplify{{aa}x^2+{mid}x+{bb}}=\\simplify{{gg}({a/g}x+{b/g})^2}$.
\nNow, using the null factor law, since $\\simplify{{gg}({a/g}x+{b/g})^2}=0$ we must have $\\simplify{{a/g}x+{b/g}}=0$. We can then solve this for $x$ to find $x=\\simplify{{-b}/{a}}$.
\nSolve the following quadratic by factorisation:
\n\n | $\\simplify{{c[0]^2}/{c[1]^2} x^2+{2c[0]*d}/{(c[1]*c[2])}x+{d^2}/{c[2]^2}}$ | \n$=$ | \n0 | \n
$\\Longrightarrow$ | \n[[0]] | \n$=$ | \n0 | \n
$\\Longrightarrow$ | \n$x$ | \n$=$ | \n[[1]] | \n
Note: In the first gap, enter the quadratic in factored form.
\nNote: In the second gap, there should only be one solution.
\n", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"notallowed": {"message": "Ensure you factorise the expression.
", "showStrings": false, "strings": ["**2", "xx", "x^2", "(x)^2"], "partialCredit": 0}, "vsetrangepoints": 5, "expectedvariablenames": ["x"], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "({c[0]}/{c[1]}x+{d}/{c[2]})^2", "marks": "2", "checkvariablenames": true, "checkingtype": "absdiff", "type": "jme", "musthave": {"message": "Ensure you factorise the expression.
", "showStrings": false, "strings": ["(", ")^2"], "partialCredit": 0}}, {"allowFractions": true, "variableReplacements": [], "maxValue": "{-d*c[1]}/{c[0]*c[2]}", "minValue": "{-d*c[1]}/{c[0]*c[2]}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "steps": [{"prompt": "Recall that $(a+b)^2=(a+b)(a+b)=a^2+2ab+b^2$ is called a perfect square.
\nIn fact, $\\simplify{{c[0]^2}/{c[1]^2} x^2+{2c[0]*d}/{(c[1]*c[2])}x+{d^2}/{c[2]^2}}$ is also a perfect square, since
\nThat is,
\n$\\simplify{{c[0]^2}/{c[1]^2} x^2+{2c[0]*d}/{(c[1]*c[2])}x+{d^2}/{c[2]^2}}=\\simplify{({c[0]}/{c[1]}x+{d}/{c[2]})^2}$.
\n\nNow, since $\\simplify{({c[0]}/{c[1]}x+{d}/{c[2]})^2}=0$ we can take the (plus or minus) square root of both sides to get $\\simplify{{c[0]}/{c[1]}x+{d}/{c[2]}}=0$. We can then solve this for $x$ to find $x=\\simplify{{-d*c[1]}/{c[0]*c[2]}}$.
\n", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}], "statement": "", "variable_groups": [], "variablesTest": {"maxRuns": "127", "condition": ""}, "variables": {"a": {"definition": "random(2..12)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "aa": {"definition": "a^2", "templateType": "anything", "group": "Ungrouped variables", "name": "aa", "description": ""}, "c": {"definition": "shuffle(2..12)[0..3]", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "random(-12..12 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "d": {"definition": "random(-12..-2)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "bb": {"definition": "b^2", "templateType": "anything", "group": "Ungrouped variables", "name": "bb", "description": ""}, "mid": {"definition": "2*a*b", "templateType": "anything", "group": "Ungrouped variables", "name": "mid", "description": ""}, "gg": {"definition": "g^2", "templateType": "anything", "group": "Ungrouped variables", "name": "gg", "description": ""}, "g": {"definition": "gcd(a,b)", "templateType": "anything", "group": "Ungrouped variables", "name": "g", "description": ""}}, "metadata": {"notes": "", "description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Solving a difference of two squares by factorising", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "functions": {}, "ungrouped_variables": ["a", "b", "bb", "aa", "g", "gg", "c", "num", "den", "solb"], "tags": ["binomial", "difference of squares", "difference of two squares", "factorisation", "Factorisation", "factorise", "quadratic", "quadratics", "solving", "sum and minus"], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"stepsPenalty": "1", "prompt": "Solve the following quadratic by factorisation:
\n\n | $\\simplify{{aa}x^2-{bb}}$ | \n$=$ | \n$0$ | \n
$\\Longrightarrow$ | \n[[0]] | \n$=$ | \n0 | \n
$\\Longrightarrow$ | \n$x$ | \n$=$ | \n[[1]] | \n
Note: In the first gap, enter the quadratic in factored form.
\nNote: In the second gap, if $x=1,2$, enter set(1,2).
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"notallowed": {"message": "Ensure you factorise the expression.
", "showStrings": false, "strings": ["xx", "x^2", "x**2"], "partialCredit": 0}, "vsetrangepoints": 5, "expectedvariablenames": ["x"], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "({gg})({a/g}x+{b/g})({a/g}x-{b/g})", "marks": 1, "checkvariablenames": true, "checkingtype": "absdiff", "type": "jme", "musthave": {"message": "Ensure you factorise the expression.
", "showStrings": false, "strings": ["(", ")"], "partialCredit": 0}}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "set({b}/{a},-{b}/{a})", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "steps": [{"prompt": "Since $\\simplify{{aa}x^2}$ is $\\simplify{{a}x}$ squared and $\\var{bb}$ is $\\var{b}$ squared, we can recognise $\\simplify{{aa}x^2-{bb}}$ as a difference of two squares.
\nRecalling that $(a+b)(a-b)=a^2-b^2$, we have
\n$\\simplify{{aa}x^2-{bb}}=(\\simplify{{a}x+{b}})(\\simplify{{a}x-{b}})$
\n\nNow, by the null factor law, either
\n$\\simplify{{a}x+{b}}=0$ or $\\simplify{{a}x-{b}}=0$.
\nSolving these equations results in
\n$x=\\simplify{-{b}/{a}}$ or $x=\\simplify{{b}/{a}}$.
\nNotice there is a common factor of $\\var{gg}$ that we can deal with first
\n$\\simplify{{aa}x^2-{bb}}=\\simplify{{gg}({aa/gg}x^2-{bb/gg})}.$
\nNext, notice the remaining expression is a difference of two squares. Recalling that $(a+b)(a-b)=a^2-b^2$, we have
\n$\\simplify{{aa}x^2-{bb}}=\\simplify{{gg}({aa/gg}x^2-{bb/gg})}=\\simplify{({gg})({a/g}x+{b/g})({a/g}x-{b/g})}$
\nNow, by the null factor law, either
\n$\\simplify{{a/g}x+{b/g}}=0$ or $\\simplify{{a/g}x-{b/g}}=0$.
\nSolving these equations results in
\n$x=\\simplify{-{b}/{a}}$ or $x=\\simplify{{b}/{a}}$.
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}, {"stepsPenalty": "1", "prompt": "Solve the following quadratic by factorisation:
\n\n | $\\simplify{{c[0]}^2/{c[2]}^2 x^2-{c[1]}^2/{c[3]}^2}$ | \n$=$ | \n0 | \n
$\\Longrightarrow$ | \n[[0]] | \n$=$ | \n0 | \n
$\\Longrightarrow$ | \n$x$ | \n$=$ | \n[[1]] | \n
Note: In the first gap, enter the quadratic in factored form.
\nNote: In the second gap, if $x=1,2$, enter set(1,2).
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"notallowed": {"message": "Ensure you factorise the expression.
", "showStrings": false, "strings": ["**2", "xx", "x^2"], "partialCredit": 0}, "vsetrangepoints": 5, "expectedvariablenames": ["x"], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "({c[0]}/{c[2]}x+{c[1]}/{c[3]})({c[0]}/{c[2]}x-{c[1]}/{c[3]})", "marks": "2", "checkvariablenames": true, "checkingtype": "absdiff", "type": "jme", "musthave": {"message": "Ensure you factorise the expression.
", "showStrings": false, "strings": ["(", ")"], "partialCredit": 0}}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "set({num}/{den}, {-num}/{den})", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "steps": [{"prompt": "We should recognise this as a difference of two squares, where $\\simplify{{c[0]}^2/{c[2]}^2 x^2}$ is $\\left(\\simplify{{c[0]}/{c[2]}x}\\right)^2$ and $\\simplify{{c[1]}^2/{c[3]}^2}$ is $\\left(\\simplify{{c[1]}/{c[3]}}\\right)^2$. Therefore
\n$\\simplify{{c[0]}^2/{c[2]}^2 x^2-{c[1]}^2/{c[3]}^2}=\\simplify{({c[0]}/{c[2]}x+{c[1]}/{c[3]})({c[0]}/{c[2]}x-{c[1]}/{c[3]})}.$
\n\nNow, by the null factor law, either
\n$\\simplify{{c[0]}/{c[2]}x+{c[1]}/{c[3]}}=0$ or $\\simplify{{c[0]}/{c[2]}x-{c[1]}/{c[3]}}=0$.
\nSolving these equations results in
\n$x=\\simplify{-{c[1]*c[2]}/{c[3]*c[0]}}$ or $x=\\simplify{{c[1]*c[2]}/{c[3]*c[0]}}$.
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}], "statement": "", "variable_groups": [], "variablesTest": {"maxRuns": "127", "condition": ""}, "variables": {"a": {"definition": "random(1..12)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "aa": {"definition": "a^2", "templateType": "anything", "group": "Ungrouped variables", "name": "aa", "description": ""}, "c": {"definition": "shuffle(2..12)[0..4]", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "random(1..12)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "bb": {"definition": "b^2", "templateType": "anything", "group": "Ungrouped variables", "name": "bb", "description": ""}, "g": {"definition": "gcd(a,b)", "templateType": "anything", "group": "Ungrouped variables", "name": "g", "description": ""}, "solb": {"definition": "set(num/den, -num/den)", "templateType": "anything", "group": "Ungrouped variables", "name": "solb", "description": ""}, "gg": {"definition": "g^2", "templateType": "anything", "group": "Ungrouped variables", "name": "gg", "description": ""}, "num": {"definition": "c[1]*c[2]", "templateType": "anything", "group": "Ungrouped variables", "name": "num", "description": ""}, "den": {"definition": "c[3]*c[0]", "templateType": "anything", "group": "Ungrouped variables", "name": "den", "description": ""}}, "metadata": {"notes": "", "description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Solving a non-monic quadratic by factorising", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "functions": {}, "ungrouped_variables": ["a", "b", "c", "d", "g_one", "gab_zero", "gcd_zero"], "tags": ["binomial", "factorisation", "Factorisation", "factorise", "non-monic", "quadratic", "quadratics", "solving"], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"stepsPenalty": 0, "prompt": "Solve the following quadratic by factorisation:
\n\n | $\\simplify{{c[1]}x^2+{d[1]+b[1]*c[1]}x+{b[1]*d[1]}}$ | \n$=$ | \n0 | \n
$\\Longrightarrow$ | \n[[0]] | \n$=$ | \n0 | \n
$\\Longrightarrow$ | \n$x$ | \n$=$ | \n[[1]] | \n
Note: In the first gap, enter the quadratic in factored form.
\nNote: In the second gap, if $x=1,2$, enter set(1,2).
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"notallowed": {"message": "Please factorise
", "showStrings": false, "strings": ["^2", "**2", "(x)^2"], "partialCredit": 0}, "vsetrangepoints": 5, "expectedvariablenames": ["x"], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "{g_one}(x+{b[1]})({c[1]/g_one}*x+{d[1]/g_one})", "marks": 1, "checkvariablenames": true, "checkingtype": "absdiff", "type": "jme", "musthave": {"message": "Please factorise
", "showStrings": false, "strings": ["(", ")"], "partialCredit": 0}}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "simplifyFractions", "scripts": {}, "answer": "set({-b[1]},{-d[1]}/{c[1]})", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "steps": [{"prompt": "There are a few different ways to do the working for these questions, here is one method that uses factorisation by grouping.
\n
Given $\\simplify{{c[1]}x^2+{d[1]+b[1]*c[1]}x+{b[1]*d[1]}}$, we
Now, since $\\simplify{{g_one}(x+{b[1]})({c[1]/g_one}x + {d[1]/g_one} )}=0$, by the null factor law, either
\n$\\simplify{x+{b[1]}}=0$, or $\\simplify{{c[1]/g_one}x + {d[1]/g_one} =0}$.
\nSolving these equations results in
\n$x=\\var{-b[1]}$, or $x=\\simplify{{-d[1]}/{c[1]}}$.
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}, {"stepsPenalty": 0, "prompt": "Solve the following quadratic by factorisation:
\n\n | $\\simplify{{a[0]*c[0]}x^2+{a[0]*d[0]+b[0]*c[0]}x+{b[0]*d[0]}}$ | \n$=$ | \n0 | \n
$\\Longrightarrow$ | \n[[0]] | \n$=$ | \n0 | \n
$\\Longrightarrow$ | \n$x$ | \n$=$ | \n[[1]] | \n
Note: In the first gap, enter the quadratic in factored form.
\nNote: In the second gap, if $x=1,2$, enter set(1,2).
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"notallowed": {"message": "Ensure you factorise the expression.
", "showStrings": false, "strings": ["xx", "x^2", "x**2"], "partialCredit": 0}, "vsetrangepoints": 5, "expectedvariablenames": ["x"], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "{gab_zero*gcd_zero}({a[0]/gab_zero}*x+{b[0]/gab_zero})({c[0]/gcd_zero}*x+{d[0]/gcd_zero})", "marks": "2", "checkvariablenames": true, "checkingtype": "absdiff", "type": "jme", "musthave": {"message": "Ensure you factorise the expression.
", "showStrings": false, "strings": ["(", ")"], "partialCredit": 0}}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "simplifyFractions", "scripts": {}, "answer": "set({-b[0]}/{a[0]},{-d[0]}/{c[0]})", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "steps": [{"prompt": "There are a few different ways to do the working for these questions, here is one method that uses factorisation by grouping.
\n
Given $\\simplify{{a[0]*c[0]}x^2+{a[0]*d[0]+b[0]*c[0]}x+{b[0]*d[0]}}$, we
Now, since $\\simplify{{gab_zero*gcd_zero}({c[0]/gcd_zero}x+{d[0]/gcd_zero})({a[0]/(gab_zero)}x+{b[0]/(gab_zero)} )}=0$, by the null factor law, either
\n$\\simplify{{c[0]/gcd_zero}x+{d[0]/gcd_zero}}=0$, or $\\simplify{{a[0]/(gab_zero)}x+{b[0]/(gab_zero)} =0}$.
\nSolving these equations results in
\n$x=\\simplify{{-d[0]}/{c[0]}}$, or $x=\\simplify{{-b[0]}/{a[0]}}$.
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}], "statement": "Factorise the following into linear factors. That is, write the quadratic as a product of terms that look like $ax+b$ where $a$ and $b$ are real numbers.
", "variable_groups": [], "variablesTest": {"maxRuns": "127", "condition": ""}, "variables": {"a": {"definition": "repeat(random(2..6),2)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "repeat(random(-6..6 except [-1,0,1]),2)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "repeat(random(-6..6 except 0),2)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "d": {"definition": "repeat(random(-6..6 except 0),2)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "gcd_zero": {"definition": "gcd(c[0],d[0])", "templateType": "anything", "group": "Ungrouped variables", "name": "gcd_zero", "description": ""}, "gab_zero": {"definition": "gcd(a[0],b[0])", "templateType": "anything", "group": "Ungrouped variables", "name": "gab_zero", "description": ""}, "g_one": {"definition": "gcd(c[1],d[1])", "templateType": "anything", "group": "Ungrouped variables", "name": "g_one", "description": ""}}, "metadata": {"notes": "I could use !noLeadingMinus in simplify to avoid it rearranging
", "description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Solving a quadratic by completing the square", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "functions": {}, "ungrouped_variables": ["a", "b", "c", "dd", "d", "scoeff", "lcoeff", "ccoeff", "disc", "lengthdet", "div", "argtop", "argbot", "sqrtargtop", "sqrtargbot"], "tags": ["completing the square", "formula", "quadratic", "quadratics", "roots", "solving"], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"stepsPenalty": "8", "prompt": "Fill in the blanks to solve the quadratic by completing the square:
\n\n | $\\simplify{{scoeff}x^2+{lcoeff}x+{ccoeff+c}}$ | \n$=$ | \n$\\var{c}$ | \n
$\\Longrightarrow$ | \n$\\simplify{{scoeff}x^2+{lcoeff}x}$ | \n$=$ | \n[[0]] | \n
$\\Longrightarrow$ | \n$x^2+$[[1]]$x$ | \n$=$ | \n[[2]] | \n
$\\Longrightarrow$ | \n$x^2+$[[1]]$x+$[[3]] | \n$=$ | \n[[4]] | \n
$\\Longrightarrow$ | \n$(x+$[[5]]$)^2$ | \n$=$ | \n[[4]] | \n
$\\Longrightarrow$ | \n$(x+$[[5]]$)$ | \n$=$ | \n$\\pm$[[6]] | \n
$\\Longrightarrow$ | \n$x$ | \n$=$ | \n[[7]] | \n
Note: In the last gap, if $x=1,2$, enter set(1,2).
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "steps": [{"prompt": "Recall
\n$(x+a)^2=x^2+2ax+a^2$
\nis called a perfect square. Now, notice if we let $b=2a$ this equation would become
\n$\\left(x+\\frac{b}{2}\\right)^2=x^2+bx+\\left(\\frac{b}{2}\\right)^2$.
\n\n\n$\\simplify{{scoeff}x^2+{lcoeff}x+{ccoeff+c}}$ | \n$=$ | \n$\\var{c}$ | \n\n |
$\\simplify{{scoeff}x^2+{lcoeff}x}$ | \n$=$ | \n$\\var{-ccoeff}$ | \n(get all constants on the right hand side) | \n
$x^2+\\simplify{{lcoeff}/{scoeff}}x$ | \n$=$ | \n$\\simplify{{-ccoeff}/{scoeff}}$ | \n(divide every term by the coefficient of $x^2$) | \n
$x^2+\\simplify{{lcoeff}/{scoeff}}x+\\simplify{{lcoeff^2}/{4*scoeff^2}}$ | \n$=$ | \n$\\simplify{{argtop}/{argbot}}$ | \n(halve the coefficient of $x$, then square, then add to both sides) | \n
$(x+\\simplify{{lcoeff}/{2*scoeff}})^2$ | \n$=$ | \n$\\simplify{{argtop}/{argbot}}$ | \n(rewrite the left hand side as a perfect square) | \n
$(x+\\simplify{{lcoeff}/{2*scoeff}})$ | \n$=$ | \n$\\pm \\simplify{{sqrtargtop}/{sqrtargbot}}$ | \n(take the plus or minus square root of both sides) | \n
$x$ | \n$=$ | \n$\\simplify{{-c}/{a}},\\simplify{{-d}/{b}}$ | \n(solve for $x$) | \n
Note: we would enter the final answer as set$\\left(\\simplify{{-c}/{a}},\\simplify{{-d}/{b}}\\right)$.
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "gaps": [{"integerPartialCredit": 0, "integerAnswer": true, "allowFractions": false, "variableReplacements": [], "maxValue": "{-ccoeff}", "minValue": "{-ccoeff}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": false, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "{lcoeff}/{scoeff}", "minValue": "{lcoeff}/{scoeff}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": false, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "{-ccoeff}/{scoeff}", "minValue": "{-ccoeff}/{scoeff}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "{lcoeff^2}/{4*scoeff^2}", "minValue": "{lcoeff^2}/{4*scoeff^2}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": false, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "{argtop}/{argbot}", "minValue": "{argtop}/{argbot}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "{lcoeff}/{2*scoeff}", "minValue": "{lcoeff}/{2*scoeff}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "{sqrtargtop}/{sqrtargbot}", "minValue": "{sqrtargtop}/{sqrtargbot}", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "set({-c}/{a},{-d}/{b})", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "d": {"definition": "if(c*b=a*dd,dd+1,dd)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "sqrtargtop": {"definition": "sqrt(argtop)", "templateType": "anything", "group": "Ungrouped variables", "name": "sqrtargtop", "description": ""}, "dd": {"definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "dd", "description": ""}, "ccoeff": {"definition": "c*d", "templateType": "anything", "group": "Ungrouped variables", "name": "ccoeff", "description": ""}, "argbot": {"definition": "4*scoeff^2", "templateType": "anything", "group": "Ungrouped variables", "name": "argbot", "description": ""}, "sqrtargbot": {"definition": "sqrt(argbot)", "templateType": "anything", "group": "Ungrouped variables", "name": "sqrtargbot", "description": ""}, "argtop": {"definition": "lcoeff^2-4*ccoeff*scoeff", "templateType": "anything", "group": "Ungrouped variables", "name": "argtop", "description": ""}, "lcoeff": {"definition": "a*d+b*c", "templateType": "anything", "group": "Ungrouped variables", "name": "lcoeff", "description": ""}, "lengthdet": {"definition": "abs(a*d-b*c)", "templateType": "anything", "group": "Ungrouped variables", "name": "lengthdet", "description": ""}, "div": {"definition": "lcoeff/scoeff", "templateType": "anything", "group": "Ungrouped variables", "name": "div", "description": ""}, "scoeff": {"definition": "a*b", "templateType": "anything", "group": "Ungrouped variables", "name": "scoeff", "description": ""}, "disc": {"definition": "(lcoeff^2-4*scoeff*ccoeff)", "templateType": "anything", "group": "Ungrouped variables", "name": "disc", "description": ""}}, "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Solving a quadratic by using the quadratic formula - integer coefficients", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "tags": ["formula", "Formula", "quadratic", "quadratics", "roots", "solving"], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"d": {"name": "d", "group": "Ungrouped variables", "definition": "if(c*b=a*dd,dd+1,dd)", "description": "", "templateType": "anything", "can_override": false}, "ccoeff": {"name": "ccoeff", "group": "Ungrouped variables", "definition": "c*d", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "scoeff": {"name": "scoeff", "group": "Ungrouped variables", "definition": "a*b", "description": "", "templateType": "anything", "can_override": false}, "lcoeff": {"name": "lcoeff", "group": "Ungrouped variables", "definition": "a*d+b*c", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "disc": {"name": "disc", "group": "Ungrouped variables", "definition": "lcoeff^2-4*scoeff*ccoeff", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "dd": {"name": "dd", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "lengthdet": {"name": "lengthdet", "group": "Ungrouped variables", "definition": "abs(a*d-b*c)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "dd", "d", "scoeff", "lcoeff", "ccoeff", "disc", "lengthdet"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "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", "stepsPenalty": "2", "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Given the quadratic
\n$ax^2+bx+c=0$,
\nthe 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\nFor 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$\\begin{align*}x &=\\frac{-(\\var{lcoeff})\\pm\\sqrt{(\\var{lcoeff})^2-4(\\var{scoeff})(\\var{ccoeff})}}{2(\\var{scoeff})}\\\\
&=\\frac{\\var{-lcoeff}\\pm\\sqrt{\\var{lcoeff^2}-(\\var{4*scoeff*ccoeff})}}{\\var{2*scoeff}}\\\\
&= \\frac{\\var{-lcoeff}\\pm\\sqrt{\\var{disc}}}{\\var{2*scoeff}}\\\\
&= \\frac{\\var{-lcoeff}\\pm\\var{lengthdet}}{\\var{2*scoeff}}\\\\
&= \\frac{\\var{-lcoeff-lengthdet}}{\\var{2*scoeff}},\\,\\,\\frac{\\var{-lcoeff+lengthdet}}{\\var{2*scoeff}}\\\\
&=\\simplify{({-lcoeff}-{sqrt(disc)})/(2*{scoeff})},\\,\\,\\simplify{({-lcoeff}+{sqrt(disc)})/(2*{scoeff})} \\end{align*}$