// 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)
\nThe formula for integrating by parts is
\\[ \\int u\\frac{dv}{dx} dx = uv - \\int v \\frac{du}{dx} dx. \\]
We choose $u = \\simplify[std]{({a}x+{b})}$ and $\\displaystyle \\frac{dv}{dx} = \\simplify[std]{cos({c}*x+{d})}$.
\nSo $\\displaystyle \\frac{du}{dx} = \\simplify[std]{{a}}$ and $\\displaystyle v = \\simplify[std]{(1/{c})*sin({c}*x+{d})}$.
\nHence,
\\[ \\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} \\]
b)
\nFor this part we choose $u = \\simplify[std]{({a}x+{b})^2}$ and $\\displaystyle \\frac{dv}{dx} = \\simplify[std]{sin({c}*x+{d})}$.
\nSo $\\displaystyle \\frac{du}{dx}=\\simplify[std]{{2*a}*({a}*(x)+{b})}$ and $\\displaystyle v = \\simplify[std]{-(1/{c})*cos({c}*x+{d})}$.
\nHence,
\\[ \\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*}\\]
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})}$
\nSo 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*}\\]
c)
\nLet $\\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*}\\]
\nNote that after integrating by parts twice, we have the integral $A$ on both sides of this equation.
\nRearranging 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]]
\nInput all numbers as fractions or integers and not decimals.
\nYou 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 \nThe formula for integrating by parts is
\\[ \\int u\\frac{dv}{dx} dx = uv - \\int v \\frac{du}{dx} dx. \\]
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]]
\nInput 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": "\nFind $\\displaystyle \\simplify[std]{int(exp({c1}x)*({u}*sin({d1}x)+{1-u}*cos({d1}x)),x)}$.
\nInput all numbers as fractions or integers and not decimals.
\nInput 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": "\nFind the following indefinite integrals using integration by parts.
\nInput all numbers as fractions or integers and not decimals.
\nInput 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\t3/08/2012:
\n \t\t \t\t \t\tAdded tags.
\n \t\t \t\t \t\tAdded description.
\n \t\t \t\t \t\tGot 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\tChecked calculation. OK.
\n \t\t \t\t \t\tPenalised use of steps in first part, 1 mark. Added message to that effect in first part.
\n \t\t \t\t \t\tAdded message about not inputting decimals in appropriate places.
\n \t\t \t\t \t\tChanged marks reflecting the use of steps and degree of difficulty in second part.
\n \t\t \t\t \t\tImproved Advice display.
\n \t\t \t\t \n \t\t \n \t\t", "description": "\n \t\tFind $\\displaystyle \\int (ax+b)\\cos(cx+d)\\; dx $ and hence find $\\displaystyle \\int (ax+b)^2\\sin(cx+d)\\; dx $
\n \t\tAlso 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/"}]}