// Numbas version: finer_feedback_settings {"name": "Integration with Partial Fractions 7", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Integration with Partial Fractions 7", "tags": [], "metadata": {"description": "
Calculating the integral of a function of the form $\\frac{nx+k}{(x+a)(x+b)(x+c)}$ using partial fractions.
", "licence": "None specified"}, "statement": "Calculate the integral
\n\\[ \\simplify{int(({n}x+{k})/((x+{a})(x+{b})(x+{c})),x)}. \\]
", "advice": "In order to integrate the function \\[ \\simplify{({n}x+{k})/((x+{a})(x+{b})(x+{c}))}, \\] we want to rewrite it in terms of its partial fractions.
\nTo do this, we want to set the function equal to the sum of 3 fractions with denominators $\\simplify{x+{a}}$, $\\simplify{x+{b}}$, and $\\simplify{x+{c}}$. Since these are all distinct linear factors, this tells us that the numerators will be constants, which we will call $A$, $B$, and $C$:
\n\\[ \\simplify{({n}x+{k})/((x+{a})(x+{b})(x+{c}))} = \\simplify{A/(x+{a}) + B/(x+{b})+ C/(x+{c})}.\\]
\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+{b})(x+{c})+B(x+{a})(x+{c}) + C(x+{a})(x+{b})}.\\]
\n\nTo find $A$, we can eliminate $B$ and $C$ by setting $x=\\var{-a}$:
\n\\[ \\simplify{{k}-{n*a}=A{(b-a)(c-a)}} \\implies A=\\simplify[fractionNumbers]{{Asol}}.\\]
\nFinding $B$ by setting $x=\\var{-b}$:
\n\\[ \\simplify{{k}-{n*b}=B{(a-b)(c-b)}} \\implies B=\\simplify[fractionNumbers]{{Bsol}}.\\]
\nFinally, setting $x=\\var{-c}$ we can find C:
\n\\[ \\simplify{{k}-{n*c}=C{(a-c)(b-c)}} \\implies C=\\simplify[fractionNumbers]{{Csol}}.\\]
\nTherefore,
\n{check}
\nHence,
\n\\[ \\begin{split} \\simplify{int(({n}x+{k})/((x+{a})(x+{b})(x+{c})),x)} &\\,= \\simplify[all,fractionNumbers]{int({Asol}/(x+{a})+{Bsol}/(x+{b})+{Csol}/(x+{c}),x)}\\\\ \\\\ &\\,=\\simplify[basic,fractionNumbers,zeroTerm,unitFactor,noLeadingMinus]{{Asol} int(1/(x+{a}),x)+{Bsol} int(1/(x+{b}),x)+{Csol} int(1/(x+{c}),x)} \\\\\\\\ &\\,=\\simplify[basic,fractionNumbers,zeroTerm,unitFactor,noLeadingMinus]{{Asol} ln (abs(x+{a}))+{Bsol} ln (abs(x+{b}))+{Csol} ln (abs(x+{c})) + C}. \\end{split}\\]
", "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": "random(-6..6 except [0,a])", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-6..6 except [a,b])", "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)/((b-a)*(c-a))", "description": "", "templateType": "anything", "can_override": false}, "Bsol": {"name": "Bsol", "group": "Ungrouped variables", "definition": "(k-n*b)/((a-b)*(c-b))", "description": "", "templateType": "anything", "can_override": false}, "Csol": {"name": "Csol", "group": "Ungrouped variables", "definition": "(k-n*c)/((a-c)*(b-c))", "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+{k})/((x+{a})(x+{b})(x+{c}))} = \\\\simplify{{Asol}/(x+{a})+{Bsol}/(x+{b})+{Csol}/(x+{c})}.\\\\]
\"", "description": "", "templateType": "long string", "can_override": false}, "sol2": {"name": "sol2", "group": "Ungrouped variables", "definition": "\"\\\\[ \\\\simplify{({n}x+{k})/((x+{a})(x+{b})(x+{c}))} = \\\\simplify[all,fractionNumbers]{{k-n*a}/({(a-b)(a-c)}(x+{a}))+{k-n*b}/({(b-a)(b-c)}(x+{b}))+{k-n*c}/({(c-a)(c-b)}(x+{c}))} .\\\\]
\"", "description": "", "templateType": "long string", "can_override": false}, "k": {"name": "k", "group": "Ungrouped variables", "definition": "random(-5..5 except [n*a,n*b,n*c])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "n", "k", "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, "alternatives": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "answer": "{Asol}ln(x+{a})+{Bsol}ln(x+{b})+{Csol}ln(x+{c})+c", "answerSimplification": "fractionNumbers", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "c", "value": ""}, {"name": "x", "value": ""}]}], "answer": "{Asol}ln(abs(x+{a}))+{Bsol}ln(abs(x+{b}))+{Csol}ln(abs(x+{c}))+c", "answerSimplification": "all,!collectLikeFractions,fractionNumbers", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "c", "value": ""}, {"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/"}]}