// Numbas version: finer_feedback_settings {"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": [{"variable_groups": [], "variables": {"d2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-2,-1,1,2)", "description": "", "name": "d2"}, "ans2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(m+n+2)*b1^(n+1)-m-1", "description": "", "name": "ans2"}, "ans3": {"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)", "description": "", "name": "ans3"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3 except 0)", "description": "", "name": "b"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-4..4 except 0)", "description": "", "name": "c"}, "f": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-2..3)", "description": "", "name": "f"}, "b1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-2..3 except 0)", "description": "", "name": "b1"}, "d1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(p1=1,random(-6,-4,-2,2,4,6),random(-6,-3,3,6))", "description": "", "name": "d1"}, "ans1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a*b*(g-f)+c*(g-f)*a^2/2+d*(g^2-f^2)*a/2", "description": "", "name": "ans1"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..4)", "description": "", "name": "a"}, "c2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,2)", "description": "", "name": "c2"}, "p2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(p1=1,2,1)", "description": "", "name": "p2"}, "c1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "name": "c1"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "name": "n"}, "p1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,2)", "description": "", "name": "p1"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2,4,6)", "description": "", "name": "d"}, "g": {"templateType": "anything", "group": "Ungrouped variables", "definition": "f+random(2,4,6)", "description": "", "name": "g"}, "h1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "round(d1/(p1+1))", "description": "", "name": "h1"}, "con": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(p2=1,3,15)", "description": "", "name": "con"}, "m": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "name": "m"}}, "ungrouped_variables": ["a", "p2", "c", "b", "d", "g", "f", "ans1", "ans2", "h1", "ans3", "m", "n", "p1", "b1", "c2", "c1", "d1", "d2", "con"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Double integral - limit is a polynomial, ", "functions": {}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ans1", "minValue": "ans1", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "
\\[I = \\int_0^{\\var{a}}\\;dx\\;\\int_{\\var{f}}^{\\var{g}}\\simplify[all]{({b}+{c}*x+{d}*y)}\\;dy\\]
\n$I=\\;$[[0]]
\nAnswer must be an integer.
", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ans2", "minValue": "ans2", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "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]]
\nAnswer must be an integer.
", "showCorrectAnswer": true, "marks": 0}, {"scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "ans3", "minValue": "ans3", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "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]]
\nAnswer must be an integer.
", "showCorrectAnswer": true, "marks": 0}], "statement": "Calculate the following repeated integrals.
", "tags": ["checked2015", "MAS1603", "MAS2304"], "rulesets": {"std": ["all", "!collectnumbers", "!noleadingminus", "fractionNumbers"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "29/01/2013:
\nThe iassess question has a fourth part which I will split off from this question.
\nStill need to do the Advice.
", "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$.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "a)
\n\\[I = \\int_0^{\\var{a}}\\;dx\\;\\int_{\\var{f}}^{\\var{g}}\\simplify[all]{({b}+{c}*x+{d}*y)}\\;dy\\]
\nCalculating the inner integral we have:
\n\\[\\begin{eqnarray*}\\int_{\\var{f}}^{\\var{g}}\\simplify[all,!noleadingminus,!collectNumbers]{({b}+{c}*x+{d}*y)}\\;dy&=&\\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{eqnarray*}\\]
\nThe outer integral gives:
\n\\[\\begin{eqnarray*}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{eqnarray*}\\]
\nb)
\n\\[I=\\var{(m + 1) * (m + n + 2)} \\int_0^1 \\;dx \\int_x^{\\var{b1}}\\simplify[std]{({n + 1} * x ^ {m} * y ^ {n})}dy\\]
\nCalculating the inner integral we have :
\n\\[\\begin{eqnarray*} \\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{eqnarray*}\\]
\nFinally the outer integral gives:
\n\\[\\begin{eqnarray*}I &=&\\var{(m + 1) * (m + n + 2)}\\int_0^1\\simplify[std]{{b1} ^ {n + 1} * x ^ {m} -(x ^ {m + n + 1})}dx\\\\& =&\\simplify[std]{ {(m + 1) * (m + n + 2)} * ({b1 ^ (n + 1)} / {m + 1} -(1 / {m + n + 2})) }\\\\&=&\\var{ans2}\\end{eqnarray*}\\]
\nc)
\n\\[I=\\var{con}\\int_{-1}^1\\;dx\\;\\int_0^{\\simplify[all]{{c2}+{d2}*x^{p2}}}\\simplify[all]{{c1}+{d1}*y^{p1}}\\;dy\\]
\nCalculating the inner integral we have :
\n\\[\\begin{eqnarray*}\\int_0^{\\simplify[all]{{c2}+{d2}*x^{p2}}}\\simplify[all]{{c1}+{d1}*y^{p1}}\\;dy&=&\\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{eqnarray*}\\]
\nFinally the outer integral gives:
\n\\[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}\\]
\n\n
", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}