// Numbas version: exam_results_page_options {"name": "Double integral - limit is a polynomial", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"p2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(p1=1,2,1)", "name": "p2", "description": ""}, "ans2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "(m+n+2)*b1^(n+1)-m-1", "name": "ans2", "description": ""}, "ans3": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(p1=1,30*c1*c2+10*c1*d2+15*c2^2*d1+10*d1*d2*c2+3*d1*d2^2,6*c1*c2+2*d1*c2^3+2*d1*c2*d2^2)", "name": "ans3", "description": ""}, "d": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2,4,6)", "name": "d", "description": ""}, "m": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..5)", "name": "m", "description": ""}, "f": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-2..3)", "name": "f", "description": ""}, "b1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-2..3 except 0)", "name": "b1", "description": ""}, "b": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-3..3 except 0)", "name": "b", "description": ""}, "d1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "switch(p1=1,random(-6,-4,-2,2,4,6),random(-6,-3,3,6))", "name": "d1", "description": ""}, "a": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..4)", "name": "a", "description": ""}, "c2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1,2)", "name": "c2", "description": ""}, "d2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-2,-1,1,2)", "name": "d2", "description": ""}, "c1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..5)", "name": "c1", "description": ""}, "n": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..5)", "name": "n", "description": ""}, "ans1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "a*b*(g-f)+c*(g-f)*a^2/2+d*(g^2-f^2)*a/2", "name": "ans1", "description": ""}, "p1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1,2)", "name": "p1", "description": ""}, "con": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(p2=1,3,15)", "name": "con", "description": ""}, "h1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "round(d1/(p1+1))", "name": "h1", "description": ""}, "g": {"group": "Ungrouped variables", "templateType": "anything", "definition": "f+random(2,4,6)", "name": "g", "description": ""}, "c": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-4..4 except 0)", "name": "c", "description": ""}}, "ungrouped_variables": ["a", "p2", "c", "b", "d", "g", "f", "ans1", "ans2", "h1", "ans3", "m", "n", "p1", "b1", "c2", "c1", "d1", "d2", "con"], "name": "Double integral - limit is a polynomial", "functions": {}, "variable_groups": [], "preamble": {"css": "", "js": ""}, "parts": [{"customMarkingAlgorithm": "", "showCorrectAnswer": true, "prompt": "

\\[I = \\int_0^{\\var{a}}\\;dx\\;\\int_{\\var{f}}^{\\var{g}}\\simplify[all]{({b}+{c}*x+{d}*y)}\\;dy\\]

\n

$I=$ [[0]]

", "unitTests": [], "sortAnswers": false, "scripts": {}, "gaps": [{"correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "extendBaseMarkingAlgorithm": true, "minValue": "ans1", "maxValue": "ans1", "unitTests": [], "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "scripts": {}, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "showFeedbackIcon": true}], "type": "gapfill", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "showFeedbackIcon": true}, {"customMarkingAlgorithm": "", "showCorrectAnswer": true, "prompt": "

\\[I=\\var{(m+1)(m+n+2)}\\int _0^1\\;dx\\;\\int_x^{\\var{b1}}\\simplify[all]{{n+1}*x^{m}*y^{n}}\\;dy\\]

\n

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

", "unitTests": [], "sortAnswers": false, "scripts": {}, "gaps": [{"correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "extendBaseMarkingAlgorithm": true, "minValue": "ans2", "maxValue": "ans2", "unitTests": [], "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "scripts": {}, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "showFeedbackIcon": true}], "type": "gapfill", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "showFeedbackIcon": true}, {"customMarkingAlgorithm": "", "showCorrectAnswer": true, "prompt": "

\\[I=\\var{con}\\int_{-1}^1\\;dx\\;\\int_0^{\\simplify[all]{{c2}+{d2}*x^{p2}}}\\simplify[all]{{c1}+{d1}*y^{p1}}\\;dy\\]

\n

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

", "unitTests": [], "sortAnswers": false, "scripts": {}, "gaps": [{"correctAnswerFraction": false, "showCorrectAnswer": true, "allowFractions": false, "customMarkingAlgorithm": "", "mustBeReduced": false, "extendBaseMarkingAlgorithm": true, "minValue": "ans3", "maxValue": "ans3", "unitTests": [], "correctAnswerStyle": "plain", "mustBeReducedPC": 0, "scripts": {}, "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "showFeedbackIcon": true}], "type": "gapfill", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "showFeedbackIcon": true}], "statement": "

Calculate the following repeated integrals.

", "tags": [], "rulesets": {"std": ["all", "!collectnumbers", "!noleadingminus", "fractionNumbers"]}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

3 Repeated integrals of the form $\\int_a^b\\;dx\\;\\int_c^{f(x)}g(x,y)\\;dy$ where $g(x,y)$ is a polynomial in $x,\\;y$ and $f(x)$ is a degree 0, 1 or 2 polynomial in $x$.

"}, "type": "question", "extensions": [], "advice": "

a)

\n

\\[I = \\int_0^{\\var{a}} \\; \\mathrm{d}x\\;\\int_{\\var{f}}^{\\var{g}}\\simplify[all]{({b}+{c}*x+{d}*y)} \\; \\mathrm{d}y\\]

\n

Calculating the inner integral, we have:

\n

\\begin{align}
\\int_{\\var{f}}^{\\var{g}}\\simplify[all,!noleadingminus,!collectNumbers]{({b}+{c}*x+{d}*y)} \\; \\mathrm{d}y &= \\left[\\simplify[all,!noleadingminus,!collectNumbers]{{b}y+{c}*x*y+{d}*y^2/2}\\right]_{\\var{f}}^{\\var{g}}\\\\
&= \\simplify[all,!noleadingminus,!collectNumbers]{{b} * {g} + {c} * {g} * x + {d / 2} * {g ^ 2} + {b} * { -f} + {c} * { -f} * x + {d / 2} * { -(f ^ 2)}} \\\\
&= \\simplify[all,!noleadingminus,!collectNumbers]{ {b * g -(b * f) + (d / 2) * (g ^ 2 -(f ^ 2))} + {c * g -(c * f)} * x}
\\end{align}

\n

The outer integral gives:

\n

\\begin{align}
I &= \\simplify[std]{DefInt({b * g -(b * f) + (d / 2) * (g ^ 2 -(f ^ 2))} + {c * g -(c * f)} * x,x,0,{a}) } \\\\
&= \\left[\\simplify[std]{{b * g -(b * f) + (d / 2) * (g ^ 2 -(f ^ 2))} * x + {(c * g -(c * f)) / 2} * x ^ 2}\\right]_0^{\\var{a}} \\\\
&= \\var{ans1}
\\end{align}

\n

b)

\n

\\[ I=\\var{(m + 1) * (m + n + 2)} \\int_0^1 \\; \\mathrm{d}x \\int_x^{\\var{b1}}\\simplify[std]{({n + 1} * x ^ {m} * y ^ {n})} \\; \\mathrm{d}y \\]

\n

Calculating the inner integral, we have:

\n

\\begin{align}
\\int_x^{\\var{b1}}\\simplify[std]{({n + 1} * x ^ {m} * y ^ {n})}dy &= \\left[x^{\\var{m}}y^{\\var{n+1}}\\right]_x^{\\var{b1}} \\\\
&= \\simplify{{b1 ^ (n + 1)}* x ^ {m} -(x ^ {m + n + 1})}
\\end{align}

\n

Finally the outer integral gives:

\n

\\begin{align}
I &= \\var{(m + 1) * (m + n + 2)}\\int_0^1\\simplify[std]{{b1^ (n + 1)} * x ^ {m} -(x ^ {m + n + 1})} \\; \\mathrm{d}x \\\\
&= \\simplify[std]{ {(m + 1) * (m + n + 2)} * ({b1 ^ (n + 1)} / {m + 1} -(1 / {m + n + 2})) } \\\\
&= \\var{ans2}
\\end{align}

\n

c)

\n

\\[ I=\\var{con}\\int_{-1}^1 \\; \\mathrm{d}x \\; \\int_0^{\\simplify[all]{{c2}+{d2}*x^{p2}}}\\simplify[all]{{c1}+{d1}*y^{p1}} \\; \\mathrm{d}y \\]

\n

Calculating the inner integral, we have:

\n

\\begin{align}
\\int_0^{\\simplify[all]{{c2}+{d2}*x^{p2}}}\\simplify[all]{{c1}+{d1}*y^{p1}} \\; \\mathrm{d}y &= \\left[\\simplify[all]{{c1} * y + {d1 / (p1 + 1)} * y ^ {p1 + 1}}\\right]_0^{\\simplify[all]{{c2}+{d2}*x^{p2}}} \\\\
&= \\simplify[std]{{c1} * ({c2} + {d2} * x ^ {p2}) + {d1 / (p1 + 1)} * ({c2} + {d2} * x ^ {p2}) ^ {p1 + 1}} \\\\
&= \\simplify[std]{ {c1 * c2} + {c1 * d2} * x ^ {p2} + {p1 -1} * {h1} * ({c2 ^ 3} + {3 * c2 ^ 2 * d2} * x ^ {p2} + {3 * c2 * d2 ^ 2} * x ^ {2 * p2} + {d2} ^ 3 * x ^ {3 * p2}) + {2 -p1} * {h1} * ({c2 ^ 2} + {2 * c2 * d2} * x ^ {p2} + {d2 ^ 2} * x ^ {2 * p2})} \\\\
&= \\simplify[std,collectNumbers]{{c1 * c2 + (p1 -1) * h1 * c2 ^ 3 + (2 -p1) * h1 * c2 ^ 2} + {c1 * d2 + (p1 -1) * h1 * 3 * c2 ^ 2 * d2 + (2 -p1) * h1 * 2 * c2 * d2} * x ^ {p2} + {(p1 -1) * h1 * 3 * c2 * d2 ^ 2 + (2 -p1) * h1 * d2 ^ 2} * x ^ {2 * p2} + {(p1 -1) * h1 * d2 ^ 3} * x ^ {3 * p2}}
\\end{align}

\n

Finally the outer integral gives:

\n

\\begin{align}
I &= \\simplify[std]{{con} * DefInt({c1 * c2 + (p1 -1) * h1 * c2 ^ 3 + (2 -p1) * h1 * c2 ^ 2} + {c1 * d2 + (p1 -1) * h1 * 3 * c2 ^ 2 * d2 + (2 -p1) * h1 * 2 * c2 * d2} * x ^ {p2} + {(p1 -1) * h1 * 3 * c2 * d2 ^ 2 + (2 -p1) * h1 * d2 ^ 2} * x ^ {2 * p2} + {(p1 -1) * h1 * d2 ^ 3} * x ^ {3 * p2},x, -1,1)} \\\\
&= \\var{ans3}
\\end{align}

\n

 

\n

 

", "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}