// Numbas version: finer_feedback_settings {"name": "Simon's copy of Integration by parts", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variables": {"s1": {"name": "s1", "group": "Ungrouped variables", "definition": "random(1,-1)", "templateType": "anything", "description": ""}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "s1*random(1..9)", "templateType": "anything", "description": ""}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "s2*random(1..9)", "templateType": "anything", "description": ""}, "s3": {"name": "s3", "group": "Ungrouped variables", "definition": "random(1,-1)", "templateType": "anything", "description": ""}, "s2": {"name": "s2", "group": "Ungrouped variables", "definition": "random(1,-1)", "templateType": "anything", "description": ""}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "s1*random(1..9)", "templateType": "anything", "description": ""}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..5)", "templateType": "anything", "description": ""}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "s3*random(2..5)", "templateType": "anything", "description": ""}}, "parts": [{"gaps": [{"checkingaccuracy": 0.001, "answer": "({a}/{c})*x+{c*b-a}/{c^2}", "answersimplification": "all", "marks": 2, "showCorrectAnswer": true, "vsetrangepoints": 5, "scripts": {}, "checkvariablenames": false, "notallowed": {"message": "

Do not input numbers as decimals, only as integers without the decimal point, or fractions

", "showStrings": false, "strings": ["."], "partialCredit": 0}, "expectedvariablenames": [], "vsetrange": [0, 1], "checkingtype": "absdiff", "type": "jme", "showpreview": true}], "steps": [{"type": "information", "showCorrectAnswer": true, "scripts": {}, "prompt": "\n \n \n

The formula for integrating by parts is
\\[ \\int u\\frac{dv}{dx} dx = uv - \\int v \\frac{du}{dx} dx. \\]

\n \n \n ", "marks": 0}], "type": "gapfill", "prompt": "\n

$I=\\displaystyle \\int \\simplify[std]{({a}x+{b})*e^({c}x)} dx $
You are given that the answer is of the form \\[I=g(x)e^{\\var{c}x}+C\\] for a polynomial $g(x)$. You have to find $g(x)$.

\n

$g(x)=\\;$[[0]]

\n

Input all numbers as fractions or integers and not decimals.

\n

You can get help by clicking on Show steps. You will lose 1 mark if you do.

\n ", "marks": 0, "showCorrectAnswer": true, "scripts": {}, "stepsPenalty": 1}, {"gaps": [{"checkingaccuracy": 0.001, "answer": "{a^2}/{c}*x^2+{2*a*b*c-2*a^2}/{c^2}*x+{b^2*c^2-2*a*b*c+2*a^2}/{c^3}", "answersimplification": "all", "marks": 3, "showCorrectAnswer": true, "vsetrangepoints": 5, "scripts": {}, "checkvariablenames": false, "notallowed": {"message": "

Do not input numbers as decimals, only as integers without the decimal point, or fractions

", "showStrings": false, "strings": ["."], "partialCredit": 0}, "expectedvariablenames": [], "vsetrange": [0, 1], "checkingtype": "absdiff", "type": "jme", "showpreview": true}], "type": "gapfill", "prompt": "\n

Use the result from the first part to find:

\n

$\\displaystyle I=\\int \\simplify[std]{({a}x+{b})^2*e^({c}x)} dx $

\n

You are given that the answer is of the form \\[I=h(x)e^{\\var{c}x}+C\\] for a polynomial $h(x)$. You have to find $h(x)$.

\n

$h(x)=\\;$[[0]]

\n

Input all numbers as fractions or integers and not decimals.

\n ", "marks": 0, "showCorrectAnswer": true, "scripts": {}}], "functions": {}, "ungrouped_variables": ["a", "c", "b", "s3", "s2", "s1", "a1", "a2"], "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "name": "Simon's copy of Integration by parts", "preamble": {"css": "", "js": ""}, "metadata": {"notes": "\n \t\t

3/08/2012:

\n \t\t

Added tags.

\n \t\t

Added description.

\n \t\t

Checked calculation. OK.

\n \t\t

Got rid of redundant instructions about inputting constant of integration.

\n \t\t

Penalised use of steps in first part, 1 mark. Added message to that effect in first part.

\n \t\t

Added message about not inputting decimals in appropriate places.

\n \t\t

Changed marks reflecting the use of steps and degree of difficulty in second part.

\n \t\t

Improved Advice display.

\n \t\t", "description": "

Given $\\displaystyle \\int (ax+b)e^{cx}\\;dx =g(x)e^{cx}+C$, find $g(x)$. Find $h(x)$, $\\displaystyle \\int (ax+b)^2e^{cx}\\;dx =h(x)e^{cx}+C$. 

", "licence": "Creative Commons Attribution 4.0 International"}, "advice": "

a)

\n

The formula for integrating by parts is
\\[ \\int u\\frac{dv}{dx} dx = uv - \\int v \\frac{du}{dx} dx. \\]

\n

We choose $u = \\simplify[std]{{a}x+{b}}$ and $\\displaystyle\\frac{dv}{dx} = \\simplify[std]{e^({c}x)}$.

\n

So $\\displaystyle \\frac{du}{dx} = \\var{a}$ and $\\displaystyle v = \\simplify[std]{(1/{c})*e^({c}*x)}$.

\n

Hence,
\\[ \\begin{eqnarray} \\int \\simplify[std]{({a}*x+{b})*e^({c}*x)} dx &=& uv - \\int v \\frac{du}{dx} dx \\\\ &=& \\simplify[std]{({1}/{c})*({a}x+{b})*e^({c}x) - (1/{c})*Int(({a})*e^({c}x),x)} \\\\ &=& \\simplify[std]{(1/{c})*({a}x+{b})*e^({c}x) -({a}/{c^2})*e^({c}x) + C}\\\\ &=& \\simplify[std]{(({a}x+{b})/{c}-{a}/{c^2})*e^({c}*x) + C}\\\\ &=& \\simplify[std]{(({a}/{c})x+{b*c-a}/{c^2})*e^({c}*x) + C} \\end{eqnarray} \\]

\n

Hence $\\displaystyle \\simplify[std]{g(x)=({a}/{c})*x+{c*b-a}/{c^2}}$

\n

b)

\n

For this part we choose $u = \\simplify[std]{({a}x+{b})^2}$ and $\\displaystyle \\frac{dv}{dx} = \\simplify[std]{e^({c}x)}$.

\n

So $\\displaystyle \\frac{du}{dx}$ = $\\simplify[std]{{2*a}*({a}*(x)+{b})}$ and $\\displaystyle v = \\simplify[std]{(1/{c})*e^({c}*x)}$.

\n

Hence,
\\[ \\begin{eqnarray*}I= \\int \\simplify[std]{({a}*x+{b})^2*e^({c}*x)} dx &=& uv - \\int v \\frac{du}{dx} dx \\\\ &=& \\simplify[std]{({1}/{c})*({a}x+{b})^2*e^({c}x) - (1/{c})*Int({2*a}*({a}x+{b})*e^({c}x),x)} \\\\ &=& \\simplify[std]{(1/{c})*({a}x+{b})^2*e^({c}x) -({2*a}/{c})*Int(({a}x+{b})*e^({c}x),x)}\\dots (*) \\end{eqnarray*}\\]

\n

But in Part a we have aready worked out $\\displaystyle \\simplify[std]{Int(({a}x+{b})*e^({c}*x),x)=(({a}/{c})*x+({c*b-a}/{c^2}))*e^({c}*x)+C}$ 

\n

So on substituting this in equation (*) we find:
\\[ \\begin{eqnarray*}I&=& \\simplify[std]{(1/{c})*({a}x+{b})^2*e^({c}x) -({2*a}/{c})*(({a}/{c})*x+({c*b-a}/{c^2}))*e^({c}*x)+C}\\\\ &=& \\simplify[std]{({a^2}/{c}*x^2+{2*a*b*c-2*a^2}/{c^2}*x+{b^2*c^2-2*a*b*c+2*a^2}/{c^3})*e^({c}x) +C} \\end{eqnarray*}\\]

\n

Hence $\\displaystyle \\simplify[std]{h(x)={a^2}/{c}*x^2+{2*a*b*c-2*a^2}/{c^2}*x+{b^2*c^2-2*a*b*c+2*a^2}/{c^3}}$

", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "variable_groups": [], "type": "question", "tags": ["Calculus", "Steps", "algebraic manipulation", "calculus", "exponential function", "integrals", "integration", "integration by parts", "integration of exponential function", "steps"], "variablesTest": {"maxRuns": 100, "condition": ""}, "statement": "\n

Find the following indefinite integrals.

\n

Input all numbers as fractions or integers and not decimals.

\n ", "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/"}], "resources": []}]}], "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/"}]}