// Numbas version: exam_results_page_options {"name": "Leicester: Integration 3", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "name": "Leicester: Integration 3", "tags": ["Calculus", "Steps", "calculus", "constant of integration", "indefinite integration", "integrals", "integrating", "integrating trigonometric functions", "integration by parts", "steps", "twice"], "advice": "\n

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]{cos({c}*x+{d})}$.

\n

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

\n

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

\n

b)

\n

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

\n

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

\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*cos({c}*x+{d}) + (1/{c})*Int({2*a}*({a}x+{b})*cos({c}*x+{d}),x)} \\\\ &=& \\simplify[std]{({-1}/{c})*({a}x+{b})^2*cos({c}*x+{d}) +({2*a}/{c})*Int(({a}x+{b})*cos({c}*x+{d}),x)}\\dots (*) \\end{eqnarray*}\\]

\n

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

\n

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

\n

c)

\n

Let $\\displaystyle A= \\simplify[std]{int(exp({c1}x)*( {u}*sin({d1}x)+{1-u}*cos({d1}x)),x)} $. We solve this using two integration by parts, and we choose $u = \\simplify[std]{ {u}*sin({d1}x)+{1-u}*cos({d1}x)}$ in both. 

\n

\\[\\begin{eqnarray*} A&=&\\simplify[std]{ 1/{c1}exp({c1}x)*( {u}*sin({d1}x)+{1-u}*cos({d1}x))+{((-1)^u)*d1}/{c1}int(exp({c1}x) *({u}*cos({d1}x)+{(1-u)}*sin({d1}x)),x)}\\\\&=&\\simplify[std]{1/{c1}exp({c1}x)*( {u}*sin({d1}x)+{1-u}*cos({d1}x))+{((-1)^u)*d1}/{c1}*(1/{c1}exp({c1}x)*( {u}*cos({d1}x)+{1-u}*sin({d1}x))+{(-1)^(u+1)*d1}/{c1}int(exp({c1}x)*( {u}*sin({d1}x)+{1-u}*cos({d1}x)),x) )}\\\\&=&\\simplify[std]{1/{c1}exp({c1}x)*( {u}*sin({d1}x)+{1-u}*cos({d1}x))+{((-1)^u)*d1}/{c1}*(1/{c1}exp({c1}x)*( {u}*cos({d1}x)+{1-u}*sin({d1}x))+{(-1)^(u+1)*d1}/{c1}A )}\\end{eqnarray*}\\]

\n

Note that after integrating by parts twice, we have the integral $A$ on both sides of this equation.

\n

Rearranging we have: \\[A = \\simplify[std]{e^({c1}x)/{c1^2+d1^2}*(({u*(c1-d1)+d1})*sin({d1}x)+({u*(-c1-d1)+c1})*cos({d1}x))+C}\\]

\n ", "rulesets": {"std": ["all", "fractionNumbers", "!noLeadingMinus", "!collectNumbers"]}, "parts": [{"stepspenalty": 1.0, "prompt": "\n

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

\n

$I=\\;$[[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 ", "gaps": [{"notallowed": {"message": "

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

", "showstrings": false, "strings": ["."], "partialcredit": 0.0}, "checkingaccuracy": 0.001, "vsetrange": [0.0, 1.0], "vsetrangepoints": 5.0, "checkingtype": "absdiff", "answersimplification": "std", "marks": 2.0, "answer": "({a}*x+{b})/{c}*sin({c}*x+{d})+{a}/{c^2}*cos({c}*x+{d})+C", "type": "jme"}], "steps": [{"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 \n \n ", "type": "information", "marks": 0.0}], "marks": 0.0, "type": "gapfill"}, {"prompt": "\n

Use the result from the first part to find:

\n

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

\n

$I=\\;$[[0]]

\n

Input all numbers as fractions or integers and not decimals.

\n \n \n ", "gaps": [{"notallowed": {"message": "

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

", "showstrings": false, "strings": ["."], "partialcredit": 0.0}, "checkingaccuracy": 0.001, "vsetrange": [0.0, 1.0], "vsetrangepoints": 5.0, "checkingtype": "absdiff", "answersimplification": "std", "marks": 4.0, "answer": "(-({a}*x+{b})^2/{c})*cos({c}*x+{d})+(({2*a}({a}x+{b}))/{c^2})*sin({c}*x+{d})+({2*a^2}/{c^3})*cos({c}*x+{d})+C", "type": "jme"}], "type": "gapfill", "marks": 0.0}, {"notallowed": {"message": "

Input all numbers as fractions or integers and not decimals.

", "showstrings": false, "strings": ["."], "partialcredit": 0.0}, "prompt": "\n

Find $\\displaystyle \\simplify[std]{int(exp({c1}x)*({u}*sin({d1}x)+{1-u}*cos({d1}x)),x)}$.

\n

Input all numbers as fractions or integers and not decimals.

\n

Input your answer here:

\n ", "checkingaccuracy": 0.001, "vsetrange": [0.0, 1.0], "vsetrangepoints": 5.0, "checkingtype": "absdiff", "answersimplification": "std", "marks": 3.0, "answer": "e^({c1}x)/{c1^2+d1^2}*(({u*(c1-d1)+d1})*sin({d1}x)+({u*(-c1-d1)+c1})*cos({d1}x))+C", "type": "jme"}], "extensions": [], "statement": "\n

Find the following indefinite integrals using integration by parts.

\n

Input all numbers as fractions or integers and not decimals.

\n

Input the constant of integration as $C$.

\n ", "variable_groups": [], "progress": "ready", "type": "question", "variables": {"a": {"definition": "random(2..5)", "name": "a"}, "c": {"definition": "random(2..5)", "name": "c"}, "b": {"definition": "s1*random(1..9)", "name": "b"}, "d": {"definition": "s2*random(1..9)", "name": "d"}, "s2": {"definition": "random(1,-1)", "name": "s2"}, "s1": {"definition": "random(1,-1)", "name": "s1"}, "u": {"definition": "random(0,1)", "name": "u"}, "c1": {"definition": "random(2..6)", "name": "c1"}, "d1": {"definition": "random(2..6)", "name": "d1"}}, "metadata": {"notes": "\n \t\t \t\t \t\t

3/08/2012:

\n \t\t \t\t \t\t

Added tags.

\n \t\t \t\t \t\t

Added description.

\n \t\t \t\t \t\t

Got rid of redundant ruleset, added !noLeadingMinus to std ruleset as we need to keep the standard order for integrating by parts.

\n \t\t \t\t \t\t

Checked calculation. OK.

\n \t\t \t\t \t\t

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

\n \t\t \t\t \t\t

Added message about not inputting decimals in appropriate places.

\n \t\t \t\t \t\t

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

\n \t\t \t\t \t\t

Improved Advice display.

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

Find $\\displaystyle \\int (ax+b)\\cos(cx+d)\\; dx $ and hence find $\\displaystyle \\int (ax+b)^2\\sin(cx+d)\\; dx $ 

\n \t\t

Also two other questions on integrating by parts.

\n \t\t", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}]}]}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}]}