// Numbas version: exam_results_page_options {"name": "Julie's copy of Definite integration 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["ans1", "ans2", "ans3", "ans4", "b4", "b1", "b2", "d1", "s2", "s7", "s6", "m4", "m3", "m2", "tol", "a1", "tans4", "c1", "tans1", "tans3", "tol1", "p", "t", "w", "n4"], "name": "Julie's copy of Definite integration 1", "tags": ["Calculus", "calculus", "definite integration", "integration", "integration by parts", "integration by parts twice", "rebelmaths"], "advice": "\n

a)
\$I=\\int_1^\\var{b1}\\simplify[std]{({a1} * x ^ 2 + {c1} * x + {d1})^2}\\;dx\$
Expand the parentheses to obtain:

\n

\$\\begin{eqnarray*}I &=& \\int_1^\\var{b1} \\simplify[std]{{a1 ^ 2} * x ^ 4 + {2 * a1 * c1} * x ^ 3+ {c1 ^ 2+2*a1*d1} * x ^ 2 + {2 * c1 * d1} * x+ {d1 ^ 2} }\\;dx\\\\ &=&\\left[\\simplify[std]{{a1 ^ 2}/5 * x ^ 5 + {2 * a1 * c1}/4 * x ^ 4+ {c1 ^ 2+2*a1*d1}/3 * x ^ 3 + {2 * c1 * d1}/2 * x^2+ {d1 ^ 2}x }\\right]_1^\\var{b1}\\\\ &=&\\var{tans1}\\\\ \\\\&=&\\var{ans1}\\mbox{ to 2 decimal places} \\end{eqnarray*} \$

\n

b)
\$\\begin{eqnarray*}I&=&\\int_0^{\\var{b2}}\\simplify[std]{1/(x+{m2})}\\;dx\\\\ &=&\\left[\\ln(x+\\var{m2})\\right]_0^{\\var{b2}}\\\\ &=& \\ln(\\var{b2+m2})-\\ln(\\var{m2})\\\\ &=&\\ln\\left(\\frac{\\var{b2+m2}}{\\var{m2}}\\right)\\\\ &=&\\var{ans2}\\mbox{ to 2 decimal places} \\end{eqnarray*} \$

\n

c)
\$I=\\int_0^\\pi\\simplify[std]{x * ({w} * Sin({m3} * x) + {1 -w} * Cos({m3} * x))}\\;dx\$
We use integration by parts.

\n

Recall that:
\$\\int u\\frac{dv}{dx}\\;dx=uv-\\int \\frac{du}{dx}\\;v\\;dx\$
Here we set $u=x$ and $\\displaystyle \\frac{dv}{dx}=\\simplify[std]{ {w} * Sin({m3} * x) + {1 -w} * Cos({m3} * x)}$

\n

Hence \$v=\\simplify[std]{({-w}/ {m3}) * Cos({m3} * x) + {1 -w} * (({1-w}/ {m3}) * Sin({m3} * x))}\$

\n

So \$\\begin{eqnarray*} I&=&\\left[\\simplify[std]{{-w}*((x / {m3}) * Cos({m3} * x)) + {1 -w} * ((x / {m3}) * Sin({m3} * x))}\\right]_0^\\pi -\\int_0^\\pi\\simplify[std]{ ({ -w} / {m3} )* Cos({m3} * x) + {1 -w} * (1 / {m3} * Sin({m3} * x))}\\;dx\\\\ &=&\\simplify[std]{({-w*cos(m3*pi)})*({pi}/{m3})}-\\left[\\simplify[std]{{ -w} * (1 / {m3 ^ 2})* Sin({m3} * x) -({1 -w} * (1 / {m3 ^ 2}) * Cos({m3} * x))}\\right]_0^\\pi\\\\ &=& \\var{ans3}\\mbox{ to 2 decimal places} \\end{eqnarray*} \$
d)

\n

\$I=\\int_0^{\\var{b4}}\\simplify[std]{x ^ {m4} * Exp({n4} * x)}\\;dx\$

\n

Use integration by parts twice with $u=x^2$ and $\\displaystyle \\frac{dv}{dx}=\\simplify[std]{e^({n4}x)}\\Rightarrow v = \\simplify[std]{1/{n4}e^({n4}x)}$
\$\\begin{eqnarray*} I&=&\\left[\\simplify[std]{x^2/{n4}Exp({n4} * x)}\\right]_0^{\\var{b4}}+\\simplify[std]{2/{abs(n4)}DefInt(x*Exp({n4} * x),x,0,{b4})}\\\\ &=&\\simplify[std]{{b4^2}/{n4}*e^{p}-2/{n4}}\\left(\\left[\\simplify[std]{x/{n4}*e^({n4}*x)}\\right]_0^{\\var{b4}}+\\simplify[std]{1/{abs(n4)}DefInt(e^({n4}x),x,0,{b4})}\\right)\\\\ &=&\\simplify[std]{{b4^2}/{n4}*e^{p}-2/{n4}}\\left(\\simplify[std]{{b4}/{n4}*e^{p}-1/{n4}}\\left[\\simplify[std]{1/{n4}*e^({n4}*x)}\\right]_0^{\\var{b4}}\\right)\\\\ &=&\\simplify[std]{({b4 ^ 2} / {n4}) * Exp({p}) -(({2 * b4} / {n4 ^ 2}) * Exp({p})) + (2 / {n4 ^ 3}) * (Exp({p}) -1)}\\\\ &=&\\var{ans4}\\mbox{ to 4 decimal places} \\end{eqnarray*} \$

\n \n", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "parts": [{"prompt": "\n

\$I=\\int_1^{\\var{b1}}\\simplify[std]{({a1} * x ^ 2 + {c1} * x + {d1})^2}\\;dx\$

\n

$I=\\;\\;$[[0]]

\n

\n \n", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "ans1+tol", "minValue": "ans1-tol", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 4, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "extensions": [], "statement": "

Evaluate the following definite integral.

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"ans1": {"definition": "precround(tans1,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans1", "description": ""}, "ans2": {"definition": "precround(ln(1+b2/m2),2)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans2", "description": ""}, "ans3": {"definition": "precround(tans3,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans3", "description": ""}, "ans4": {"definition": "precround(tans4,4)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans4", "description": ""}, "b4": {"definition": "s7*random(1,2,3)", "templateType": "anything", "group": "Ungrouped variables", "name": "b4", "description": ""}, "b1": {"definition": "random(2..6)", "templateType": "anything", "group": "Ungrouped variables", "name": "b1", "description": ""}, "b2": {"definition": "random(1..20)", "templateType": "anything", "group": "Ungrouped variables", "name": "b2", "description": ""}, "d1": {"definition": "random(-9..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "d1", "description": ""}, "s2": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s2", "description": ""}, "s7": {"definition": "1", "templateType": "anything", "group": "Ungrouped variables", "name": "s7", "description": ""}, "s6": {"definition": "-1", "templateType": "anything", "group": "Ungrouped variables", "name": "s6", "description": ""}, "m4": {"definition": "2", "templateType": "anything", "group": "Ungrouped variables", "name": "m4", "description": ""}, "m3": {"definition": "random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "m3", "description": ""}, "m2": {"definition": "random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "m2", "description": ""}, "tol": {"definition": "0.01", "templateType": "anything", "group": "Ungrouped variables", "name": "tol", "description": ""}, "a1": {"definition": "random(1..7)", "templateType": "anything", "group": "Ungrouped variables", "name": "a1", "description": ""}, "tans4": {"definition": "(e^(p)*(p^2-2*p+2)-2)/(n4^3)", "templateType": "anything", "group": "Ungrouped variables", "name": "tans4", "description": ""}, "c1": {"definition": "t*random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "c1", "description": ""}, "tans1": {"definition": "a1^2*(b1^5-1)/5+a1*c1*(b1^4-1)/2+(2*a1*d1+c1^2)*(b1^3-1)/3+c1*d1*(b1^2-1)+d1^2*(b1-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "tans1", "description": ""}, "tans3": {"definition": "if(w=0,((-1)^(m3)-1)/m3^2,-pi*(-1)^(m3)/m3)", "templateType": "anything", "group": "Ungrouped variables", "name": "tans3", "description": ""}, "tol1": {"definition": "0.0001", "templateType": "anything", "group": "Ungrouped variables", "name": "tol1", "description": ""}, "p": {"definition": "n4*b4", "templateType": "anything", "group": "Ungrouped variables", "name": "p", "description": ""}, "t": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "t", "description": ""}, "w": {"definition": "random(0,1)", "templateType": "anything", "group": "Ungrouped variables", "name": "w", "description": ""}, "n4": {"definition": "s6*random(1,2,3)", "templateType": "anything", "group": "Ungrouped variables", "name": "n4", "description": ""}}, "metadata": {"description": "

Evaluate $\\int_1^{\\,m}(ax ^ 2 + b x + c)^2\\;dx$, $\\int_0^{p}\\frac{1}{x+d}\\;dx,\\;\\int_0^\\pi x \\sin(qx) \\;dx$, $\\int_0^{r}x ^ {2}e^{t x}\\;dx$

\n

rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}]}]}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}]}