// 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]]

\n

Note: 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

\n

Since

\n

\\[(\\simplify{x+{a}})(\\simplify{{b}x+{c}})=0,\\]

\n

this 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}}$.

\n

For 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]]

\n

Note: 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.\\]

\n

Since

\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,\\]

\n

this 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)}$.

\n

For 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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\simplify{x^2+{linear}x+{const}}$$=$0
$\\Longrightarrow$ [[0]]$=$0
$\\Longrightarrow$$x$$=$[[1]]
\n

Note: In the first gap, enter the quadratic in factored form.

\n

Note: 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

\n

In the case of $\\simplify{x^2+{linear}x+{const}}$ we ask

\n

what two numbers add to give $\\var{linear}$ and multiply to give $\\var{const}$? 

\n

Therefore the numbers must be $\\var{a}$ and $\\var{b}$, that is 

\n

$\\simplify{x^2+{linear}x+{const}}=(\\simplify{x+{a}})(\\simplify{x+{b}}).$

\n

You 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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\simplify{x^2+{linear}x+{const}}$$=$0
$\\Longrightarrow$$ (\\simplify{x+{a}})(\\simplify{x+{b}})$$=$0
$\\Longrightarrow$$x$$=$$\\var{-a},\\var{-b}$
\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(-12..12 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "b": {"definition": "random(-12..12 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "const": {"definition": "a*b", "templateType": "anything", "group": "Ungrouped variables", "name": "const", "description": ""}, "linear": {"definition": "a+b", "templateType": "anything", "group": "Ungrouped variables", "name": "linear", "description": ""}, "monicsoln": {"definition": "set(-a,-b)", "templateType": "anything", "group": "Ungrouped variables", "name": "monicsoln", "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 perfect square 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", "aa", "bb", "mid", "g", "gg", "c", "d"], "tags": ["binomial", "factorisation", "Factorisation", "factorise", "perfect square", "quadratic", "quadratics", "solving", "square"], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"stepsPenalty": 0, "prompt": "

Solve the following quadratic by factorisation:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\simplify{{aa}x^2+{mid}x+{bb}}$$=$0
$\\Longrightarrow$ [[0]]$=$0
$\\Longrightarrow$$x$$=$[[1]]
\n

\n

Note: In the first gap, enter the quadratic in factored form.

\n

Note: 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.

\n

In 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})$.

\n

That is, $\\simplify{{aa}x^2+{mid}x+{bb}}=\\simplify{({a}x+{b})^2}$.

\n
\n

Now, 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

\n
\n
\n

Each 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}$.

\n

Now, 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}}$.

\n
\n

", "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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\simplify{{c[0]^2}/{c[1]^2} x^2+{2c[0]*d}/{(c[1]*c[2])}x+{d^2}/{c[2]^2}}$$=$0
$\\Longrightarrow$ [[0]]$=$0
$\\Longrightarrow$$x$$=$[[1]]
\n

\n

Note: In the first gap, enter the quadratic in factored form.

\n

Note: 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.

\n

In 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

\n\n

That 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

\n

Now, 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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\simplify{{aa}x^2-{bb}}$$=$$0$
$\\Longrightarrow$ [[0]]$=$0
$\\Longrightarrow$$x$$=$[[1]]
\n

\n

Note: In the first gap, enter the quadratic in factored form.

\n

Note: 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": "
\n

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. 

\n

Recalling 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

\n

Now, by the null factor law, either

\n

$\\simplify{{a}x+{b}}=0$ or $\\simplify{{a}x-{b}}=0$.

\n

Solving these equations results in

\n

$x=\\simplify{-{b}/{a}}$ or $x=\\simplify{{b}/{a}}$.

\n
\n

Notice 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})}.$

\n

Next, 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})}$

\n

Now, by the null factor law, either

\n

$\\simplify{{a/g}x+{b/g}}=0$ or $\\simplify{{a/g}x-{b/g}}=0$.

\n

Solving 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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\simplify{{c[0]}^2/{c[2]}^2 x^2-{c[1]}^2/{c[3]}^2}$$=$0
$\\Longrightarrow$ [[0]]$=$0
$\\Longrightarrow$$x$$=$[[1]]
\n

\n

\n

Note: In the first gap, enter the quadratic in factored form.

\n

Note: 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

\n

Now, 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$.

\n

Solving 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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\simplify{{c[1]}x^2+{d[1]+b[1]*c[1]}x+{b[1]*d[1]}}$$=$0
$\\Longrightarrow$ [[0]]$=$0
$\\Longrightarrow$$x$$=$[[1]]
\n

\n

Note: In the first gap, enter the quadratic in factored form.

\n

Note: 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

\n
    \n
  1. look for a common factor, in this case it is $\\var{g_one}$, and put it out the front: $\\simplify{{g_one}({c[1]/g_one}x^2+{(d[1]+b[1]*c[1])/g_one}x+{b[1]*d[1]/g_one})}$
  2. \n
  3. multiply the constant term and the coefficient of $x^2$ to get $\\var{c[1]/{g_one}*{b[1]*d[1]/g_one}}$
  4. \n
  5. find two numbers that multiply to give $\\var{c[1]/g_one*b[1]*d[1]/g_one}$ and add to give $\\var{(d[1]+b[1]*c[1])/g_one}$, in this case the numbers are $\\var{b[1]*c[1]/g_one}$ and $\\var{d[1]/g_one}$
  6. \n
  7. Use these numbers to decompose the coefficient of the $x$ term, $\\simplify{{g_one}({c[1]/g_one}x^2+{b[1]*c[1]/g_one}x+{d[1]/g_one}x+{b[1]*d[1]/g_one})}$
  8. \n
  9. Use factorisation by grouping to factorise the quadratic, that is:
  10. \n\n
\n

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}$.

\n

Solving 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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\simplify{{a[0]*c[0]}x^2+{a[0]*d[0]+b[0]*c[0]}x+{b[0]*d[0]}}$$=$0
$\\Longrightarrow$ [[0]]$=$0
$\\Longrightarrow$$x$$=$[[1]]
\n

\n

Note: In the first gap, enter the quadratic in factored form.

\n

Note: 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

\n
    \n
  1. look for a common factor, in this case it is $\\var{gab_zero*gcd_zero}$, and put it out the front:  $\\simplify{{gab_zero*gcd_zero}({a[0]*c[0]/(gab_zero*gcd_zero)}x^2+{(a[0]*d[0]+b[0]*c[0])/(gab_zero*gcd_zero)}x+{b[0]*d[0]/(gab_zero*gcd_zero)})}$
  2. \n
  3. multiply the constant term and the coefficient of $x^2$ to get $\\var{a[0]*c[0]*b[0]*d[0]/(gab_zero*gcd_zero)^2}$
  4. \n
  5. find two numbers that multiply to give $\\var{a[0]*c[0]*b[0]*d[0]/(gab_zero*gcd_zero)^2}$ and add to give $\\var{(a[0]*d[0]+b[0]*c[0])/(gab_zero*gcd_zero)}$, in this case the numbers are $\\var{(a[0]*d[0])/(gab_zero*gcd_zero)}$ and $\\var{(b[0]*c[0])/(gab_zero*gcd_zero)}$
  6. \n
  7. Use these numbers to decompose the coefficient of the $x$ term, $\\simplify{{gab_zero*gcd_zero}({a[0]*c[0]/(gab_zero*gcd_zero)}x^2+{(a[0]*d[0])/(gab_zero*gcd_zero)}x+{(b[0]*c[0])/(gab_zero*gcd_zero)}x+{b[0]*d[0]/(gab_zero*gcd_zero)})}$
  8. \n
  9. Use factorisation by grouping to factorise the quadratic, that is:
  10. \n\n
\n

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}$.

\n

Solving 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\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
$\\simplify{{scoeff}x^2+{lcoeff}x+{ccoeff+c}}$$=$$\\var{c}$
$\\Longrightarrow$$\\simplify{{scoeff}x^2+{lcoeff}x}$ $=$[[0]]
$\\Longrightarrow$$x^2+$[[1]]$x$$=$[[2]]
$\\Longrightarrow$$x^2+$[[1]]$x+$[[3]]$=$[[4]]
$\\Longrightarrow$$(x+$[[5]]$)^2$$=$[[4]]
$\\Longrightarrow$$(x+$[[5]]$)$$=$$\\pm$[[6]]
$\\Longrightarrow$$x$$=$[[7]]
\n

\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$

\n

is 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\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
$\\simplify{{scoeff}x^2+{lcoeff}x+{ccoeff+c}}$$=$$\\var{c}$
$\\simplify{{scoeff}x^2+{lcoeff}x}$ $=$$\\var{-ccoeff}$(get all constants on the right hand side)
$x^2+\\simplify{{lcoeff}/{scoeff}}x$$=$$\\simplify{{-ccoeff}/{scoeff}}$(divide every term by the coefficient of $x^2$)
$x^2+\\simplify{{lcoeff}/{scoeff}}x+\\simplify{{lcoeff^2}/{4*scoeff^2}}$$=$$\\simplify{{argtop}/{argbot}}$(halve the coefficient of $x$, then square, then add to both sides)
$(x+\\simplify{{lcoeff}/{2*scoeff}})^2$$=$$\\simplify{{argtop}/{argbot}}$(rewrite the left hand side as a perfect square)
$(x+\\simplify{{lcoeff}/{2*scoeff}})$$=$$\\pm \\simplify{{sqrtargtop}/{sqrtargbot}}$(take the plus or minus square root of both sides)
$x$$=$$\\simplify{{-c}/{a}},\\simplify{{-d}/{b}}$(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$,

\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

$\\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*}$

\n

"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "({-lcoeff}-{sqrt(disc)})/{2*scoeff}", "maxValue": "({-lcoeff}-{sqrt(disc)})/{2*scoeff}", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "({-lcoeff}+{sqrt(disc)})/(2*scoeff)", "maxValue": "({-lcoeff}+{sqrt(disc)})/(2*scoeff)", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": true}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "extensions": [], "custom_part_types": [], "resources": []}