// Numbas version: finer_feedback_settings {"name": "Partial Fractions: Proper Fractions 6c", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Partial Fractions: Proper Fractions 6c", "tags": [], "metadata": {"description": "
Rewrite the expression $\\frac{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{({n}x+{k})/((x+{a})(x^2+{b}x+{c}))}. \\]
", "advice": "To express \\[ \\simplify{({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{({n}x+{k})/((x+{a})(x^2+{b}x+{c}))} = \\simplify{A/(x+{a}) + (B*x+C)/(x^2+{b}x+{c})},\\]
\nwhere $A$, $B$, and $C$ are constants.
\nTo 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}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\nTo find $A$, we can eliminate $B$ and $C$ by setting $x=\\var{-a}$:
\n\\[ \\simplify{{k-n*a}=A{(a^2-b*a+c)}} \\implies A=\\simplify[fractionNumbers]{{Asol}}.\\]
\nTo 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}}.\\]
\nHence,
\n\\[ C = \\simplify[fractionNumbers]{{Csol}}.\\]
\nFinally, by equating coefficients of the $x^2$-terms we can find $B$:
\n\\[ (x^2): \\quad 0 = \\simplify{A+B} \\implies B=-A. \\]
\nTherefore, \\[ B=\\simplify[fractionNumbers]{-{Asol}}, \\]
\nand
\n{check}
\n", "rulesets": {}, "extensions": [], "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": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "Asol": {"name": "Asol", "group": "Ungrouped variables", "definition": "(k-n*a)/(a^2-b*a+c)", "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": "(k*(a-b)+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{({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{{n}/((x+{a})(x^2+{b}x+{c}))} = \\\\simplify[all,fractionNumbers]{{k-n*a}/({a^2-a*b+c}(x+{a}))+({-(k-n*a)}x+{k*(a-b)+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-n*a,k*(b-a)-n*c)", "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{{n}/((x+{a})(x^2+{b}x+{c}))} = \\\\simplify[all,fractionNumbers]{{(k-n*a)}/({a^2-a*b+c}(x+{a}))+({-(k-n*a)/simp2}x+{(k*(a-b)+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(-5..5 except n*a)", "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-b*a+c >0 or a^2-b*a+c<0", "maxRuns": 100}, "ungrouped_variables": ["pairs", "index", "a", "b", "c", "n", "k", "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": "{(k-n*a)}/({a^2-a*b+c}(x+{a}))+({-(k-n*a)/simp2}x+{(k*(a-b)+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+`+-$n)/((x+`+-$n)(x^2+`+-$n*x+`+-$n))) `| (`+-$n*(`+-$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", "type": "question", "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}]}], "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}