// Numbas version: finer_feedback_settings {"name": "Hina's copy of Integration by parts 3", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a", "c", "b", "s3", "s2", "s1", "a1", "a2"], "name": "Hina's copy of Integration by parts 3", "tags": ["Calculus", "Steps", "algebraic manipulation", "calculus", "constant of integration", "integrals", "integrating trigonometric functions", "integration", "integration by parts", "steps"], "preamble": {"css": "", "js": ""}, "advice": "
The 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}$ and $\\displaystyle \\frac{dv}{dx} = \\simplify[std]{sin({b}x+{c})}$.
\nSo $\\displaystyle \\frac{du}{dx}$ = $\\var{a}$ and $v = \\simplify[std]{(-1/{b})*cos({b}x+{c})}$.
\nHence,
\\[ \\begin{eqnarray} \\int \\simplify[std]{{a}x*sin({b}x+{c})} dx &=& uv - \\int v \\frac{du}{dx} dx \\\\ &=& \\simplify[std]{(-{a}/{b})*x*cos({b}x+{c})} - \\int \\left( \\simplify[std]{(-{a}/{b})*cos({b}x+{c})}\\right) dx \\\\ &=& \\simplify[std]{(-{a}/{b})*x*cos({b}x+{c}) + ({a}/{b^2})*sin({b}x+{c}) + C} \\end{eqnarray} \\]
For this part we choose $u = \\simplify[std]{{a}x}$ and $\\frac{dv}{dx} = \\simplify[std]{cos({b}x+{c})}$.
\nSo $\\displaystyle \\frac{du}{dx}$ = $\\var{a}$ and $\\displaystyle v = \\simplify[std]{(1/{b})*sin({b}x+{c})}$.
\nHence,
\\[ \\begin{eqnarray} \\int \\simplify[std]{{a}x*cos({b}x+{c})} dx &=& uv - \\int v \\frac{du}{dx} dx \\\\ &=& \\simplify[std]{({a}/{b})*x*sin({b}x+{c})} - \\int \\left( \\simplify[std]{({a}/{b})*sin({b}x+{c})}\\right) dx \\\\ &=& \\simplify[std]{({a}/{b})*x*sin({b}x+{c}) + ({a}/{b^2})*cos({b}x+{c}) + C} \\end{eqnarray} \\]
Using the results from Parts a and b, we have \\[\\begin{eqnarray*}I &=& \\int \\simplify[std]{{a1}x*sin({b}x+{c})} dx + \\int \\simplify[std]{{a2}x*cos({b}x+{c})} dx\\\\ &=& \\simplify[std]{{a1}*((-{a}/{b})*x*cos({b}x+{c}) + ({a}/{b^2})*sin({b}x+{c}))+{a2}*(({a}/{b})*x*sin({b}x+{c}) +({a}/{b^2})*cos({b}x+{c}))+C}\\\\ &=&\\simplify[std]{(-{a1}/{b})*x*cos({b}x+{c}) + ({a1}/{b^2})*sin({b}x+{c})+({a2}/{b})*x*sin({b}x+{c}) +({a2}/{b^2})*cos({b}x+{c}) + C}\\\\ &=&\\simplify[std]{({a2}/{b}*x+{a1}/{b^2})*sin({b}x+{c})+({-a1}/{b}*x+{a2}/{b^2})*cos({b}x+{c})+C} \\end{eqnarray*}\\]
Hence
$\\displaystyle \\simplify[std]{f(x) = {a2}/{b}*x+{a1}/{b^2}}$
$\\displaystyle \\simplify[std]{g(x) = {-a1}/{b}*x+{a2}/{b^2}}$
", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "parts": [{"stepsPenalty": 1, "prompt": "\n$\\displaystyle \\int \\simplify[std]{{a}x*sin({b}x+{c})} dx = \\phantom{{}}$[[0]]
\nInput all numbers as fractions or integers and not decimals.
\nInput the constant of integration as $C$.
\nYou can get help by clicking on Show steps. You will lose 1 mark if you do.
\n ", "marks": 0, "gaps": [{"notallowed": {"message": "Do not input numbers as decimals, only as integers without the decimal point, or fractions
", "showStrings": false, "strings": ["."], "partialCredit": 0}, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "({a}/{b^2})sin({b}x+{c}) - ({a}/{b})*x*cos({b}x+{c}) + C", "marks": 2, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "steps": [{"prompt": "\n \n \nThe formula for integrating by parts is
\\[ \\int u\\frac{dv}{dx} dx = uv - \\int v \\frac{du}{dx} dx. \\]
$\\displaystyle \\int \\simplify[std]{{a}x*cos({b}x+{c})} dx = \\phantom{{}}$[[0]]
\nInput all numbers as fractions or integers and not decimals.
\nInput the constant of integration as $C$.
\n ", "marks": 0, "gaps": [{"notallowed": {"message": "Do not input numbers as decimals, only as integers without the decimal point, or fractions
", "showStrings": false, "strings": ["."], "partialCredit": 0}, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "({a}/{b})*x*sin({b}x+{c}) + ({a}/{b^2})*cos({b}x+{c}) + C", "marks": 2, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "\nUsing the first two parts find:
$\\displaystyle I=\\int \\simplify[std]{{a1}x*sin({b}x+{c})+{a2}x*cos({b}x+{c})} dx $
You are given that \\[I=\\simplify[std]{f(x)*sin({b}x+{c})+g(x)*cos({b}x+{c})+C}\\]
where $f(x)$ and $g(x)$ are polynomials of degree 1. You have to find $f(x)$ and $g(x)$.
$f(x)=\\;$[[0]] $\\;\\;\\;\\;\\;g(x)=\\;$[[1]]
\nInput all numbers as fractions or integers and not decimals.
\n ", "marks": 0, "gaps": [{"notallowed": {"message": "Do not input numbers as decimals, only as integers without the decimal point, or fractions
", "showStrings": false, "strings": ["."], "partialCredit": 0}, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "{a2}/{b}*x+{a1}/{b^2}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}, {"notallowed": {"message": "Do not input numbers as decimals, only as integers without the decimal point, or fractions
", "showStrings": false, "strings": ["."], "partialCredit": 0}, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0, 1], "showpreview": true, "vsetrangepoints": 5, "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "{-a1}/{b}*x+{a2}/{b^2}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "statement": "\nFind the following indefinite integrals.
\nInput all numbers as fractions or integers and not decimals.
\nInput the constant of integration as $C$ where needed.
\n ", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "type": "question", "variables": {"a": {"definition": "1", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "s3*random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "s3": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s3", "description": ""}, "s2": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s2", "description": ""}, "s1": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s1", "description": ""}, "a1": {"definition": "s1*random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "a1", "description": ""}, "a2": {"definition": "s2*random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "a2", "description": ""}}, "metadata": {"notes": "\n \t\t3/08/2012:
\n \t\tAdded tags.
\n \t\tAdded description.
\n \t\tCorrected error in second question answer, + changed to -. Also solution to second gap in third part. Advice changed accordingly.
\n \t\tChecked calculations after corrections. OK.
\n \t\tPenalised use of steps in first part, 1 mark. Added message to that effect.
\n \t\tChanged marks to allow for steps penalty.
\n \t\tImproved Advice display.
\n \t\t", "description": "Find $\\displaystyle \\int x\\sin(cx+d)\\;dx,\\;\\;\\int x\\cos(cx+d)\\;dx $ and hence $\\displaystyle \\int ax\\sin(cx+d)+bx\\cos(cx+d)\\;dx$
", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Hina Ahmed", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1160/"}]}]}], "contributors": [{"name": "Hina Ahmed", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1160/"}]}