// Numbas version: finer_feedback_settings {"name": "nuExam14 - Definite integration", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"extensions": [], "preamble": {"js": "", "css": ""}, "functions": {}, "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "advice": "
a)
\\[I=\\int_1^\\var{b1}\\simplify[std]{({a1} * x ^ 2 + {c1} * x + {d1})^2}\\;dx\\]
Expand the parentheses to obtain:
\\[\\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*} \\]
\nb)
\\[\\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*} \\]
c)
\\[I=\\int_0^\\pi\\simplify[std]{x * ({w} * Sin({m3} * x) + {1 -w} * Cos({m3} * x))}\\;dx\\]
We use integration by parts.
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)}$
Hence \\[v=\\simplify[std]{({-w}/ {m3}) * Cos({m3} * x) + {1 -w} * (({1-w}/ {m3}) * Sin({m3} * x))}\\]
\nSo \\[\\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)
\\[I=\\int_0^{\\var{b4}}\\simplify[std]{x ^ {m4} * Exp({n4} * x)}\\;dx\\]
\nUse 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*} \\]
\\[I=\\int_1^{\\var{b1}}\\simplify[std]{({a1} * x ^ 2 + {c1} * x + {d1})^2}\\;dx\\]
\n$I=\\;\\;$[[0]]
\nInput your answer to 2 decimal places.
", "marks": 0, "useCustomName": false, "customName": "", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true}, {"variableReplacementStrategy": "originalfirst", "variableReplacements": [], "unitTests": [], "scripts": {}, "gaps": [{"minValue": "ans2-tol", "notationStyles": ["plain", "en", "si-en"], "mustBeReducedPC": 0, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "unitTests": [], "scripts": {}, "showCorrectAnswer": true, "type": "numberentry", "showFractionHint": true, "correctAnswerFraction": false, "customMarkingAlgorithm": "", "allowFractions": false, "marks": 1, "useCustomName": false, "mustBeReduced": false, "customName": "", "extendBaseMarkingAlgorithm": true, "maxValue": "ans2+tol", "showFeedbackIcon": true, "correctAnswerStyle": "plain"}], "showCorrectAnswer": true, "type": "gapfill", "sortAnswers": false, "customMarkingAlgorithm": "", "prompt": "\\[I=\\int_0^{\\var{b2}}\\simplify[std]{1/(x+{m2})}\\;dx\\]
\n$I=\\;\\;$[[0]]
\nInput your answer to 2 decimal places.
", "marks": 0, "useCustomName": false, "customName": "", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true}], "variables": {"ans2": {"name": "ans2", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "precround(ln(1+b2/m2),2)"}, "s6": {"name": "s6", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "-1"}, "p": {"name": "p", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "n4*b4"}, "d1": {"name": "d1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9)"}, "tol1": {"name": "tol1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "0.0001"}, "b2": {"name": "b2", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..20)"}, "n4": {"name": "n4", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "s6*random(1,2,3)"}, "tans3": {"name": "tans3", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "if(w=0,((-1)^(m3)-1)/m3^2,-pi*(-1)^(m3)/m3)"}, "ans1": {"name": "ans1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "precround(tans1,2)"}, "m4": {"name": "m4", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "2"}, "m3": {"name": "m3", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..9)"}, "w": {"name": "w", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(0,1)"}, "s2": {"name": "s2", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)"}, "a1": {"name": "a1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..7)"}, "b4": {"name": "b4", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "s7*random(1,2,3)"}, "m2": {"name": "m2", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9)"}, "tol": {"name": "tol", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "0.01"}, "tans1": {"name": "tans1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "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)"}, "ans3": {"name": "ans3", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "precround(tans3,2)"}, "s7": {"name": "s7", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "1"}, "c1": {"name": "c1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "t*random(1..9)"}, "b1": {"name": "b1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..6)"}, "tans4": {"name": "tans4", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "(e^(p)*(p^2-2*p+2)-2)/(n4^3)"}, "ans4": {"name": "ans4", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "precround(tans4,4)"}, "t": {"name": "t", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)"}}, "tags": [], "statement": "Evaluate the following definite integrals.
", "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$
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "contributors": [{"name": "Michael Proudman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/269/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Michael Proudman", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/269/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}