// Numbas version: finer_feedback_settings {"name": "Simon's copy of Integration by partial fractions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"extensions": [], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "statement": "\n
Find the following integral.
\n\\[I = \\simplify[std]{Int(({c}*x+{d})/((x +{a})*(x+{b})),x )}\\]
\nInput all numbers as fractions or integers and not decimals.
\nInput the constant of integration as $C$.
\n \n ", "advice": "Using partial fractions we have to find $A$ and $B$ such that:
\\[\\simplify[std]{({c}*x+{d})/((x +{a})*(x+{b}))}\\;= \\simplify[std]{A/(x+{a})+B/(x+{b})}\\]
Multiplying both sides of the equation by $\\displaystyle \\simplify[std]{((x +{a})*(x+{b}))}$ we obtain:
$\\simplify[std]{A*(x+{b})+B*(x+{a}) = {c}*x+{d}} \\Rightarrow \\simplify[std]{(A+B)*x+{b}*A+{a}*B={c}*x+{d}}$
\nOne method to find A and B is by comparing coefficients:
\nIdentifying coefficients:
\nConstant term: $\\simplify[std]{{b}*A+{a}*B = {d}}$
\nCoefficient of $x$: $ \\simplify[std]{A+B={c}}$ which gives $A =\\var{c} -B$
\nOn solving these simultaneous equations we obtain $\\displaystyle \\simplify[std]{A = {d-a*c}/{b-a}}$ and $\\displaystyle \\simplify[std]{B={d-b*c}/{a-b}}$
\nWhich gives: \\[\\simplify[std]{({c}*x+{d})/((x +{a})*(x+{b}))}\\; =\\simplify[std]{ ({d-a*c}/{b-a})*(1/(x+{a}) )+({d-b*c}/{a-b})*(1/(x+{b}))}\\]
\nSo \\[\\begin{eqnarray*} I &=& \\simplify[std]{Int(({c}*x+{d})/((x +{a})*(x+{b})),x )}\\\\ &=& \\simplify[std]{({d-a*c}/{b-a})*(Int(1/(x+{a}),x)) +({d-b*c}/{a-b})Int(1/(x+{b}),x)}\\\\ &=& \\simplify[std]{({d-a*c}/{b-a})*ln(x+{a})+({d-b*c}/{a-b})*ln(x+{b})+C} \\end{eqnarray*}\\]
", "variablesTest": {"maxRuns": 100, "condition": ""}, "ungrouped_variables": ["d1", "b1", "c", "d", "s3", "a", "s2", "s1", "b"], "metadata": {"description": "Find $\\displaystyle\\int \\frac{ax+b}{(x+c)(x+d)}\\;dx,\\;a\\neq 0,\\;c \\neq d $.
", "licence": "Creative Commons Attribution 4.0 International"}, "preamble": {"css": "", "js": ""}, "parts": [{"sortAnswers": false, "marks": 0, "steps": [{"extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "marks": 0, "unitTests": [], "showCorrectAnswer": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "scripts": {}, "prompt": "\nUse partial fractions in order to write:
\\[\\simplify[std]{({c}*x+{d})/((x +{a})*(x+{b}))}\\; = \\simplify[std]{A/(x+{a})+B/(x+{b})}\\]
for suitable integers or fractions $A$ and $B$.
\n ", "type": "information", "showFeedbackIcon": true}], "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "prompt": "\n$I=\\;$[[0]]
\nInput all numbers as fractions or integers and not decimals.
\nInput the constant of integration as $C$.
\nClick on Show steps for help if you need it. You will lose 1 mark if you do so.
\n \n ", "unitTests": [], "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "type": "gapfill", "stepsPenalty": 1, "variableReplacements": [], "gaps": [{"showPreview": true, "marks": 3, "showCorrectAnswer": true, "notallowed": {"strings": ["."], "showStrings": false, "message": "Input all numbers as fractions or integers and not decimals.
", "partialCredit": 0}, "checkingType": "absdiff", "variableReplacementStrategy": "originalfirst", "scripts": {}, "expectedVariableNames": [], "unitTests": [], "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "failureRate": 1, "type": "jme", "vsetRangePoints": 5, "answer": "({d-a*c}/{b-a})*ln(x+{a})+({d-b*c}/{a-b})*ln(x+{b})+C", "variableReplacements": [], "checkVariableNames": false, "checkingAccuracy": 0.0001, "vsetRange": [11, 12], "answerSimplification": "std"}]}], "name": "Simon's copy of Integration by partial fractions", "tags": [], "variable_groups": [], "variables": {"d1": {"definition": "s3*random(1..9)", "description": "", "templateType": "anything", "name": "d1", "group": "Ungrouped variables"}, "s2": {"definition": "random(1,-1)", "description": "", "templateType": "anything", "name": "s2", "group": "Ungrouped variables"}, "c": {"definition": "random(2..9)", "description": "", "templateType": "anything", "name": "c", "group": "Ungrouped variables"}, "b1": {"definition": "s2*random(1..9)", "description": "", "templateType": "anything", "name": "b1", "group": "Ungrouped variables"}, "s3": {"definition": "random(1,-1)", "description": "", "templateType": "anything", "name": "s3", "group": "Ungrouped variables"}, "a": {"definition": "s1*random(1..9)", "description": "", "templateType": "anything", "name": "a", "group": "Ungrouped variables"}, "d": {"definition": "if(d1=a*c,if(d1+1=b*c,d1+2,d1+1),if(d1=b*c,if(d1+1=a*c,d1+2,d1+1),d1))", "description": "", "templateType": "anything", "name": "d", "group": "Ungrouped variables"}, "s1": {"definition": "random(1,-1)", "description": "", "templateType": "anything", "name": "s1", "group": "Ungrouped variables"}, "b": {"definition": "if(b1=a,b1+s3,b1)", "description": "", "templateType": "anything", "name": "b", "group": "Ungrouped variables"}}, "functions": {}, "type": "question", "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}