// Numbas version: exam_results_page_options {"name": "Luis's copy of Double integral - limit is a polynomial", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"preventleave": false, "allowregen": true, "showfrontpage": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variables": {"f": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-2..3)", "description": "", "name": "f"}, "d": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2,4,6)", "description": "", "name": "d"}, "m": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..5)", "description": "", "name": "m"}, "d1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "switch(p1=1,random(-6,-4,-2,2,4,6),random(-6,-3,3,6))", "description": "", "name": "d1"}, "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)", "description": "", "name": "ans3"}, "g": {"group": "Ungrouped variables", "templateType": "anything", "definition": "f+random(2,4,6)", "description": "", "name": "g"}, "con": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(p2=1,3,15)", "description": "", "name": "con"}, "c1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..5)", "description": "", "name": "c1"}, "d2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-2,-1,1,2)", "description": "", "name": "d2"}, "c2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1,2)", "description": "", "name": "c2"}, "h1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "round(d1/(p1+1))", "description": "", "name": "h1"}, "p2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(p1=1,2,1)", "description": "", "name": "p2"}, "ans2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "(m+n+2)*b1^(n+1)-m-1", "description": "", "name": "ans2"}, "a": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..4)", "description": "", "name": "a"}, "b1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-2..3 except 0)", "description": "", "name": "b1"}, "c": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-4..4 except 0)", "description": "", "name": "c"}, "ans1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "a*b*(g-f)+c*(g-f)*a^2/2+d*(g^2-f^2)*a/2", "description": "", "name": "ans1"}, "b": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-3..3 except 0)", "description": "", "name": "b"}, "n": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(2..5)", "description": "", "name": "n"}, "p1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1,2)", "description": "", "name": "p1"}}, "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$.

"}, "name": "Luis's copy of Double integral - limit is a polynomial", "statement": "

Calculate the following repeated integrals.

#### 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}
&= \\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

", "type": "question", "variable_groups": [], "tags": [], "preamble": {"css": "", "js": ""}, "rulesets": {"std": ["all", "!collectnumbers", "!noleadingminus", "fractionNumbers"]}, "extensions": [], "functions": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "p2", "c", "b", "d", "g", "f", "ans1", "ans2", "h1", "ans3", "m", "n", "p1", "b1", "c2", "c1", "d1", "d2", "con"], "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/"}, {"name": "Luis Hernandez", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2870/"}], "parts": [{"sortAnswers": false, "scripts": {}, "unitTests": [], "marks": 0, "showFeedbackIcon": true, "prompt": "

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

\n

$I=$ [[0]]

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

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

", "customMarkingAlgorithm": "", "gaps": [{"mustBeReduced": false, "mustBeReducedPC": 0, "showCorrectAnswer": true, "scripts": {}, "unitTests": [], "notationStyles": ["plain", "en", "si-en"], "marks": 1, "maxValue": "ans3", "allowFractions": false, "customMarkingAlgorithm": "", "correctAnswerStyle": "plain", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "type": "numberentry", "correctAnswerFraction": false, "minValue": "ans3"}], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "type": "gapfill", "showCorrectAnswer": true}]}]}], "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/"}, {"name": "Luis Hernandez", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2870/"}]}