// Numbas version: finer_feedback_settings {"questions": [], "duration": 0, "name": "Integration by parts", "showQuestionGroupNames": false, "allQuestions": true, "percentPass": 0, "feedback": {"showanswerstate": true, "advicethreshold": 0, "showactualmark": true, "allowrevealanswer": true, "showtotalmark": true, "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "never"}, "shuffleQuestions": false, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Find indefinite integrals of hyperbolic functions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"s1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "name": "s1", "description": ""}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s1*random(1..9)", "name": "b", "description": ""}, "b1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s2*random(1..9)", "name": "b1", "description": ""}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..9)", "name": "a", "description": ""}, "s2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "name": "s2", "description": ""}, "a1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..9)", "name": "a1", "description": ""}}, "ungrouped_variables": ["a", "b", "s2", "s1", "a1", "b1"], "functions": {}, "preamble": {"css": "", "js": ""}, "parts": [{"customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "prompt": "
$f(x)=\\simplify[std]{ cosh({a}x+{b})}$
\n$\\displaystyle{\\int f(x)\\;dx=\\;\\;}$[[0]]
\nYou must include the constant of integration as $C$.
\nInput all numbers as integers or fractions – not as decimals.
", "unitTests": [], "sortAnswers": false, "scripts": {}, "gaps": [{"answer": "(1 / {a}) * sinh({a} * x + {b})+C", "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "vsetRangePoints": 5, "expectedVariableNames": [], "unitTests": [], "notallowed": {"message": "Input all numbers as integers or fractions – not as decimals.
", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "checkingType": "absdiff", "checkVariableNames": false, "vsetRange": [0, 1], "marks": 3, "showFeedbackIcon": true, "scripts": {}, "answerSimplification": "std", "type": "jme", "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "showPreview": true, "variableReplacements": [], "failureRate": 1}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 0, "showFeedbackIcon": true}, {"customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "prompt": "$f(x)=\\simplify[std]{x*sinh({a1}x+{b1})}$
\n$\\displaystyle{\\int f(x)\\;dx=\\;\\;}$[[0]]
\nInclude the constant of integration as $C$.
\nInput all numbers as integers or fractions – not as decimals.
\nPlease note that if you want to enter a function of the form $xf(x)$ then enter as $x*f(x)$.
", "unitTests": [], "sortAnswers": false, "scripts": {}, "gaps": [{"answer": "(1 / {a1}) * x * cosh({a1} * x + {b1}) - (1 / ({a1} ^ 2)) * sinh({a1} * x + {b1})+C", "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "vsetRangePoints": 5, "expectedVariableNames": ["x", "c"], "unitTests": [], "notallowed": {"message": "Input all numbers as integers or fractions – not as decimals.
", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "checkingType": "absdiff", "checkVariableNames": true, "vsetRange": [0, 1], "marks": 3, "showFeedbackIcon": true, "scripts": {}, "answerSimplification": "std", "type": "jme", "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "showPreview": true, "variableReplacements": [], "failureRate": 1}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 0, "showFeedbackIcon": true}], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "\n\n\nIntegrate the following functions $f(x)$.
\n\n\n", "tags": ["Calculus", "calculus", "checked2015", "cosh", "hyperbolic functions", "indefinite integration", "integrating hyperbolic functions", "integration", "integration by parts", "MAS1601", "mas1601", "sinh"], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "type": "question", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Find $\\displaystyle \\int\\cosh(ax+b)\\;dx,\\;\\;\\int x\\sinh(cx+d)\\;dx$.
\nAdvice tidied up.
"}, "advice": "a) Since $\\int \\cosh(x)=\\sinh(x)+C$ it follows that:
\\[\\int \\simplify[std]{cosh({a}x+{b})}\\;dx = \\frac{1}{\\var{a}}\\simplify[std]{ sinh({a}x+{b})}+C\\]
b) We perform integration by parts:
\nUsing $\\int u dv = uv - \\int v du$ where:
\n\\[\\begin{eqnarray*} &u&=x \\Rightarrow du = dx \\\\ &dv& = \\simplify[std]{sinh({a1}x+{b1})} \\Rightarrow v= \\simplify[std]{((cosh({a1}x+{b1}))/{a1})}\\end{eqnarray*} \\]
\nHence we have:
\\[\\begin{eqnarray*} \\int \\simplify[std]{x*sinh({a1}x+{b1})}\\;dx&=&\\frac{1}{\\var{a1}}\\simplify[std]{x*cosh({a1}x+{b1})}-\\frac{1}{\\var{a1}} \\int \\simplify[std]{cosh({a1}x+{b1})}\\;dx\\\\ &=&\\frac{1}{\\var{a1}}\\simplify[std]{x*cosh({a1}x+{b1})}-\\frac{1}{\\var{a1^2}}\\simplify[std]{sinh({a1}x+{b1})}+C \\end{eqnarray*} \\]
$I=\\displaystyle \\int \\simplify[std]{x*({b}x+{c})^{m}} dx $
You are given that \\[I=\\simplify[std]{({b}x+{c})^{m+1}/{b^2*(m+1)*(m+2)}*g(x)+C}\\]
For a polynomial $g(x)$. You have to find $g(x)$.
$g(x)=\\;$[[0]]
\nYou can get help by clicking on Show steps. You will lose 1 mark if you do.
\n ", "steps": [{"type": "information", "prompt": "\n \n \nThe formula for integrating by parts is
\\[ \\int u\\frac{dv}{dx} dx = uv - \\int v \\frac{du}{dx} dx. \\]
Also you need to know that for $n \\neq -1$:
\\[ \\int (ax+b)^n dx = \\frac{1}{a(n+1)}(ax+b)^{n+1}+C\\]
Find the following indefinite integral.
", "tags": ["Calculus", "MAS1601", "Steps", "algebraic manipulation", "checked2015", "indefinite integration", "integration", "integration by parts"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n \t\t3/08/2012:
\n \t\tAdded tags.
\n \t\tAdded description.
\n \t\tChecked calculation. OK.
\n \t\tGot rid of redundant instructions about inputting constant of integration.
\n \t\tGot rid of instruction re not inputting decimals - no restriction needed, so no forbidden strings.
\n \t\tPenalised use of steps, 1 mark. Added message to that effect.
\n \t\tImproved Advice display.
\n \t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "Given that $\\displaystyle \\int x({ax+b)^{m}} dx=\\frac{1}{A}(ax+b)^{m+1}g(x)+C$ for a given integer $A$ and polynomial $g(x)$, find $g(x)$.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\nPart a
\nThe formula for integrating by parts is
\\[ \\int u\\frac{dv}{dx} dx = uv - \\int v \\frac{du}{dx} dx. \\]
We choose $u = x$ and $\\displaystyle \\frac{dv}{dx} = \\simplify[std]{({b}*x+{c})^{m}}$.
\nSo $\\displaystyle \\frac{du}{dx}$ = $1$ and $\\displaystyle v = \\simplify[std]{(1/{(m+1)*b})*({b}*x+{c})^{m+1}}$.
\nHence,
\\[ \\begin{eqnarray*} \\displaystyle \\int \\simplify[std]{x*({b}x+{c})^{m}} dx &=& uv - \\int v \\frac{du}{dx} dx \\\\ &=& \\simplify[std]{(x/{(m+1)*b})*({b}*x+{c})^{m+1} - (1/{(m+1)*b})*Int (({b}*x+{c})^{m+1}, x)} \\\\ &=& \\simplify[std]{(x/{(m+1)*b})*({b}*x+{c})^{m+1} - (1/{(m+1)*(m+2)*b^2})*({b}*x+{c})^{m+2}+C} \\\\ &=&\\simplify[std]{({b}*x+{c})^{m+1}/{(m+1)*(m+2)*b^2}*({b*(m+2)}x - ({b}x+{c}))+C}\\\\ &=&\\simplify[std]{({b}*x+{c})^{m+1}/{(m+1)*(m+2)*b^2}*({b*(m+1)}x - {c})+C} \\end{eqnarray*}\\]
The solution is: $\\simplify[std]{g(x)={b*(m+1)}*x-{c}}$.
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\t\t\t$\\displaystyle \\int \\simplify[std]{{a}x*sin({b}x+{c})} dx = \\phantom{{}}$[[0]]
\n\t\t\tInput all numbers as fractions or integers and not decimals.
\n\t\t\tInput the constant of integration as $C$.
\n\t\t\tYou can get help by clicking on Show steps. You will lose 1 mark if you do.
\n\t\t\t", "steps": [{"type": "information", "prompt": "\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\tThe formula for integrating by parts is
\\[ \\int u\\frac{dv}{dx} dx = uv - \\int v \\frac{du}{dx} dx. \\]
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\t\t\t$\\displaystyle \\int \\simplify[std]{{a}x*cos({b}x+{c})} dx = \\phantom{{}}$[[0]]
\n\t\t\tInput all numbers as fractions or integers and not decimals.
\n\t\t\tInput the constant of integration as $C$.
\n\t\t\t", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"answer": "{a2}/{b}*x+{a1}/{b^2}", "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": 1, "vsetrangepoints": 5}, {"answer": "{-a1}/{b}*x+{a2}/{b^2}", "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": 1, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "\n\t\t\tUsing 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]]
\n\t\t\tInput all numbers as fractions or integers and not decimals.
\n\t\t\t", "showCorrectAnswer": true, "marks": 0}], "statement": "\n\tFind the following indefinite integrals.
\n\tInput all numbers as fractions or integers and not decimals.
\n\tInput the constant of integration as $C$ where needed.
\n\t", "tags": ["Calculus", "MAS1601", "Steps", "algebraic manipulation", "checked2015", "constant of integration", "integrating trigonometric functions", "integration", "integration by parts"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "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", "licence": "Creative Commons Attribution 4.0 International", "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$
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\n\ta)
\n\tThe 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})}$.
\n\tSo $\\displaystyle \\frac{du}{dx}$ = $\\var{a}$ and $v = \\simplify[std]{(-1/{b})*cos({b}x+{c})}$.
\n\tHence,
\\[ \\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} \\]
b)
\n\tFor this part we choose $u = \\simplify[std]{{a}x}$ and $\\frac{dv}{dx} = \\simplify[std]{cos({b}x+{c})}$.
\n\tSo $\\displaystyle \\frac{du}{dx}$ = $\\var{a}$ and $\\displaystyle v = \\simplify[std]{(1/{b})*sin({b}x+{c})}$.
\n\tHence,
\\[ \\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} \\]
c)
\n\tUsing 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}}$
\n\t"}, {"name": "Integration by parts", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "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": "s3*random(2..5)", "description": "", "name": "c"}, "s3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "s3"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "name": "a"}, "s2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "s2"}, "a1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s1*random(1..9)", "description": "", "name": "a1"}, "a2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s2*random(1..9)", "description": "", "name": "a2"}}, "ungrouped_variables": ["a", "c", "b", "s3", "s2", "s1", "a1", "a2"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"stepsPenalty": 1, "scripts": {}, "gaps": [{"answer": "({a}/{c})*x+{c*b-a}/{c^2}", "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": "all", "marks": 2, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "\n\t\t\t$I=\\displaystyle \\int \\simplify[std]{({a}x+{b})*e^({c}x)} dx $
You are given that the answer is of the form \\[I=g(x)e^{\\var{c}x}+C\\] for a polynomial $g(x)$. You have to find $g(x)$.
$g(x)=\\;$[[0]]
\n\t\t\tInput all numbers as fractions or integers and not decimals.
\n\t\t\tYou can get help by clicking on Show steps. You will lose 1 mark if you do.
\n\t\t\t", "steps": [{"type": "information", "prompt": "\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\tThe formula for integrating by parts is
\\[ \\int u\\frac{dv}{dx} dx = uv - \\int v \\frac{du}{dx} dx. \\]
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": "all", "marks": 3, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "\n\t\t\tUse the result from the first part to find:
\n\t\t\t$\\displaystyle I=\\int \\simplify[std]{({a}x+{b})^2*e^({c}x)} dx $
\n\t\t\tYou are given that the answer is of the form \\[I=h(x)e^{\\var{c}x}+C\\] for a polynomial $h(x)$. You have to find $h(x)$.
\n\t\t\t$h(x)=\\;$[[0]]
\n\t\t\tInput all numbers as fractions or integers and not decimals.
\n\t\t\t", "showCorrectAnswer": true, "marks": 0}], "statement": "\n\tFind the following indefinite integrals.
\n\tInput all numbers as fractions or integers and not decimals.
\n\t", "tags": ["Calculus", "MAS1601", "Steps", "algebraic manipulation", "checked2015", "exponential function", "integration", "integration by parts", "integration of exponential function"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n\t\t3/08/2012:
\n\t\tAdded tags.
\n\t\tAdded description.
\n\t\tChecked calculation. OK.
\n\t\tGot rid of redundant instructions about inputting constant of integration.
\n\t\tPenalised use of steps in first part, 1 mark. Added message to that effect in first part.
\n\t\tAdded message about not inputting decimals in appropriate places.
\n\t\tChanged marks reflecting the use of steps and degree of difficulty in second part.
\n\t\tImproved Advice display.
\n\t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "Given $\\displaystyle \\int (ax+b)e^{cx}\\;dx =g(x)e^{cx}+C$, find $g(x)$. Find $h(x)$, $\\displaystyle \\int (ax+b)^2e^{cx}\\;dx =h(x)e^{cx}+C$.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\n\ta)
\n\tThe 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]{e^({c}x)}$.
\n\tSo $\\displaystyle \\frac{du}{dx} = \\var{a}$ and $\\displaystyle v = \\simplify[std]{(1/{c})*e^({c}*x)}$.
\n\tHence,
\\[ \\begin{eqnarray} \\int \\simplify[std]{({a}*x+{b})*e^({c}*x)} dx &=& uv - \\int v \\frac{du}{dx} dx \\\\ &=& \\simplify[std]{({1}/{c})*({a}x+{b})*e^({c}x) - (1/{c})*Int(({a})*e^({c}x),x)} \\\\ &=& \\simplify[std]{(1/{c})*({a}x+{b})*e^({c}x) -({a}/{c^2})*e^({c}x) + C}\\\\ &=& \\simplify[std]{(({a}x+{b})/{c}-{a}/{c^2})*e^({c}*x) + C}\\\\ &=& \\simplify[std]{(({a}/{c})x+{b*c-a}/{c^2})*e^({c}*x) + C} \\end{eqnarray} \\]
Hence $\\displaystyle \\simplify[std]{g(x)=({a}/{c})*x+{c*b-a}/{c^2}}$
\n\tb)
\n\tFor this part we choose $u = \\simplify[std]{({a}x+{b})^2}$ and $\\displaystyle \\frac{dv}{dx} = \\simplify[std]{e^({c}x)}$.
\n\tSo $\\displaystyle \\frac{du}{dx}$ = $\\simplify[std]{{2*a}*({a}*(x)+{b})}$ and $\\displaystyle v = \\simplify[std]{(1/{c})*e^({c}*x)}$.
\n\tHence,
\\[ \\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*e^({c}x) - (1/{c})*Int({2*a}*({a}x+{b})*e^({c}x),x)} \\\\ &=& \\simplify[std]{(1/{c})*({a}x+{b})^2*e^({c}x) -({2*a}/{c})*Int(({a}x+{b})*e^({c}x),x)}\\dots (*) \\end{eqnarray*}\\]
But in Part a we have aready worked out $\\displaystyle \\simplify[std]{Int(({a}x+{b})*e^({c}*x),x)=(({a}/{c})*x+({c*b-a}/{c^2}))*e^({c}*x)+C}$
\n\tSo on substituting this in equation (*) we find:
\\[ \\begin{eqnarray*}I&=& \\simplify[std]{(1/{c})*({a}x+{b})^2*e^({c}x) -({2*a}/{c})*(({a}/{c})*x+({c*b-a}/{c^2}))*e^({c}*x)+C}\\\\ &=& \\simplify[std]{({a^2}/{c}*x^2+{2*a*b*c-2*a^2}/{c^2}*x+{b^2*c^2-2*a*b*c+2*a^2}/{c^3})*e^({c}x) +C} \\end{eqnarray*}\\]
Hence $\\displaystyle \\simplify[std]{h(x)={a^2}/{c}*x^2+{2*a*b*c-2*a^2}/{c^2}*x+{b^2*c^2-2*a*b*c+2*a^2}/{c^3}}$
\n\t"}, {"name": "Integration by parts", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "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}], "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]]
\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 ", "steps": [{"type": "information", "prompt": "\n \n \nThe formula for integrating by parts is
\\[ \\int u\\frac{dv}{dx} dx = uv - \\int v \\frac{du}{dx} dx. \\]
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": "\nUse 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 ", "showCorrectAnswer": true, "marks": 0}], "statement": "\nFind the following indefinite integrals.
\nInput all numbers as fractions or integers and not decimals.
\nInput 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\t3/08/2012:
\n \t\tAdded tags.
\n \t\tAdded description.
\n \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\tChecked calculation. OK.
\n \t\tPenalised use of steps in first part, 1 mark. Added message to that effect in first part.
\n \t\tAdded message about not inputting decimals in appropriate places.
\n \t\tChanged marks reflecting the use of steps and degree of difficulty in second part.
\n \t\tImproved 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": "\na)
\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*}\\]
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": 1, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "$\\displaystyle \\int \\simplify[std]{{a}x*({t}sin({b}x+{c})+{1-t}*exp({b}x+{c}))} dx = \\phantom{{}}$[[0]]
", "steps": [{"type": "information", "prompt": "\n \n \nThe formula for integrating by parts is
\\[ \\int u\\frac{dv}{dx} dx = uv - \\int v \\frac{du}{dx} dx. \\]
Find the following indefinite integral.
\nInput all numbers as fractions or integers and not decimals.
\nYou must input the constant of integration as $C$.
\nNote that if you are entering an expression such as $x*\\cos(p)$ for $p$ some expression then you must enter it as x*cos(p).
", "tags": ["Calculus", "calculus", "checked2015", "exponential function", "indefinite integration", "integration", "integration by parts", "integration of trigonometric functions", "mas1601", "MAS1601"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "\n \t\t \t\t20/06/2012:
\n \t\t \t\tAdded tags.
\n \t\t \t\tChanged xsin to x*sin in Advice.
\n \t\t \t\tTidied up display. Checked calculations. Users have to include capital C for the first two questions.
\n \t\t \t\t4/07/2012:
Edited part c to include brackets around the integrand.
Added tags.
\n \t\t \t\t9/07/2012:
\n \t\t \t\tAdded !noLeadingMinus to ruleset so that integrating by parts expressions are in the expected order.
\n \t\t \t\tImproved display of last two lines of Advice.
\n \t\t \n \t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "Integrating by parts.
\nFind $ \\int ax\\sin(bx+c)\\;dx$ or $\\int ax e^{bx+c}\\;dx$
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "The formula for integrating by parts is
\n\\[ \\int u\\frac{dv}{dx} dx = uv - \\int v \\frac{du}{dx} dx. \\]
\nWe choose $u = \\simplify[std]{{a}x}$ and $\\displaystyle \\frac{dv}{dx} = \\simplify[std]{{t}*sin({b}x+{c})+{1-t}*exp({b}x+{c})}$.
\nSo $\\displaystyle \\frac{du}{dx} = \\var{a}$ and $v = \\simplify[std]{({-t}/{b})*cos({b}x+{c})+{1-t}/{b}*exp({b}x+{c})}$.
\nHence,
\\[ \\begin{eqnarray} \\int \\simplify[std]{{a}x*({t}sin({b}x+{c})+{1-t}*exp({b}x+{c})) } dx &=& uv - \\int v \\frac{du}{dx} dx \\\\ &=& \\simplify[std]{({a}/{b})*x*(({-t})*cos({b}x+{c})+{1-t}*exp({b}x+{c}))-{a}/{b}int (({-t})*cos({b}x+{c})+{1-t}*exp({b}x+{c}),x)} \\\\ &=& \\simplify[std]{({a}/{b})*x*(({-t})*cos({b}x+{c})+{1-t}*exp({b}x+{c})) + ({t*a}/{b^2})*sin({b}x+{c}) -{(1-t)*a}/{b^2}*exp({b}x+{c})+ C} \\end{eqnarray} \\]
"}], "name": "", "pickQuestions": 0}], "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "
Integrate the product of two functions by the method of integration by parts.
"}, "type": "exam", "navigation": {"onleave": {"action": "none", "message": ""}, "reverse": true, "browse": true, "showresultspage": "oncompletion", "preventleave": true, "allowregen": true, "showfrontpage": true}, "timing": {"timedwarning": {"action": "none", "message": ""}, "timeout": {"action": "none", "message": ""}, "allowPause": true}, "pickQuestions": 0, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "extensions": [], "custom_part_types": [], "resources": []}