// Numbas version: exam_results_page_options {"name": "Partial fractions practice", "metadata": {"description": "

Denominators with linear factors, repeated factors and non-factorisable quadratics.

", "licence": "None specified"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", ""], "variable_overrides": [[], [], [], []], "questions": [{"name": "Partial Fractions: Proper Fractions 4a", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}], "tags": [], "metadata": {"description": "

Rewrite the expression $\\frac{cx+d}{(kx+a)(x+b)}$ as partial fractions in the form $\\frac{A}{kx+a}+\\frac{B}{x+b}$.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Rewrite the following expression as partial fractions:

\n

\\[ \\simplify{({c}x+{d})/(({k}x+{a})(x+{b}))} .\\]

", "advice": "

To express \\[ \\simplify{({c}x+{d})/(({k}x+{a})(x+{b}))} \\] as partial fractions, we want to set this equal to the sum of 2 fractions with denominators $\\simplify{{k}x+{a}}$ and $\\simplify{x+{b}}$. Since these are both distinct linear factors, this tells us that the numerators will be constants, which we will call $A$ and $B$:

\n

\\[ \\simplify{({c}x+{d})/(({k}x+{a})(x+{b}))} = \\simplify{A/({k}x+{a}) + B/(x+{b})}.\\]

\n

To find the values of $A$ and $B$, we want to multiply this equation by the denominator of the left-hand side. This gives

\n

\\[ \\simplify{{c}x+{d}=A(x+{b})+B({k}x+{a})}.\\]

\n

There are 2 methods of finding $A$ and $B$. The first is to choose suitable values for $x$ which will eliminate one of the terms, and the other is to compare the coefficients of each side of the equation. We will cover both methods here.

\n

Method 1:

\n

To find $A$, we can eliminate $B$ by setting $\\simplify[fractionNumbers]{x={-a/k}}$:

\n

\\[ \\simplify[fractionNumbers]{{d-c*a/k}=A{b-a/k}} \\implies \\simplify[fractionNumbers]{A={(d-c*a/k)/(b-a/k)}}.\\]

\n

Similarly, to find B, we can eliminate $A$ by setting $\\simplify{x={-b}}$:

\n

\\[ \\simplify{{d-c*b}=B{a-k*b}} \\implies \\simplify[fractionNumbers]{B={(d-c*b)/(a-k*b)}}.\\]

\n

Therefore, 

\n

{check}

\n

Method 2:

\n

By comparing the coefficients of the $x$-terms and the constant terms we can form a pair of simultaneous equations to find $A$ and $B$.

\n

\\[ \\begin{split} \\simplify{{c}x+{d}} &\\,= \\simplify{A(x+{b})+B({k}x+{a})} \\\\ &\\,= \\simplify{A*x+{b}A+{k}*B*x +{a}B} \\\\ &\\,=\\simplify{(A+{k}B)x +{b}A+{a}B} . \\end{split} \\]

\n

\\[ \\begin{split}&(x):\\quad \\var{c} &\\,= \\simplify{A+{k}*B} \\\\ &(c):\\quad \\var{d} &\\,= \\simplify{{b}A+{a}B} .\\end{split} \\]

\n

Hence,

\n

\\[A=\\simplify[fractionNumbers]{{Asol}},\\,B=\\simplify[fractionNumbers]{{Bsol}}, \\]

\n

and

\n

{check}

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"Asol": {"name": "Asol", "group": "Ungrouped variables", "definition": "(d-c*a/k)/(b-a/k)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-9..9)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-9..9 except b*k)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "Bsol": {"name": "Bsol", "group": "Ungrouped variables", "definition": "(d-c*b)/(a-k*b)", "description": "", "templateType": "anything", "can_override": false}, "check": {"name": "check", "group": "Ungrouped variables", "definition": "if(Asol=round(Asol),'{Sol1}','{Sol2}')", "description": "", "templateType": "anything", "can_override": false}, "Sol1": {"name": "Sol1", "group": "Ungrouped variables", "definition": "\"

\\\\[ \\\\simplify{({c}x+{d})/(({k}x+{a})(x+{b}))} = \\\\simplify[all,fractionNumbers]{{Asol}/({k}x+{a})+{Bsol}/(x+{b})}.\\\\]

\"", "description": "", "templateType": "long string", "can_override": false}, "Sol2": {"name": "Sol2", "group": "Ungrouped variables", "definition": "\"

\\\\[ \\\\simplify{({c}x+{d})/(({k}x+{a})(x+{b}))} = \\\\simplify[all,fractionNumbers]{{k*d-c*a}/(({k*b-a})({k}x+{a}))+{d-c*b}/(({a-k*b})(x+{b}))}.\\\\]

\"", "description": "", "templateType": "long string", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(-9..9 except[c*a,c*b])", "description": "", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "gcd(c,d)=1", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "d", "k", "Bsol", "Asol", "check", "Sol1", "Sol2"], "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": "\n

[[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{(k*d-c*a)}/(({k*b-a})({k}x+{a}))+{d-c*b}/(({a-k*b})(x+{b}))", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": " `+-$n`?/($n`?*($n`?x+`+-$n`?))+`+-$n`?/($n`?*($n`?x+`+-$n`?)) `|`+-$n/`+-$n*(`+-$n`?/($n`?*($n`?x+`+-$n`?))+`+-$n`?/($n`?*($n`?x+`+-$n`?)))", "partialCredit": 0, "message": "", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Partial Fractions: Proper Fractions 5b", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}], "tags": [], "metadata": {"description": "

Rewrite the expression $\\frac{n}{(x+a)(x+b)^2}$ as partial fractions in the form $\\frac{A}{x+a}+\\frac{B}{x+b}+\\frac{C}{(x+b)^2}$.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Rewrite the following expression as partial fractions:

\n

\\[ \\simplify{{n}/((x+{a})(x+{b})^2)}. \\]

", "advice": "

To express \\[ \\simplify{{n}/((x+{a})(x+{b})^2)} \\] as partial fractions, we want to set this equal to the sum of three fractions with denominators $\\simplify{x+{a}}$, $\\simplify{x+{b}}$, and $\\simplify{(x+{b})^2}$. Since we have a distinct linear factor and a repeated linear factor, this tells us that the numerators will be constants, which we will call $A$, $B$, and $C$:

\n

\\[ \\simplify{{n}/((x+{a})(x+{b})^2)} = \\simplify{A/(x+{a}) + B/(x+{b})+ C/(x+{b})^2}.\\]

\n

To find the values of $A$, $B$, and $C$, we want to first multiply this equation by the denominator of the left-hand side. This gives

\n

\\[ \\simplify{{n}=A(x+{b})^2+B(x+{a})(x+{b}) + C(x+{a})}.\\]

\n

(Note: To find $A$, $B$, and $C$, we will use a combination of choosing suitable values of $x$ to eliminate terms, and equating coefficients. It can be solved by only equating coefficients, but this is a more efficient process.)

\n

\n

To find $A$, we can eliminate $B$ and $C$ by setting $x=\\var{-a}$:

\n

\\[ \\simplify{{n}=A{(b-a)^2}} \\implies A=\\simplify[fractionNumbers]{{Asol}}.\\]

\n

To find $C$, we can eliminate $A$ and $B$ by setting $x=\\var{-b}$:

\n

\\[ \\simplify{{n}=C{(a-b)}} \\implies C=\\simplify[fractionNumbers]{{Csol}}.\\]

\n

Finally, by equating coefficients of the $x^2$-terms we can find $B$:

\n

\\[ (x^2): \\quad 0 = \\simplify{A+B} \\implies B=-A. \\]

\n

Therefore, \\[ B=\\simplify[fractionNumbers]{{Bsol}}, \\]

\n

and

\n

{check}

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-6..6)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-6..6 except a)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "Asol": {"name": "Asol", "group": "Ungrouped variables", "definition": "n/((b-a)(b-a))", "description": "", "templateType": "anything", "can_override": false}, "Bsol": {"name": "Bsol", "group": "Ungrouped variables", "definition": "-Asol", "description": "", "templateType": "anything", "can_override": false}, "Csol": {"name": "Csol", "group": "Ungrouped variables", "definition": "n/(a-b)", "description": "", "templateType": "anything", "can_override": false}, "check": {"name": "check", "group": "Ungrouped variables", "definition": "if(Asol=round(Asol) and Bsol=round(Bsol),'{sol1}','{sol2}')", "description": "", "templateType": "anything", "can_override": false}, "sol1": {"name": "sol1", "group": "Ungrouped variables", "definition": "\"

\\\\[ \\\\simplify{{n}/((x+{a})(x+{b})^2)} = \\\\simplify{{Asol}/(x+{a})+{Bsol}/(x+{b})+{Csol}/(x+{b})^2}.\\\\]

\"", "description": "", "templateType": "long string", "can_override": false}, "sol2": {"name": "sol2", "group": "Ungrouped variables", "definition": "\"

\\\\[ \\\\simplify{{n}/((x+{a})(x+{b})^2)} = \\\\simplify[all,fractionNumbers]{{n}/({(b-a)^2}(x+{a}))-{n}/({(b-a)^2}(x+{b}))+{n}/({(a-b)}(x+{b})^2)}.\\\\]

\"", "description": "", "templateType": "long string", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "n", "Asol", "Bsol", "Csol", "check", "sol1", "sol2"], "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": "\n

[[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{n}/({(b-a)^2}(x+{a}))-{n}/({(b-a)^2}(x+{b}))+{n}/({(a-b)}(x+{b})^2)", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "`+-$n`?/($n`?*($n`?x+`+-$n`?))+`+-$n`?/($n`?*($n`?x+`+-$n`?))+`+-$n`?/($n`?*($n`?x+`+-$n`?)^2) `| `+-$n/`+-$n*(`+-$n`?/($n`?*($n`?x+`+-$n`?))+`+-$n`?/($n`?*($n`?x+`+-$n`?))+`+-$n`?/($n`?*($n`?x+`+-$n`?)^2))", "partialCredit": 0, "message": "", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Partial Fractions: Proper Fractions 7c", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}], "tags": [], "metadata": {"description": "

Rewrite the expression $\\frac{mx^2+nx+k}{(x+a)(x^2+bx+c)}$ as partial fractions in the form $\\frac{A}{x+a}+\\frac{Bx+C}{x^2+bx+c}$.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Rewrite the following expression as partial fractions:

\n

\\[ \\simplify{({m}x^2+{n}x+{k})/((x+{a})(x^2+{b}x+{c}))}. \\]

\n

", "advice": "

To express \\[ \\simplify{({m}x^2+{n}x+{k})/((x+{a})(x^2+{b}x+{c}))} \\] as partial fractions, we want to set this equal to the sum of two fractions with denominators $\\simplify{x+{a}}$ and $\\simplify{x^2+{b}x+{c}}$. Since we have a linear factor and a quadratic factor, this tells us that the form of the partial fractions will be

\n

\\[ \\simplify{({m}x^2+{n}x+{k})/((x+{a})(x^2+{b}x+{c}))} = \\simplify{A/(x+{a}) + (B*x+C)/(x^2+{b}x+{c})},\\]

\n

where $A$, $B$, and $C$ are constants.

\n

To find the values of $A$, $B$, and $C$, we want to first multiply this equation by the denominator of the left-hand side. This gives

\n

\\[ \\simplify{{m}x^2+{n}x+{k}=A(x^2+{b}x+{c})+B*x(x+{a}) + C(x+{a})}.\\]

\n

(Note: To find $A$, $B$, and $C$, we will use a combination of choosing suitable values of $x$ to eliminate terms, and equating coefficients. It can be solved by only equating coefficients, but this is a more efficient process.)

\n

\n

To find $A$, we can eliminate $B$ and $C$ by setting $x=\\var{-a}$:

\n

\\[ \\simplify{{m*a^2-n*a+k}=A{(a^2-b*a+c)}} \\implies A=\\simplify[fractionNumbers]{{Asol}}.\\]

\n

To find $C$, we can eliminate $B$ by setting $x=0$ and substituting in the result of $A$:

\n

\\[ \\simplify{{k}={c}A+{a}C} \\implies C=\\simplify[all,fractionNumbers]{({k}-{c}A)/{a}}.\\]

\n

Hence,

\n

\\[ C = \\simplify[fractionNumbers]{{Csol}}.\\]

\n

Finally, by equating coefficients of the $x^2$-terms we can find $B$:

\n

\\[ (x^2): \\quad \\var{m} = \\simplify{A+B} \\implies B=\\var{m}-A. \\]

\n

Therefore, \\[ B=\\simplify[fractionNumbers]{{Bsol}}, \\]

\n

and

\n

{check}

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-6..6 except 0)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "pairs[index][1]", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "if(k=1,random(-1,1)*random([1,3,4,5]),if (k=2,random(-1,1)*random([1,2,4,5]),if(k=3,random(-1,1)*random([1,2,3,5]),if(k=5,random(-1,1)*random([1,2,3,4,5,7]),random(-1,1)*random([1,2,3,4,5,7])))))", "description": "", "templateType": "anything", "can_override": false}, "Asol": {"name": "Asol", "group": "Ungrouped variables", "definition": "(m*a^2-n*a+k)/(a^2-b*a+c)", "description": "", "templateType": "anything", "can_override": false}, "Bsol": {"name": "Bsol", "group": "Ungrouped variables", "definition": "(m*c-m*b*a+n*a-k)/(a^2-b*a+c)", "description": "", "templateType": "anything", "can_override": false}, "Csol": {"name": "Csol", "group": "Ungrouped variables", "definition": "(k*(a-b)-m*a*c+n*c)/(a^2-a*b+c)", "description": "", "templateType": "anything", "can_override": false}, "check": {"name": "check", "group": "Ungrouped variables", "definition": "if(Asol=round(Asol) and Bsol=round(Bsol),'{sol1}',if(simp2=1,'{sol2}','{sol3}'))", "description": "", "templateType": "anything", "can_override": false}, "sol1": {"name": "sol1", "group": "Ungrouped variables", "definition": "\"

\\\\[ \\\\simplify{({m}x^2+{n}x+{k})/((x+{a})(x^2+{b}x+{c}))} = \\\\simplify{{Asol}/(x+{a})+({Bsol}x+{Csol})/(x^2+{b}x+{c})}.\\\\]

\"", "description": "", "templateType": "long string", "can_override": false}, "sol2": {"name": "sol2", "group": "Ungrouped variables", "definition": "\"

\\\\[ \\\\simplify{({m}x^2+{n}x+{k})/((x+{a})(x^2+{b}x+{c}))} = \\\\simplify[all,fractionNumbers]{{m*a^2-n*a+k}/({a^2-a*b+c}(x+{a}))+({m*c-m*b*a+n*a-k}x+{k*(a-b)-m*a*c+n*c})/({a^2-a*b+c}(x^2+{b}x+{c}))}.\\\\]

\"", "description": "", "templateType": "long string", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "pairs[index][0]", "description": "", "templateType": "anything", "can_override": false}, "simp1": {"name": "simp1", "group": "Ungrouped variables", "definition": "gcd(k*(a-b)-m*a*c+n*c,m*c-m*b*a+n*a-k)", "description": "", "templateType": "anything", "can_override": false}, "simp2": {"name": "simp2", "group": "Ungrouped variables", "definition": "gcd(simp1,a^2-a*b+c)", "description": "", "templateType": "anything", "can_override": false}, "sol3": {"name": "sol3", "group": "Ungrouped variables", "definition": "\"

\\\\[ \\\\simplify{({m}x^2+{n}x+{k})/((x+{a})(x^2+{b}x+{c}))} = \\\\simplify[all,fractionNumbers]{{m*a^2-n*a+k}/({a^2-a*b+c}(x+{a}))+({(m*c-m*b*a+n*a-k)/simp2}x+{(k*(a-b)-m*a*c+n*c)/simp2})/({(a^2-a*b+c)/simp2}(x^2+{b}x+{c}))}.\\\\]

\"", "description": "", "templateType": "long string", "can_override": false}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "random([1,2,3,5,7])", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "1", "description": "", "templateType": "anything", "can_override": false}, "pairs": {"name": "pairs", "group": "Ungrouped variables", "definition": "[[1,random(-1,1)*random([1,3,4,5])],[2,random(-1,1)*random([1,2,4,5])],[3,random(-1,1)*random([1,2,3,5])],[5,random(-1,1)*random([1,2,3,4,5,7])],[7,random(-1,1)*random([1,2,3,4,5,7])]]", "description": "", "templateType": "anything", "can_override": false}, "index": {"name": "index", "group": "Ungrouped variables", "definition": "random(0..4)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "a^2-a*b+c>0 or a^2-a*b+c<0", "maxRuns": 100}, "ungrouped_variables": ["a", "pairs", "index", "b", "c", "m", "k", "n", "Asol", "Bsol", "Csol", "check", "sol1", "sol2", "sol3", "simp1", "simp2"], "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": "\n

[[0]]

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{(m*a^2-n*a+k)}/({a^2-a*b+c}(x+{a}))+({(m*c-m*b*a+n*a-k)/simp2}x+{(k*(a-b)-m*a*c+n*c)/simp2})/({(a^2-a*b+c)/simp2}(x^2+{b}x+{c}))", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "`! (((`+-$n`?*x^2+`+-$n`?*x+`+-$n)/((x+`+-$n)(x^2+`+-$n*x+`+-$n))))", "partialCredit": 0, "message": "", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Quadratics: Completing the Square 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}], "tags": ["Category: Quadratics"], "metadata": {"description": "

Factorising a quadratic expression of the form $x^2+bx+c$ by completing the square.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Write the following quadratic expression in the form $(x+a)^2+b$ by using the method of completing the square:

\n

\\[ \\simplify[unitFactor]{{a}x^2+{b}x+{c}} \\]

", "advice": "

For a quadratic expression of the form \\[ x^2+bx+c,\\] when written in completed square form it becomes \\[ \\left(x+\\frac{b}{2}\\right)^2 - \\left(\\frac{b}{2}\\right)^2+c.\\]

\n

So, \\[ \\begin{split} \\simplify[unitFactor]{{a}x^2+{b}x+{c}} &\\,=\\simplify[unitFactor]{(x+{b/2})^2 - {(b/2)}^2 + {c}}, \\\\ \\\\&\\,=\\simplify[unitFactor]{(x+{b/2})^2 +{c-(b/2)^2}}. \\end{split} \\]

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "1", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "2*(p+q)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "{p*q}", "description": "", "templateType": "anything", "can_override": false}, "p": {"name": "p", "group": "Ungrouped variables", "definition": "random(-7..7 except 0)", "description": "", "templateType": "anything", "can_override": false}, "q": {"name": "q", "group": "Ungrouped variables", "definition": "random(-7..7 except [0,-p])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "p", "q"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "(x+{b/2})^2 + {c-(b/2)^2}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "mustmatchpattern": {"pattern": "(x+{b/2})^2 + {c-(b/2)^2}", "partialCredit": 0, "message": "", "nameToCompare": ""}, "valuegenerators": [{"name": "x", "value": ""}]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": []}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Lucia Sagredo", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/10001/"}], "extensions": [], "custom_part_types": [], "resources": []}