// 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": "random(2..5)", "description": "", "name": "c"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s2*random(1..9)", "description": "", "name": "d"}, "s2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "s2"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "name": "a"}}, "ungrouped_variables": ["a", "c", "b", "d", "s2", "s1"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Integration by parts", "functions": {}, "showQuestionGroupNames": false, "parts": [{"stepsPenalty": 1, "scripts": {}, "gaps": [{"answer": "({a}*x+{b})/{c}*sin({c}*x+{d})+{a}/{c^2}*cos({c}*x+{d})+C", "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": "std", "marks": 2, "vsetrangepoints": 5}], "type": "gapfill", "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 ", "steps": [{"type": "information", "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 ", "showCorrectAnswer": true, "scripts": {}, "marks": 0}], "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"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", "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": "std", "marks": 4, "vsetrangepoints": 5}], "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 ", "showCorrectAnswer": true, "marks": 0}], "statement": "\n

Find the following indefinite integrals.

\n

Input all numbers as fractions or integers and not decimals.

\n

Input the constant of integration as $C$.

\n ", "tags": ["Calculus", "MAS1601", "Steps", "checked2015", "constant of integration", "indefinite integration", "integrating", "integrating trigonometric functions", "integration", "integration by parts", "twice"], "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

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

Checked calculation. OK.

\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": "

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

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "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 ", "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/"}]}