// 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": [{"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$ where needed.

\n ", "preamble": {"js": "", "css": ""}, "functions": {}, "name": "Integration by parts", "variables": {"b": {"definition": "random(2..5)", "description": "", "templateType": "anything", "name": "b", "group": "Ungrouped variables"}, "s1": {"definition": "random(1,-1)", "description": "", "templateType": "anything", "name": "s1", "group": "Ungrouped variables"}, "s2": {"definition": "random(1,-1)", "description": "", "templateType": "anything", "name": "s2", "group": "Ungrouped variables"}, "c": {"definition": "s3*random(1..9)", "description": "", "templateType": "anything", "name": "c", "group": "Ungrouped variables"}, "a": {"definition": "1", "description": "", "templateType": "anything", "name": "a", "group": "Ungrouped variables"}, "a1": {"definition": "s1*random(1..9)", "description": "", "templateType": "anything", "name": "a1", "group": "Ungrouped variables"}, "a2": {"definition": "s2*random(1..9)", "description": "", "templateType": "anything", "name": "a2", "group": "Ungrouped variables"}, "s3": {"definition": "random(1,-1)", "description": "", "templateType": "anything", "name": "s3", "group": "Ungrouped variables"}}, "extensions": [], "variable_groups": [], "ungrouped_variables": ["a", "c", "b", "s3", "s2", "s1", "a1", "a2"], "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"}, "tags": [], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "advice": "

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

\n

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

\n

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

b)

\n

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

\n

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

\n

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

c)

\n

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

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

", "parts": [{"adaptiveMarkingPenalty": 0, "prompt": "\n

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

\n

Input all numbers as fractions or integers and not decimals.

\n

Input the constant of integration as $C$.

\n

You can get help by clicking on Show steps. You will lose 1 mark if you do.

\n ", "useCustomName": false, "unitTests": [], "sortAnswers": false, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "variableReplacements": [], "gaps": [{"answer": "({a}/{b^2})sin({b}x+{c}) - ({a}/{b})*x*cos({b}x+{c}) + C", "unitTests": [], "failureRate": 1, "showPreview": true, "notallowed": {"strings": ["."], "message": "

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

", "partialCredit": 0, "showStrings": false}, "type": "jme", "vsetRange": [0, 1], "showCorrectAnswer": true, "valuegenerators": [{"value": "", "name": "c"}, {"value": "", "name": "x"}], "customName": "", "showFeedbackIcon": true, "vsetRangePoints": 5, "extendBaseMarkingAlgorithm": true, "adaptiveMarkingPenalty": 0, "useCustomName": false, "checkingType": "absdiff", "scripts": {}, "customMarkingAlgorithm": "", "checkVariableNames": false, "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "answerSimplification": "std", "variableReplacements": [], "marks": 2}], "type": "gapfill", "steps": [{"adaptiveMarkingPenalty": 0, "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 ", "useCustomName": false, "unitTests": [], "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "variableReplacements": [], "type": "information", "marks": 0, "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "customName": "", "showFeedbackIcon": true, "scripts": {}}], "marks": 0, "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "customName": "", "showFeedbackIcon": true, "stepsPenalty": 1, "scripts": {}}, {"adaptiveMarkingPenalty": 0, "prompt": "\n

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

\n

Input all numbers as fractions or integers and not decimals.

\n

Input the constant of integration as $C$.

\n ", "useCustomName": false, "unitTests": [], "sortAnswers": false, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "variableReplacements": [], "type": "gapfill", "marks": 0, "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "customName": "", "showFeedbackIcon": true, "gaps": [{"answer": "({a}/{b})*x*sin({b}x+{c}) + ({a}/{b^2})*cos({b}x+{c}) + C", "unitTests": [], "failureRate": 1, "showPreview": true, "notallowed": {"strings": ["."], "message": "

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

", "partialCredit": 0, "showStrings": false}, "type": "jme", "vsetRange": [0, 1], "showCorrectAnswer": true, "valuegenerators": [{"value": "", "name": "c"}, {"value": "", "name": "x"}], "customName": "", "showFeedbackIcon": true, "vsetRangePoints": 5, "extendBaseMarkingAlgorithm": true, "adaptiveMarkingPenalty": 0, "useCustomName": false, "checkingType": "absdiff", "scripts": {}, "customMarkingAlgorithm": "", "checkVariableNames": false, "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "answerSimplification": "std", "variableReplacements": [], "marks": 2}], "scripts": {}}, {"adaptiveMarkingPenalty": 0, "prompt": "\n

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

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

\n

Input all numbers as fractions or integers and not decimals.

\n ", "useCustomName": false, "unitTests": [], "sortAnswers": false, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "variableReplacements": [], "type": "gapfill", "marks": 0, "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "customName": "", "showFeedbackIcon": true, "gaps": [{"answer": "{a2}/{b}*x+{a1}/{b^2}", "unitTests": [], "failureRate": 1, "showPreview": true, "notallowed": {"strings": ["."], "message": "

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

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

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

", "partialCredit": 0, "showStrings": false}, "type": "jme", "vsetRange": [0, 1], "showCorrectAnswer": true, "valuegenerators": [{"value": "", "name": "x"}], "customName": "", "showFeedbackIcon": true, "vsetRangePoints": 5, "extendBaseMarkingAlgorithm": true, "adaptiveMarkingPenalty": 0, "useCustomName": false, "checkingType": "absdiff", "scripts": {}, "customMarkingAlgorithm": "", "checkVariableNames": false, "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "answerSimplification": "std", "variableReplacements": [], "marks": 1}], "scripts": {}}], "variablesTest": {"condition": "", "maxRuns": 100}, "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Kevin Bohan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3363/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}, {"name": "Andrew McKinley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3717/"}]}]}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Kevin Bohan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3363/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}, {"name": "Andrew McKinley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3717/"}]}