// 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": [{"name": "Integration by parts", "tags": [], "metadata": {"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"}, "statement": "\n\t

Find the following indefinite integrals.

\n\t

Input all numbers as fractions or integers and not decimals.

\n\t

Input the constant of integration as $C$ where needed.

\n\t", "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}$ and $\\displaystyle \\frac{dv}{dx} = \\simplify[std]{sin({b}x+{c})}$.

\n\t

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

\n\t

Hence,
\\[ \\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} \\]

\n\t

b)

\n\t

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

\n\t

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

\n\t

Hence,
\\[ \\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} \\]

\n\t

c)

\n\t

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

\n\t

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

\n\t", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "extensions": [], "variables": {"s1": {"name": "s1", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything"}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "s3*random(1..9)", "description": "", "templateType": "anything"}, "s3": {"name": "s3", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "1", "description": "", "templateType": "anything"}, "s2": {"name": "s2", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "templateType": "anything"}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "s1*random(1..9)", "description": "", "templateType": "anything"}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "s2*random(1..9)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "c", "b", "s3", "s2", "s1", "a1", "a2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "\n\t\t\t

$\\displaystyle \\int \\simplify[std]{{a}x*sin({b}x+{c})} dx = \\phantom{{}}$[[0]]

\n\t\t\t

Input all numbers as fractions or integers and not decimals.

\n\t\t\t

Input the constant of integration as $C$.

\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", "stepsPenalty": 1, "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "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"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 2, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "({a}/{b^2})sin({b}x+{c}) - ({a}/{b})*x*cos({b}x+{c}) + C", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "notallowed": {"strings": ["."], "showStrings": false, "partialCredit": 0, "message": "

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

"}, "valuegenerators": [{"name": "c", "value": ""}, {"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "\n\t\t\t

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

\n\t\t\t

Input all numbers as fractions or integers and not decimals.

\n\t\t\t

Input the constant of integration as $C$.

\n\t\t\t", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 2, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "({a}/{b})*x*sin({b}x+{c}) + ({a}/{b^2})*cos({b}x+{c}) + C", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "notallowed": {"strings": ["."], "showStrings": false, "partialCredit": 0, "message": "

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

"}, "valuegenerators": [{"name": "c", "value": ""}, {"name": "x", "value": ""}]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "\n\t\t\t

Using 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)$.

\n\t\t\t

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

\n\t\t\t

Input all numbers as fractions or integers and not decimals.

\n\t\t\t", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{a2}/{b}*x+{a1}/{b^2}", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "notallowed": {"strings": ["."], "showStrings": false, "partialCredit": 0, "message": "

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

"}, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{-a1}/{b}*x+{a2}/{b^2}", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "notallowed": {"strings": ["."], "showStrings": false, "partialCredit": 0, "message": "

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

"}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Simon Vaughan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1135/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Simon Vaughan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1135/"}]}