// Numbas version: exam_results_page_options {"name": "Integration by parts", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"s1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "s1"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s1*random(1..9)", "description": "", "name": "b"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s3*random(2..5)", "description": "", "name": "c"}, "s3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "s3"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "name": "a"}, "s2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "s2"}, "a1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s1*random(1..9)", "description": "", "name": "a1"}, "a2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s2*random(1..9)", "description": "", "name": "a2"}}, "ungrouped_variables": ["a", "c", "b", "s3", "s2", "s1", "a1", "a2"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Integration by parts", "functions": {}, "showQuestionGroupNames": false, "parts": [{"stepsPenalty": 1, "scripts": {}, "gaps": [{"answer": "({a}/{c})*x+{c*b-a}/{c^2}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "showCorrectAnswer": true, "expectedvariablenames": [], "notallowed": {"message": "

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

", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "answersimplification": "all", "marks": 2, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "\n\t\t\t

$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\t\t\t

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

\n\t\t\t

Input all numbers as fractions or integers and not decimals.

\n\t\t\t

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

\n\t\t\t", "steps": [{"type": "information", "prompt": "\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t

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

\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t", "showCorrectAnswer": true, "scripts": {}, "marks": 0}], "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"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}", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "showCorrectAnswer": true, "expectedvariablenames": [], "notallowed": {"message": "

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

", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "checkvariablenames": false, "type": "jme", "answersimplification": "all", "marks": 3, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "\n\t\t\t

Use the result from the first part to find:

\n\t\t\t

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

\n\t\t\t

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\t\t\t

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

\n\t\t\t

Input all numbers as fractions or integers and not decimals.

\n\t\t\t", "showCorrectAnswer": true, "marks": 0}], "statement": "\n\t

Find the following indefinite integrals.

\n\t

Input all numbers as fractions or integers and not decimals.

\n\t", "tags": ["Calculus", "MAS1601", "Steps", "algebraic manipulation", "checked2015", "exponential function", "integration", "integration by parts", "integration of exponential function"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "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", "licence": "Creative Commons Attribution 4.0 International", "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$. 

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\n\t

a)

\n\t

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

\n\t

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

\n\t

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

\n\t

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\t

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

\n\t

b)

\n\t

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

\n\t

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

\n\t

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\t

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\t

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\t

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}}$

\n\t", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}