// Numbas version: exam_results_page_options {"name": "Luis's copy of Double integral - limit is a polynomial", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"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}
&= \\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

", "preamble": {"js": "", "css": ""}, "name": "Luis's copy of Double integral - limit is a polynomial", "variable_groups": [], "extensions": [], "functions": {}, "variablesTest": {"maxRuns": 100, "condition": ""}, "statement": "

Calculate the following repeated integrals.

", "parts": [{"variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "sortAnswers": false, "type": "gapfill", "customMarkingAlgorithm": "", "marks": 0, "prompt": "

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

\n

$I=$ [[0]]

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

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

", "variableReplacementStrategy": "originalfirst", "unitTests": [], "extendBaseMarkingAlgorithm": true, "gaps": [{"mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "correctAnswerStyle": "plain", "type": "numberentry", "customMarkingAlgorithm": "", "marks": 1, "maxValue": "ans3", "allowFractions": false, "unitTests": [], "correctAnswerFraction": false, "minValue": "ans3", "variableReplacementStrategy": "originalfirst", "notationStyles": ["plain", "en", "si-en"], "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "mustBeReducedPC": 0}], "showCorrectAnswer": true}], "ungrouped_variables": ["a", "p2", "c", "b", "d", "g", "f", "ans1", "ans2", "h1", "ans3", "m", "n", "p1", "b1", "c2", "c1", "d1", "d2", "con"], "metadata": {"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$.

", "licence": "Creative Commons Attribution 4.0 International"}, "tags": [], "rulesets": {"std": ["all", "!collectnumbers", "!noleadingminus", "fractionNumbers"]}, "variables": {"n": {"name": "n", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..5)"}, "ans3": {"name": "ans3", "description": "", "templateType": "anything", "group": "Ungrouped variables", "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)"}, "f": {"name": "f", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-2..3)"}, "c1": {"name": "c1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..5)"}, "d": {"name": "d", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(2,4,6)"}, "ans2": {"name": "ans2", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "(m+n+2)*b1^(n+1)-m-1"}, "p1": {"name": "p1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,2)"}, "d2": {"name": "d2", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-2,-1,1,2)"}, "a": {"name": "a", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..4)"}, "c": {"name": "c", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-4..4 except 0)"}, "g": {"name": "g", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "f+random(2,4,6)"}, "b": {"name": "b", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except 0)"}, "b1": {"name": "b1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(-2..3 except 0)"}, "p2": {"name": "p2", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "if(p1=1,2,1)"}, "con": {"name": "con", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "if(p2=1,3,15)"}, "ans1": {"name": "ans1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "a*b*(g-f)+c*(g-f)*a^2/2+d*(g^2-f^2)*a/2"}, "c2": {"name": "c2", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,2)"}, "d1": {"name": "d1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "switch(p1=1,random(-6,-4,-2,2,4,6),random(-6,-3,3,6))"}, "h1": {"name": "h1", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "round(d1/(p1+1))"}, "m": {"name": "m", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..5)"}}, "type": "question", "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/"}]}]}], "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/"}]}