<!DOCTYPE html>
<!--
Copyright 2011-16 Newcastle University

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<html lang="en-GB">
    <head>
        
    <title>Double Integrals - Numbas</title>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" type="image/png" href="resources/numbas-icon.png"/>

    <!-- CSS -->
<style>
    /* This rule will be overriden in styles.css, so the page content is only shown when the stylesheet has loaded
    */
    @layer no-stylesheet {
        body > #with-stylesheet {
            display: none;
        }
    }
</style>
<link rel="stylesheet" type="text/css" href="numbas.css?build_time=1764969658.787597" />
    <!-- mathjax stuff -->
<script>
MathJax = {
    tex: {
        inlineMath: [['$', '$'], ['\\(', '\\)']],
        packages: {'[+]': ['numbas','texhtml']},
        allowTexHTML: true
    },
    loader: {
        load: ['[numbas]/numbas-mathjax.js?build_time=1764969658.787597', '[tex]/texhtml'],
        paths: {numbas: './scripts/standalone_scripts'},
        versionWarnings: false
    }
};
</script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-svg.js"></script>

<!-- numbas stuff -->
<script charset="UTF-8" type="text/javascript" src="numbas.js?build_time=1764969658.787597" charset="utf-8"></script>

<script>
    Numbas.queueScript('go',['start-exam'], function() {
        Numbas.locale.set_preferred_locale('en-GB');
    });
    if(document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', Numbas.checkAllScriptsLoaded);
    } else {
        Numbas.checkAllScriptsLoaded();
    }
    Numbas.get_exam_init_data = function() {
        return {
            source: "// Numbas version: finer_feedback_settings\n{\"name\": \"Double Integrals\", \"metadata\": {\"description\": \"\u003cp\u003eset of exercises on double and triple integrals\u003c/p\u003e\", \"licence\": \"Creative Commons Attribution-NonCommercial 4.0 International\"}, \"duration\": 0, \"percentPass\": 0, \"showQuestionGroupNames\": false, \"shuffleQuestionGroups\": false, \"showstudentname\": true, \"question_groups\": [{\"name\": \"Group\", \"pickingStrategy\": \"all-ordered\", \"pickQuestions\": 1, \"questionNames\": [\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"], \"variable_overrides\": [[], [], [], [], [], [], [], [], []], \"questions\": [{\"name\": \"Ugur\u0027s copy of Resolve a double integral\", \"extensions\": [], \"custom_part_types\": [], \"resources\": [], \"navigation\": {\"allowregen\": true, \"showfrontpage\": false, \"preventleave\": false, \"typeendtoleave\": false}, \"contributors\": [{\"name\": \"Christian Lawson-Perfect\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/7/\"}, {\"name\": \"Ugur Efem\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/18261/\"}], \"tags\": [], \"metadata\": {\"description\": \"\u003cp\u003eCalculate a repeated integral of the form $\\\\displaystyle I=\\\\int_0^1\\\\;\\\\int_0^{x^{m-1}}mf(x^m+a)dy \\\\;dx$\u003c/p\u003e\\n\u003cp\u003eThe $y$ integral is trivial, and the $x$ integral is of the form $g\u0027(x)f\u0027(g(x))$, so it straightforwardly integrates to $f(g(x))$.\u003c/p\u003e\", \"licence\": \"Creative Commons Attribution 4.0 International\"}, \"statement\": \"\u003cp\u003eEvaluate the following repeated integral:\u003c/p\u003e\\n\u003cp\u003e\\\\[ I = \\\\int_0^1\u0026nbsp; \\\\; \\\\int_0^{\\\\simplify[all]{x^{m-1}}}\\\\var{m} \\\\var{fun} \\\\; \\\\mathrm{d}y\\\\; \\\\mathrm{d}x \\\\]\u003c/p\u003e\", \"advice\": \"\u003cp\u003eWe want to find\u003c/p\u003e\\n\u003cp\u003e\\\\[ I=\\\\int_0^1\u0026nbsp; \\\\; \\\\int_0^{\\\\simplify[all]{x^{m-1}}} \\\\var{m} \\\\var{fun} \\\\; \\\\mathrm{d}y \\\\; dx \\\\]\u003c/p\u003e\\n\u003cp\u003eThe innermost integral gives:\u003c/p\u003e\\n\u003cp\u003e\\\\[ \\\\int_0^{\\\\simplify[all]{x^{m-1}}}\\\\var{m} \\\\var{fun} \\\\; \\\\mathrm{d}y = \\\\left[\\\\var{m}y \\\\; \\\\var{fun} \\\\right]_0^{\\\\simplify[all]{x^{m-1}}}=\\\\simplify[all]{{m}x^{m-1}} \\\\var{fun} \\\\]\u003c/p\u003e\\n\u003cp\u003eSo we have to find \u0026nbsp;$\\\\displaystyle I=\\\\int_0^1\\\\simplify[all]{{m}x^{m-1}} \\\\var{fun} \\\\; \\\\mathrm{d}x$.\u003c/p\u003e\\n\u003cp\u003eNote that if we use the substitution $u=\\\\simplify[all]{x^{m}+{a}}$ then it is easy to find this last definite integral and we find that:\u003c/p\u003e\\n\u003cp\u003e$I=\\\\var{ans}$ to 3 decimal places.\u003c/p\u003e\", \"rulesets\": {}, \"builtin_constants\": {\"e\": true, \"pi,\\u03c0\": true, \"i\": true}, \"constants\": [], \"variables\": {\"ans\": {\"name\": \"ans\", \"group\": \"Ungrouped variables\", \"definition\": \"precround(upper-lower,3)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"a\": {\"name\": \"a\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1..9)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"m\": {\"name\": \"m\", \"group\": \"Ungrouped variables\", \"definition\": \"random(2..5)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"fun\": {\"name\": \"fun\", \"group\": \"Ungrouped variables\", \"definition\": \"latex(\\n  switch(\\n    t=1,\\n    \u0027\\\\\\\\sin\u0027,\\n    t=2,\\n    \u0027\\\\\\\\cos\u0027,\\n    \u0027\\\\\\\\exp\u0027\\n  )\\n  +\u0027(x^{\u0027+m+\u0027}+\u0027+a+\u0027)\u0027\\n)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"t\": {\"name\": \"t\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1..3)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"upper\": {\"name\": \"upper\", \"group\": \"Ungrouped variables\", \"definition\": \"switch(t=1,-cos(1+a),t=2,sin(1+a),exp(1+a))\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"lower\": {\"name\": \"lower\", \"group\": \"Ungrouped variables\", \"definition\": \"switch(t=1,-cos(a),t=2,sin(a),exp(a))\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}}, \"variablesTest\": {\"condition\": \"\", \"maxRuns\": 100}, \"ungrouped_variables\": [\"a\", \"upper\", \"lower\", \"m\", \"t\", \"ans\", \"fun\"], \"variable_groups\": [], \"functions\": {}, \"preamble\": {\"js\": \"\", \"css\": \"\"}, \"parts\": [{\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"prompt\": \"\u003cp\u003e$I=\\\\;$[[0]]\u003c/p\u003e\\n\u003cp\u003eInput your answer to 3 decimal places.\u003c/p\u003e\", \"gaps\": [{\"type\": \"numberentry\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"minValue\": \"ans\", \"maxValue\": \"ans\", \"correctAnswerFraction\": false, \"allowFractions\": false, \"mustBeReduced\": false, \"mustBeReducedPC\": 0, \"displayAnswer\": \"\", \"precisionType\": \"dp\", \"precision\": \"3\", \"precisionPartialCredit\": 0, \"precisionMessage\": \"You have not given your answer to the correct precision.\", \"strictPrecision\": true, \"showPrecisionHint\": false, \"notationStyles\": [\"plain\", \"en\", \"si-en\"], \"correctAnswerStyle\": \"plain\"}], \"sortAnswers\": false}], \"partsMode\": \"all\", \"maxMarks\": 0, \"objectives\": [], \"penalties\": [], \"objectiveVisibility\": \"always\", \"penaltyVisibility\": \"always\", \"type\": \"question\"}, {\"name\": \"Ugur\u0027s copy of Double integral - limit is a polynomial\", \"extensions\": [], \"custom_part_types\": [], \"resources\": [], \"navigation\": {\"allowregen\": true, \"showfrontpage\": false, \"preventleave\": false, \"typeendtoleave\": false}, \"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\": \"Ugur Efem\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/18261/\"}], \"tags\": [], \"metadata\": {\"description\": \"\u003cp\u003e3 Repeated integrals of the form $\\\\int_a^b\\\\;\\\\int_c^{f(x)}g(x,y)\\\\;dy \\\\;dx$ where $g(x,y)$ is a polynomial in $x,\\\\;y$ and $f(x)$ is a degree 0, 1 or 2 polynomial in $x$.\u003c/p\u003e\", \"licence\": \"Creative Commons Attribution 4.0 International\"}, \"statement\": \"\u003cp\u003eCalculate the following repeated integrals.\u003c/p\u003e\", \"advice\": \"\u003ch4\u003ea)\u003c/h4\u003e\\n\u003cp\u003e\\\\[I = \\\\int_0^{\\\\var{a}} \\\\;\\\\int_{\\\\var{f}}^{\\\\var{g}}\\\\simplify[all]{({b}+{c}*x+{d}*y)} \\\\; \\\\mathrm{d}y\\\\; \\\\mathrm{d}x\\\\]\u003c/p\u003e\\n\u003cp\u003eCalculating the inner integral, we have:\u003c/p\u003e\\n\u003cp\u003e\\\\begin{align}\u003cbr/\u003e\\\\int_{\\\\var{f}}^{\\\\var{g}}\\\\simplify[all,!noleadingminus,!collectNumbers]{({b}+{c}*x+{d}*y)} \\\\; \\\\mathrm{d}y \u0026amp;= \\\\left[\\\\simplify[all,!noleadingminus,!collectNumbers]{{b}y+{c}*x*y+{d}*y^2/2}\\\\right]_{\\\\var{f}}^{\\\\var{g}}\\\\\\\\\u003cbr/\u003e\u0026amp;= \\\\simplify[all,!noleadingminus,!collectNumbers]{{b} * {g} + {c} * {g} * x + {d / 2} * {g ^ 2} + {b} * { -f} + {c} * { -f} * x + {d / 2} * { -(f ^ 2)}} \\\\\\\\\u003cbr/\u003e\u0026amp;= \\\\simplify[all,!noleadingminus,!collectNumbers]{ {b * g -(b * f) + (d / 2) * (g ^ 2 -(f ^ 2))} + {c * g -(c * f)} * x}\u003cbr/\u003e\\\\end{align}\u003c/p\u003e\\n\u003cp\u003eThe outer integral gives:\u003c/p\u003e\\n\u003cp\u003e\\\\begin{align}\u003cbr/\u003eI \u0026amp;= \\\\simplify[std]{DefInt({b * g -(b * f) + (d / 2) * (g ^ 2 -(f ^ 2))} + {c * g -(c * f)} * x,x,0,{a}) } \\\\\\\\\u003cbr/\u003e\u0026amp;= \\\\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}} \\\\\\\\\u003cbr/\u003e\u0026amp;= \\\\var{ans1}\u003cbr/\u003e\\\\end{align}\u003c/p\u003e\\n\u003ch4\u003eb)\u003c/h4\u003e\\n\u003cp\u003e\\\\[ 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 \\\\]\u003c/p\u003e\\n\u003cp\u003eCalculating the inner integral, we have:\u003c/p\u003e\\n\u003cp\u003e\\\\begin{align}\u003cbr/\u003e\\\\int_x^{\\\\var{b1}}\\\\simplify[std]{({n + 1} * x ^ {m} * y ^ {n})}dy \u0026amp;= \\\\left[x^{\\\\var{m}}y^{\\\\var{n+1}}\\\\right]_x^{\\\\var{b1}} \\\\\\\\\u003cbr/\u003e\u0026amp;= \\\\simplify{{b1 ^ (n + 1)}* x ^ {m} -(x ^ {m + n + 1})}\u003cbr/\u003e\\\\end{align}\u003c/p\u003e\\n\u003cp\u003eFinally the outer integral gives:\u003c/p\u003e\\n\u003cp\u003e\\\\begin{align}\u003cbr/\u003eI \u0026amp;= \\\\var{(m + 1) * (m + n + 2)}\\\\int_0^1\\\\simplify[std]{{b1^ (n + 1)} * x ^ {m} -(x ^ {m + n + 1})} \\\\; \\\\mathrm{d}x \\\\\\\\\u003cbr/\u003e\u0026amp;= \\\\simplify[std]{ {(m + 1) * (m + n + 2)} * ({b1 ^ (n + 1)} / {m + 1} -(1 / {m + n + 2})) } \\\\\\\\\u003cbr/\u003e\u0026amp;= \\\\var{ans2}\u003cbr/\u003e\\\\end{align}\u003c/p\u003e\\n\u003ch4\u003ec)\u003c/h4\u003e\\n\u003cp\u003e\\\\[ I=\\\\var{con}\\\\int_{-1}^1\u0026nbsp; \\\\; \\\\int_0^{\\\\simplify[all]{{c2}+{d2}*x^{p2}}}\\\\simplify[all]{{c1}+{d1}*y^{p1}} \\\\; \\\\mathrm{d}y \\\\; \\\\mathrm{d}x \\\\]\u003c/p\u003e\\n\u003cp\u003eCalculating the inner integral, we have:\u003c/p\u003e\\n\u003cp\u003e\\\\begin{align}\u003cbr/\u003e\\\\int_0^{\\\\simplify[all]{{c2}+{d2}*x^{p2}}}\\\\simplify[all]{{c1}+{d1}*y^{p1}} \\\\; \\\\mathrm{d}y \u0026amp;= \\\\left[\\\\simplify[all]{{c1} * y + {d1 / (p1 + 1)} * y ^ {p1 + 1}}\\\\right]_0^{\\\\simplify[all]{{c2}+{d2}*x^{p2}}} \\\\\\\\\u003cbr/\u003e\u0026amp;= \\\\simplify[std]{{c1} * ({c2} + {d2} * x ^ {p2}) + {d1 / (p1 + 1)} * ({c2} + {d2} * x ^ {p2}) ^ {p1 + 1}} \\\\\\\\\u003cbr/\u003e\u0026amp;= \\\\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})} \\\\\\\\\u003cbr/\u003e\u0026amp;= \\\\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}}\u003cbr/\u003e\\\\end{align}\u003c/p\u003e\\n\u003cp\u003eFinally the outer integral gives:\u003c/p\u003e\\n\u003cp\u003e\\\\begin{align}\u003cbr/\u003eI \u0026amp;= \\\\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)} \\\\\\\\\u003cbr/\u003e\u0026amp;= \\\\var{ans3}\u003cbr/\u003e\\\\end{align}\u003c/p\u003e\\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\", \"rulesets\": {\"std\": [\"all\", \"!collectnumbers\", \"!noleadingminus\", \"fractionNumbers\"]}, \"builtin_constants\": {\"e\": true, \"pi,\\u03c0\": true, \"i\": true}, \"constants\": [], \"variables\": {\"p2\": {\"name\": \"p2\", \"group\": \"Ungrouped variables\", \"definition\": \"if(p1=1,2,1)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"ans2\": {\"name\": \"ans2\", \"group\": \"Ungrouped variables\", \"definition\": \"(m+n+2)*b1^(n+1)-m-1\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"ans3\": {\"name\": \"ans3\", \"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\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"d\": {\"name\": \"d\", \"group\": \"Ungrouped variables\", \"definition\": \"random(2,4,6)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"m\": {\"name\": \"m\", \"group\": \"Ungrouped variables\", \"definition\": \"random(2..5)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"f\": {\"name\": \"f\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-2..3)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"b1\": {\"name\": \"b1\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-2..3 except 0)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"b\": {\"name\": \"b\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-3..3 except 0)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"d1\": {\"name\": \"d1\", \"group\": \"Ungrouped variables\", \"definition\": \"switch(p1=1,random(-6,-4,-2,2,4,6),random(-6,-3,3,6))\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"a\": {\"name\": \"a\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1..4)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"c2\": {\"name\": \"c2\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1,2)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"d2\": {\"name\": \"d2\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-2,-1,1,2)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"c1\": {\"name\": \"c1\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1..5)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"n\": {\"name\": \"n\", \"group\": \"Ungrouped variables\", \"definition\": \"random(2..5)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"ans1\": {\"name\": \"ans1\", \"group\": \"Ungrouped variables\", \"definition\": \"a*b*(g-f)+c*(g-f)*a^2/2+d*(g^2-f^2)*a/2\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"p1\": {\"name\": \"p1\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1,2)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"con\": {\"name\": \"con\", \"group\": \"Ungrouped variables\", \"definition\": \"if(p2=1,3,15)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"h1\": {\"name\": \"h1\", \"group\": \"Ungrouped variables\", \"definition\": \"round(d1/(p1+1))\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"g\": {\"name\": \"g\", \"group\": \"Ungrouped variables\", \"definition\": \"f+random(2,4,6)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"c\": {\"name\": \"c\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-4..4 except 0)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}}, \"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\"], \"variable_groups\": [], \"functions\": {}, \"preamble\": {\"js\": \"\", \"css\": \"\"}, \"parts\": [{\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"prompt\": \"\u003cp\u003e\\\\[I = \\\\int_0^{\\\\var{a}}\\\\;\\\\int_{\\\\var{f}}^{\\\\var{g}}\\\\simplify[all]{({b}+{c}*x+{d}*y)}\\\\;dy \\\\;dx\\\\]\u003c/p\u003e\\n\u003cp\u003e$I=$\u0026nbsp;[[0]]\u003c/p\u003e\", \"gaps\": [{\"type\": \"numberentry\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"minValue\": \"ans1\", \"maxValue\": \"ans1\", \"correctAnswerFraction\": false, \"allowFractions\": false, \"mustBeReduced\": false, \"mustBeReducedPC\": 0, \"displayAnswer\": \"\", \"showFractionHint\": true, \"notationStyles\": [\"plain\", \"en\", \"si-en\"], \"correctAnswerStyle\": \"plain\"}], \"sortAnswers\": false}, {\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"prompt\": \"\u003cp\u003e\\\\[I=\\\\var{(m+1)(m+n+2)}\\\\int _0^1\\\\;\\\\int_x^{\\\\var{b1}}\\\\simplify[all]{{n+1}*x^{m}*y^{n}}\\\\;dy \\\\;dx\\\\]\u003c/p\u003e\\n\u003cp\u003e$I=\\\\;$[[0]]\u003c/p\u003e\", \"gaps\": [{\"type\": \"numberentry\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"minValue\": \"ans2\", \"maxValue\": \"ans2\", \"correctAnswerFraction\": false, \"allowFractions\": false, \"mustBeReduced\": false, \"mustBeReducedPC\": 0, \"displayAnswer\": \"\", \"showFractionHint\": true, \"notationStyles\": [\"plain\", \"en\", \"si-en\"], \"correctAnswerStyle\": \"plain\"}], \"sortAnswers\": false}, {\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"prompt\": \"\u003cp\u003e\\\\[I=\\\\var{con}\\\\int_{-1}^1\\\\;\\\\int_0^{\\\\simplify[all]{{c2}+{d2}*x^{p2}}}\\\\simplify[all]{{c1}+{d1}*y^{p1}}\\\\;dy \\\\;dx\\\\]\u003c/p\u003e\\n\u003cp\u003e$I=\\\\;$?[[0]]\u003c/p\u003e\", \"gaps\": [{\"type\": \"numberentry\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"minValue\": \"ans3\", \"maxValue\": \"ans3\", \"correctAnswerFraction\": false, \"allowFractions\": false, \"mustBeReduced\": false, \"mustBeReducedPC\": 0, \"displayAnswer\": \"\", \"showFractionHint\": true, \"notationStyles\": [\"plain\", \"en\", \"si-en\"], \"correctAnswerStyle\": \"plain\"}], \"sortAnswers\": false}], \"partsMode\": \"all\", \"maxMarks\": 0, \"objectives\": [], \"penalties\": [], \"objectiveVisibility\": \"always\", \"penaltyVisibility\": \"always\", \"type\": \"question\"}, {\"name\": \"Tutorial: Inputting Integrals\", \"extensions\": [], \"custom_part_types\": [], \"resources\": [], \"navigation\": {\"allowregen\": true, \"showfrontpage\": false, \"preventleave\": false, \"typeendtoleave\": false}, \"contributors\": [{\"name\": \"Ugur Efem\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/18261/\"}], \"tags\": [], \"metadata\": {\"description\": \"\u003cp\u003eInputing Integrals tutorial\u003c/p\u003e\", \"licence\": \"Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International\"}, \"statement\": \"\u003cp\u003eTo input integrals in Numbas we use the commands int() and defint(). We will see how to use them in more detail here.\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\u003cstrong\u003eThis is a tutorial\u003c/strong\u003e\u0026nbsp;\u003c/p\u003e\", \"advice\": \"\", \"rulesets\": {}, \"builtin_constants\": {\"e\": true, \"pi,\\u03c0\": true, \"i\": true}, \"constants\": [], \"variables\": {}, \"variablesTest\": {\"condition\": \"\", \"maxRuns\": 100}, \"ungrouped_variables\": [], \"variable_groups\": [], \"functions\": {}, \"preamble\": {\"js\": \"\", \"css\": \"\"}, \"parts\": [{\"type\": \"jme\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"prompt\": \"\u003cp\u003eTo input the integral $\\\\int x^3 \\\\,dx$, write \u003ccode\u003eint(x^3, x)\u003c/code\u003e in the area below.\u003c/p\u003e\\n\u003cp\u003e\u003c/p\u003e\", \"answer\": \"int(x^3, x)\", \"showPreview\": true, \"checkingType\": \"absdiff\", \"checkingAccuracy\": 0.001, \"failureRate\": 1, \"vsetRangePoints\": 5, \"vsetRange\": [0, 1], \"checkVariableNames\": false, \"singleLetterVariables\": false, \"allowUnknownFunctions\": true, \"implicitFunctionComposition\": false, \"caseSensitive\": false, \"valuegenerators\": [{\"name\": \"x\", \"value\": \"\"}]}, {\"type\": \"jme\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"prompt\": \"\u003cp\u003eOne can also write the expression $\\\\int\\\\, dx$. To do so, input \u003ccode\u003eint(\u0027\u0027,x)\u003c/code\u003e. The expression \u003ccode\u003e\u0027\u0027\u003c/code\u003e tells that the firtst argument of the function is an empty string.\u003c/p\u003e\", \"answer\": \"int(\u0027\u0027,x)\", \"showPreview\": true, \"checkingType\": \"absdiff\", \"checkingAccuracy\": 0.001, \"failureRate\": 1, \"vsetRangePoints\": 5, \"vsetRange\": [0, 1], \"checkVariableNames\": false, \"singleLetterVariables\": false, \"allowUnknownFunctions\": true, \"implicitFunctionComposition\": false, \"caseSensitive\": false, \"valuegenerators\": [{\"name\": \"x\", \"value\": \"\"}]}, {\"type\": \"jme\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"prompt\": \"\u003cp\u003eYou can also input definite integrals. For this we use \u003ccode\u003edefint()\u003c/code\u003e. This function has four arguments, as made clear in the below example:\u003c/p\u003e\\n\u003cp\u003eTo input $\\\\int^b_a f(x) \\\\, dx$, write \u003ccode\u003edefint(f(x), x, a, b)\u003c/code\u003e.\u003c/p\u003e\", \"answer\": \"defint(f(x), x, a, b)\", \"showPreview\": true, \"checkingType\": \"absdiff\", \"checkingAccuracy\": 0.001, \"failureRate\": 1, \"vsetRangePoints\": 5, \"vsetRange\": [0, 1], \"checkVariableNames\": false, \"singleLetterVariables\": false, \"allowUnknownFunctions\": true, \"implicitFunctionComposition\": false, \"caseSensitive\": false, \"valuegenerators\": [{\"name\": \"a\", \"value\": \"\"}, {\"name\": \"b\", \"value\": \"\"}, {\"name\": \"x\", \"value\": \"\"}]}, {\"type\": \"jme\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"prompt\": \"\u003cp\u003eFor inputting double integrals, one can use \u003ccode\u003eint()\u003c/code\u003e and \u003ccode\u003edefint()\u003c/code\u003e nested.\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003eFor example to write $\\\\int^b_a\\\\int^d_c g(x,y) \\\\,dx\\\\, dy$, input \u003ccode\u003edefint(defint(g(x,y), x, c,d),y,a,b)\u003c/code\u003e\u0026nbsp;\u003c/p\u003e\", \"answer\": \"defint(defint(g(x,y), x, c,d),y,a,b)\", \"showPreview\": true, \"checkingType\": \"absdiff\", \"checkingAccuracy\": 0.001, \"failureRate\": 1, \"vsetRangePoints\": 5, \"vsetRange\": [0, 1], \"checkVariableNames\": false, \"singleLetterVariables\": false, \"allowUnknownFunctions\": true, \"implicitFunctionComposition\": false, \"caseSensitive\": false, \"valuegenerators\": [{\"name\": \"a\", \"value\": \"\"}, {\"name\": \"b\", \"value\": \"\"}, {\"name\": \"c\", \"value\": \"\"}, {\"name\": \"d\", \"value\": \"\"}, {\"name\": \"x\", \"value\": \"\"}, {\"name\": \"y\", \"value\": \"\"}]}], \"partsMode\": \"all\", \"maxMarks\": 0, \"objectives\": [], \"penalties\": [], \"objectiveVisibility\": \"always\", \"penaltyVisibility\": \"always\", \"type\": \"question\"}, {\"name\": \"Area between 2 graphs by Double Integral (Advanced)\", \"extensions\": [\"geogebra\"], \"custom_part_types\": [], \"resources\": [], \"navigation\": {\"allowregen\": true, \"showfrontpage\": false, \"preventleave\": false, \"typeendtoleave\": false}, \"contributors\": [{\"name\": \"Ben McGovern\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/4872/\"}, {\"name\": \"Ugur Efem\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/18261/\"}], \"tags\": [], \"metadata\": {\"description\": \"\u003cp\u003eCalculating the area enclosed between a linear function and a quadratic function by integration. The limits (points of intersection) are not given in the question and must be calculated.\u003c/p\u003e\", \"licence\": \"Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International\"}, \"statement\": \"\u003cp\u003eFind the area enclosed by $\\\\simplify{y={m}x+{c_1}}$ and $\\\\simplify{y=x^2+{b}x+{c_2}}$ using a double integral.\u003c/p\u003e\\n\u003cp\u003e\u003c/p\u003e\\n\u003cp\u003e{geogebra_applet(\u0027https://www.geogebra.org/m/fyxr2fqj\u0027,defs)}\u003c/p\u003e\", \"advice\": \"\u003cp\u003ea)\u003c/p\u003e\\n\u003cp\u003eTo find the points of intersection, we will solve the given eqautions simultaneously. We equate the two and solve for $x$ first:\u003c/p\u003e\\n\u003cp\u003e\\\\[ \\\\begin{split} \\\\simplify{x^2+{b}x+{c_2}} \u0026amp;\\\\,= \\\\simplify{{m}x+{c_1}}, \\\\\\\\ \\\\simplify{x^2+{b-m}x+{c_2-c_1}} \u0026amp;\\\\,=0, \\\\\\\\ \\\\simplify{(x-{cp1})(x-{cp2})}\u0026amp;\\\\,=0.\u0026nbsp;\\\\end{split} \\\\]\u003c/p\u003e\\n\u003cp\u003eTherefore, the points of intersection are when $\\\\simplify{x1={cp1}}$ and $\\\\simplify{x2={cp2}}$.\u003c/p\u003e\\n\u003cp\u003eNow by pluging-in these values into $\\\\simplify{y={m}x+{c_1}}$ we get $\\\\simplify{y_1 = {y1}}$ and $\\\\simplify{y_2 = {y2}}$.\u003c/p\u003e\\n\u003cp\u003e\u003c/p\u003e\\n\u003cp\u003eb)\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003eWe are asked to integrate $y$ first. So, $x$ can vary freely in the range we found above, and $y$ will vary depending on $x$. So the relevant boundaries of the variables are\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\\\\[ \\\\var{x1} \u0026lt; x \u0026lt; \\\\var{x2} \\\\quad \\\\mbox{ and }\\\\quad\u0026nbsp; \\\\simplify{x^2+{b}x+{c_2}} \u0026lt; y \u0026lt; \\\\simplify{{m}x+{c_1}}\\\\simplify{x^2+{b}x+{c_2}}.\\\\]\u003c/p\u003e\\n\u003cp\u003eThen the integral\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\\\\[\\\\int_{\\\\var{x1}}^{\\\\var{x2}} \\\\int_{\\\\simplify{x^2+{b}x+{c_2}}}^{\\\\simplify{{m}x+{c_1}}}\\\\, \\\\mathrm{d}y\\\\, \\\\mathrm{d}x\\\\]\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003ecan be used to compute the shaded area.\u003c/p\u003e\\n\u003cp\u003e\u003c/p\u003e\\n\u003cp\u003ec)\u003c/p\u003e\\n\u003cp\u003eWe start with the inner integral first\u003c/p\u003e\\n\u003cp\u003e\\\\[\\\\int_{\\\\simplify{x^2+{b}x+{c_2}}}^{\\\\simplify{{m}x+{c_1}}}\\\\, \\\\mathrm{d}y = y|_{\\\\simplify{x^2+{b}x+{c_2}}}^{\\\\simplify{{m}x+{c_1}}} =\u0026nbsp; \\\\simplify{{m}x+{c_1}} - (\\\\simplify{x^2+{b}x+{c_2}}) = \\\\simplify{-x^2 + {m-b}x\u0026nbsp; + {c_1-c_2}}.\\\\]\u003c/p\u003e\\n\u003cp\u003e\u003c/p\u003e\\n\u003cp\u003eThen we get\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\\\\[\\\\int_{\\\\var{x1}}^{\\\\var{x2}} \\\\int_{\\\\simplify{x^2+{b}x+{c_2}}}^{\\\\simplify{{m}x+{c_1}}}\\\\, \\\\mathrm{d}y\\\\, \\\\mathrm{d}x =\\\\] {advice}\u003c/p\u003e\\n\u003cp\u003e\u003c/p\u003e\\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\u003c/p\u003e\\n\u003cp\u003e\u003c/p\u003e\", \"rulesets\": {}, \"builtin_constants\": {\"e\": true, \"pi,\\u03c0\": true, \"i\": true}, \"constants\": [], \"variables\": {\"b\": {\"name\": \"b\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-6..6)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"c_1\": {\"name\": \"c_1\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-6..6 except 0)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"cp1\": {\"name\": \"cp1\", \"group\": \"Ungrouped variables\", \"definition\": \"(-(b-m)-sqrt(dis))/2\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"cp2\": {\"name\": \"cp2\", \"group\": \"Ungrouped variables\", \"definition\": \"(-(b-m)+sqrt(dis))/2\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"m\": {\"name\": \"m\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1..5)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"c_2\": {\"name\": \"c_2\", \"group\": \"Ungrouped variables\", \"definition\": \"random(-8..8 except [0,c_1])\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"dis\": {\"name\": \"dis\", \"group\": \"Ungrouped variables\", \"definition\": \"(b-m)^2-4*(c_2-c_1)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"sol\": {\"name\": \"sol\", \"group\": \"Ungrouped variables\", \"definition\": \"-(cp2^3/3)+(m-b)cp2^2/2+(c_1-c_2)*cp2+(cp1)^3/3-(m-b)cp1^2/2-(c_1-c_2)*cp1\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"sol2dp\": {\"name\": \"sol2dp\", \"group\": \"Ungrouped variables\", \"definition\": \"precround(sol,2)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"advice\": {\"name\": \"advice\", \"group\": \"Ungrouped variables\", \"definition\": \"if(sol=round(sol),\u0027{simplified}\u0027,advice2)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"simplified\": {\"name\": \"simplified\", \"group\": \"Ungrouped variables\", \"definition\": \"\\\"\u003cp\u003e\\\\\\\\[ \\\\\\\\begin{split}\\\\\\\\simplify[all, !noLeadingMinus]{defint(-x^2+{m-b}x+{c_1-c_2},x,{cp1},{cp2})} \u0026amp;\\\\\\\\,= \\\\\\\\left[\\\\\\\\simplify[all, !noLeadingMinus]{-x^3/3+{m-b}x^2/2+{c_1-c_2}x} \\\\\\\\right]_\\\\\\\\var{cp1}^\\\\\\\\var{cp2},\\\\\\\\\\\\\\\\ \u0026amp;\\\\\\\\,=\\\\\\\\left[\\\\\\\\simplify[all, !collectNumbers,fractionNumbers,!noLeadingMinus]{-{cp2^3/3}+{(m-b)*cp2^2/2}+{(c_1-c_2)*cp2}}\\\\\\\\right]-\\\\\\\\left[\\\\\\\\simplify[all, !collectNumbers,fractionNumbers,!noLeadingMinus]{-{cp1^3/3}+{(m-b)*cp1^2/2}+{(c_1-c_2)*cp1}}\\\\\\\\right]\\\\\\\\\\\\\\\\ \u0026amp;\\\\\\\\,= \\\\\\\\left(\\\\\\\\simplify[all, fractionNumbers]{{-(cp2^3/3)+(m-b)cp2^2/2+(c_1-c_2)*cp2}}\\\\\\\\right)-\\\\\\\\left(\\\\\\\\simplify[all, fractionNumbers]{{-(cp1)^3/3+(m-b)cp1^2/2+(c_1-c_2)*cp1}}\\\\\\\\right)\\\\\\\\\\\\\\\\ \u0026amp;\\\\\\\\,=\\\\\\\\simplify[all, fractionNumbers]{{-(cp2^3/3)+(m-b)cp2^2/2+(c_1-c_2)*cp2+(cp1)^3/3-(m-b)cp1^2/2-(c_1-c_2)*cp1}}. \\\\\\\\end{split} \\\\\\\\]\u003c/p\u003e\\\"\", \"description\": \"\", \"templateType\": \"long string\", \"can_override\": false}, \"simplify\": {\"name\": \"simplify\", \"group\": \"Ungrouped variables\", \"definition\": \"safe(\\\"\u003cp\u003e\\\\\\\\[ \\\\\\\\begin{split}\\\\\\\\simplify[all, !noLeadingMinus]{defint(-x^2+{m-b}x+{c_1-c_2},x,{cp1},{cp2})} \u0026amp;\\\\\\\\,= \\\\\\\\left[\\\\\\\\simplify[all, !noLeadingMinus]{-x^3/3+{m-b}x^2/2+{c_1-c_2}x} \\\\\\\\right]_\\\\\\\\var{cp1}^\\\\\\\\var{cp2},\\\\\\\\\\\\\\\\ \u0026amp;\\\\\\\\,=\\\\\\\\left[\\\\\\\\simplify[all, !collectNumbers,fractionNumbers,!noLeadingMinus]{-{cp2^3/3}+{(m-b)*cp2^2/2}+{(c_1-c_2)*cp2}}\\\\\\\\right]-\\\\\\\\left[\\\\\\\\simplify[all, !collectNumbers,fractionNumbers,!noLeadingMinus]{-{cp1^3/3}+{(m-b)*cp1^2/2}+{(c_1-c_2)*cp1}}\\\\\\\\right]\\\\\\\\\\\\\\\\ \u0026amp;\\\\\\\\,= \\\\\\\\left(\\\\\\\\simplify[all, fractionNumbers]{{-(cp2^3/3)+(m-b)cp2^2/2+(c_1-c_2)*cp2}}\\\\\\\\right)-\\\\\\\\left(\\\\\\\\simplify[all, fractionNumbers]{{-(cp1)^3/3+(m-b)cp1^2/2+(c_1-c_2)*cp1}}\\\\\\\\right)\\\\\\\\\\\\\\\\ \u0026amp;\\\\\\\\,=\\\\\\\\simplify[all, fractionNumbers]{{-(cp2^3/3)+(m-b)cp2^2/2+(c_1-c_2)*cp2+(cp1)^3/3-(m-b)cp1^2/2-(c_1-c_2)*cp1}}\\\\\\\\\\\\\\\\ \u0026amp;\\\\\\\\,=\\\\\\\\var{sol2dp} \\\\\\\\,\\\\\\\\text{(2dp)}. \\\\\\\\end{split} \\\\\\\\]\u003c/p\u003e\\\")\", \"description\": \"\", \"templateType\": \"long string\", \"can_override\": false}, \"advice2\": {\"name\": \"advice2\", \"group\": \"Ungrouped variables\", \"definition\": \"if(sol=sol2dp,\u0027{simplifyy}\u0027,\u0027{simplify}\u0027)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"simplifyy\": {\"name\": \"simplifyy\", \"group\": \"Ungrouped variables\", \"definition\": \"\\\"\u003cp\u003e\\\\\\\\[ \\\\\\\\begin{split}\\\\\\\\simplify[all,!noLeadingMinus]{defint(-x^2+{m-b}x+{c_1-c_2},x,{cp1},{cp2})} \u0026amp;\\\\\\\\,= \\\\\\\\left[\\\\\\\\simplify[all,!noLeadingMinus]{-x^3/3+{m-b}x^2/2+{c_1-c_2}x} \\\\\\\\right]_\\\\\\\\var{cp1}^\\\\\\\\var{cp2},\\\\\\\\\\\\\\\\ \u0026amp;\\\\\\\\,=\\\\\\\\left[\\\\\\\\simplify[all, !collectNumbers,fractionNumbers,!noLeadingMinus]{-{cp2^3/3}+{(m-b)*cp2^2/2}+{(c_1-c_2)*cp2}}\\\\\\\\right]-\\\\\\\\left[\\\\\\\\simplify[all, !collectNumbers,fractionNumbers,!noLeadingMinus]{-{cp1^3/3}+{(m-b)*cp1^2/2}+{(c_1-c_2)*cp1}}\\\\\\\\right]\\\\\\\\\\\\\\\\ \u0026amp;\\\\\\\\,= \\\\\\\\left(\\\\\\\\simplify[all, fractionNumbers]{{-(cp2^3/3)+(m-b)cp2^2/2+(c_1-c_2)*cp2}}\\\\\\\\right)-\\\\\\\\left(\\\\\\\\simplify[all, fractionNumbers]{{-(cp1)^3/3+(m-b)cp1^2/2+(c_1-c_2)*cp1}}\\\\\\\\right)\\\\\\\\\\\\\\\\ \u0026amp;\\\\\\\\,=\\\\\\\\simplify[all, fractionNumbers]{{-(cp2^3/3)+(m-b)cp2^2/2+(c_1-c_2)*cp2+(cp1)^3/3-(m-b)cp1^2/2-(c_1-c_2)*cp1}}\\\\\\\\\\\\\\\\ \u0026amp;\\\\\\\\,=\\\\\\\\var{sol2dp} \\\\\\\\end{split} \\\\\\\\]\u003c/p\u003e\\\"\", \"description\": \"\", \"templateType\": \"long string\", \"can_override\": false}, \"defs\": {\"name\": \"defs\", \"group\": \"Ungrouped variables\", \"definition\": \"[\\n  [\u0027M\u0027,m],\\n  [\u0027D\u0027,c_1],\\n  [\u0027B\u0027,b],\\n  [\u0027C\u0027,c_2]\\n]\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"x2\": {\"name\": \"x2\", \"group\": \"Ungrouped variables\", \"definition\": \"((m-b)+delta)/2\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"delta\": {\"name\": \"delta\", \"group\": \"Ungrouped variables\", \"definition\": \"sqrt((b-m)^2 - 4*(c_2-c_1))\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"x1\": {\"name\": \"x1\", \"group\": \"Ungrouped variables\", \"definition\": \"((m-b)-delta)/2\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"y1\": {\"name\": \"y1\", \"group\": \"Ungrouped variables\", \"definition\": \"m*x1 + c_1\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"y2\": {\"name\": \"y2\", \"group\": \"Ungrouped variables\", \"definition\": \"m*x2 + c_1\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}}, \"variablesTest\": {\"condition\": \"cp1=round(cp1) and cp2=round(cp2) and dis\u003e0\", \"maxRuns\": \"100\"}, \"ungrouped_variables\": [\"m\", \"c_1\", \"b\", \"c_2\", \"cp1\", \"cp2\", \"dis\", \"sol\", \"sol2dp\", \"advice\", \"advice2\", \"simplified\", \"simplify\", \"simplifyy\", \"defs\", \"x2\", \"delta\", \"x1\", \"y1\", \"y2\"], \"variable_groups\": [{\"name\": \"Unnamed group\", \"variables\": []}], \"functions\": {}, \"preamble\": {\"js\": \"\", \"css\": \"\"}, \"parts\": [{\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"prompt\": \"\u003cp\u003eDenote the intersection points of $\\\\simplify{y={m}x+{c_1}}$ and $\\\\simplify{y=x^2+{b}x+{c_2}}$ as $(x_1, y_1)$ (leftmost) and $(x_2,y_2)$ (rightmost). Find these points\u003c/p\u003e\\n\u003cp\u003e$x_1=$[[0]], $y_1=$[[1]]\u003c/p\u003e\\n\u003cp\u003e$x_2=$[[2]], $y_2=$ [[3]]\u003c/p\u003e\", \"gaps\": [{\"type\": \"jme\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"answer\": \"{x1}\", \"showPreview\": true, \"checkingType\": \"absdiff\", \"checkingAccuracy\": 0.001, \"failureRate\": 1, \"vsetRangePoints\": 5, \"vsetRange\": [0, 1], \"checkVariableNames\": false, \"singleLetterVariables\": false, \"allowUnknownFunctions\": true, \"implicitFunctionComposition\": false, \"caseSensitive\": false, \"valuegenerators\": []}, {\"type\": \"jme\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"answer\": \"{y1}\", \"showPreview\": true, \"checkingType\": \"absdiff\", \"checkingAccuracy\": 0.001, \"failureRate\": 1, \"vsetRangePoints\": 5, \"vsetRange\": [0, 1], \"checkVariableNames\": false, \"singleLetterVariables\": false, \"allowUnknownFunctions\": true, \"implicitFunctionComposition\": false, \"caseSensitive\": false, \"valuegenerators\": []}, {\"type\": \"jme\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"answer\": \"{x2}\", \"showPreview\": true, \"checkingType\": \"absdiff\", \"checkingAccuracy\": 0.001, \"failureRate\": 1, \"vsetRangePoints\": 5, \"vsetRange\": [0, 1], \"checkVariableNames\": false, \"singleLetterVariables\": false, \"allowUnknownFunctions\": true, \"implicitFunctionComposition\": false, \"caseSensitive\": true, \"valuegenerators\": []}, {\"type\": \"jme\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"answer\": \"{y2}\", \"showPreview\": true, \"checkingType\": \"absdiff\", \"checkingAccuracy\": 0.001, \"failureRate\": 1, \"vsetRangePoints\": 5, \"vsetRange\": [0, 1], \"checkVariableNames\": false, \"singleLetterVariables\": false, \"allowUnknownFunctions\": true, \"implicitFunctionComposition\": false, \"caseSensitive\": false, \"valuegenerators\": []}], \"sortAnswers\": false}, {\"type\": \"jme\", \"useCustomName\": false, \"customName\": \"\", \"marks\": \"3\", \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"prompt\": \"\u003cp\u003eWrite a double integral, integrating $y$ first, to compute the shaded area.\u0026nbsp;\u003c/p\u003e\", \"answer\": \"defint(defint( \u0027\u0027,y, x^2+{b}x+{c_2}, {m}x+{c_1}), x,{x1},{x2})\", \"showPreview\": true, \"checkingType\": \"absdiff\", \"checkingAccuracy\": 0.001, \"failureRate\": 1, \"vsetRangePoints\": 5, \"vsetRange\": [0, 1], \"checkVariableNames\": false, \"singleLetterVariables\": false, \"allowUnknownFunctions\": true, \"implicitFunctionComposition\": false, \"caseSensitive\": false, \"valuegenerators\": [{\"name\": \"x\", \"value\": \"\"}, {\"name\": \"y\", \"value\": \"\"}]}, {\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"prompt\": \"\u003cp\u003eCompute the double integral you wrote in part b)\u003c/p\u003e\\n\u003cp\u003e[[0]]\u0026nbsp;\u003cem\u003e(Give your answers to 2 decimal places where necessary)\u003c/em\u003e\u003c/p\u003e\", \"gaps\": [{\"type\": \"jme\", \"useCustomName\": true, \"customName\": \"Gap 0\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"answer\": \"{sol2dp}\", \"showPreview\": true, \"checkingType\": \"absdiff\", \"checkingAccuracy\": \"0.01\", \"failureRate\": 1, \"vsetRangePoints\": 5, \"vsetRange\": [0, 1], \"checkVariableNames\": false, \"singleLetterVariables\": false, \"allowUnknownFunctions\": true, \"implicitFunctionComposition\": false, \"caseSensitive\": false, \"valuegenerators\": []}], \"sortAnswers\": false}], \"partsMode\": \"all\", \"maxMarks\": 0, \"objectives\": [], \"penalties\": [], \"objectiveVisibility\": \"always\", \"penaltyVisibility\": \"always\", \"type\": \"question\"}, {\"name\": \"Volume of a tetrahedron\", \"extensions\": [], \"custom_part_types\": [], \"resources\": [], \"navigation\": {\"allowregen\": true, \"showfrontpage\": false, \"preventleave\": false, \"typeendtoleave\": false}, \"contributors\": [{\"name\": \"Ugur Efem\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/18261/\"}], \"tags\": [], \"metadata\": {\"description\": \"\u003cp\u003eVolume of a tetrahedron using integrals\u003c/p\u003e\", \"licence\": \"Creative Commons Attribution-NonCommercial 4.0 International\"}, \"statement\": \"\u003cp\u003eFind the volume of the tetrahedron bounded by the coordinate planes $x=0$, $y=0$ and $z=0$ and the plane $\\\\frac{x}{\\\\var{a}} + \\\\frac{y}{\\\\var{b}} + \\\\frac{z}{\\\\var{c}} =1$.\u003c/p\u003e\", \"advice\": \"\u003cp\u003eThe coordinate surfaces $x=0$, $y=0$ and $z=0$ are given. The plane $\\\\frac{x}{\\\\var{a}} + \\\\frac{y}{\\\\var{b}} + \\\\frac{z}{\\\\var{c}} = 1$ can be rewritten as a functions as follows\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\\\\[z = f(x,y) = \\\\var{c}\\\\left( 1 - \\\\frac{x}{\\\\var{a}} - \\\\frac{y}{\\\\var{b}}\\\\right).\\\\]\u003c/p\u003e\\n\u003cp\u003eThe surface of $f(x,y)$ intersects the axes at $x=\\\\var{a}, y=\\\\var{b}$ and $z=\\\\var{c}$.\u003c/p\u003e\\n\u003cp\u003eLet us integrate $y$-firts. Then the triangular region the tetrahedron sits is bounded by the lines $x=0, y=0$ and $\\\\frac{x}{\\\\var{a}} + \\\\frac{y}{\\\\var{b}} = 1$. Then we have the following bounds for integration\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\\\\[0\u0026lt;x\u0026lt;\\\\var{a} \\\\quad \\\\mbox{and} \\\\quad 0 \u0026lt; y\u0026lt;\u0026nbsp; \\\\frac{\\\\var{b}}{\\\\var{a}}(\\\\var{a} -x).\\\\]\u003c/p\u003e\\n\u003cp\u003eHence, we can compute the volume of the tetrahedron as\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\\\\[V = \\\\int_0^\\\\var{a}\\\\int_0^{\\\\frac{\\\\var{b}}{\\\\var{a}}(\\\\var{a} -x)}f(x,y) \\\\,dy\\\\, dx = \\\\int_0^\\\\var{a}\\\\int_0^{\\\\frac{\\\\var{b}}{\\\\var{a}}(\\\\var{a} -x)} \\\\var{c}\\\\left( 1 - \\\\frac{x}{\\\\var{a}} - \\\\frac{y}{\\\\var{b}}\\\\right) \\\\,dy\\\\, dx =\\\\\\\\[3mm]\u003cbr/\u003e= \\\\int_0^\\\\var{a} \\\\var{c}\\\\left[ y - \\\\frac{xy}{\\\\var{a}} - \\\\frac{y^2}{\\\\simplify{2*{b}}}\\\\right]_0^{\\\\frac{\\\\var{b}}{\\\\var{a}}(\\\\var{a} -x)}\\\\, dx = \\\\int_0^\\\\var{a} \\\\frac{\\\\simplify{{b*c}}}{\\\\simplify{{2*a^2}}}(\\\\var{a}-x)^2 \\\\, dx = \\\\frac{\\\\simplify{{a*b*c}}}{6}\\\\]\u003c/p\u003e\\n\u003cpre\u003e\u003c/pre\u003e\\n\u003cpre\u003e\u003c/pre\u003e\", \"rulesets\": {}, \"builtin_constants\": {\"e\": true, \"pi,\\u03c0\": true, \"i\": true}, \"constants\": [], \"variables\": {\"a\": {\"name\": \"a\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1 .. 6#1)\", \"description\": \"\", \"templateType\": \"randrange\", \"can_override\": false}, \"b\": {\"name\": \"b\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1 .. 6#1)\", \"description\": \"\", \"templateType\": \"randrange\", \"can_override\": false}, \"c\": {\"name\": \"c\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1 .. 6#1)\", \"description\": \"\", \"templateType\": \"randrange\", \"can_override\": false}}, \"variablesTest\": {\"condition\": \"\", \"maxRuns\": 100}, \"ungrouped_variables\": [\"a\", \"b\", \"c\"], \"variable_groups\": [], \"functions\": {}, \"preamble\": {\"js\": \"\", \"css\": \"\"}, \"parts\": [{\"type\": \"jme\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"prompt\": \"\u003cp\u003e(enter your answer as an interger or a fraction)\u003c/p\u003e\", \"answer\": \"{a}*{b}*{c}/6\", \"showPreview\": true, \"checkingType\": \"absdiff\", \"checkingAccuracy\": 0.001, \"failureRate\": 1, \"vsetRangePoints\": 5, \"vsetRange\": [0, 1], \"checkVariableNames\": false, \"singleLetterVariables\": false, \"allowUnknownFunctions\": true, \"implicitFunctionComposition\": false, \"caseSensitive\": false, \"valuegenerators\": []}], \"partsMode\": \"all\", \"maxMarks\": 0, \"objectives\": [], \"penalties\": [], \"objectiveVisibility\": \"always\", \"penaltyVisibility\": \"always\", \"type\": \"question\"}, {\"name\": \"mass of tetrahedron\", \"extensions\": [], \"custom_part_types\": [], \"resources\": [], \"navigation\": {\"allowregen\": true, \"showfrontpage\": false, \"preventleave\": false, \"typeendtoleave\": false}, \"contributors\": [{\"name\": \"Ugur Efem\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/18261/\"}], \"tags\": [], \"metadata\": {\"description\": \"\u003cp\u003emass of tetrahedron via integration\u003c/p\u003e\", \"licence\": \"Creative Commons Attribution-NonCommercial 4.0 International\"}, \"statement\": \"\u003cp\u003eCosider the tetrahedron bounded by the coordinate planes $x=0$, $y=0$ and $z=0$ and the plane $\\\\frac{x}{\\\\var{a}} + \\\\frac{y}{\\\\var{b}} + \\\\frac{z}{\\\\var{c}} =1$. Assume that it has a density function $\\\\rho(x) = \\\\var{R0}(\\\\var{a}+x)$.\u0026nbsp;\u003c/p\u003e\", \"advice\": \"\u003cp\u003e\u003cstrong\u003ea)\u003c/strong\u003e\u003c/p\u003e\\n\u003cp\u003eThe coordinate surfaces $x=0$, $y=0$ and $z=0$ are given. The plane $\\\\frac{x}{\\\\var{a}} + \\\\frac{y}{\\\\var{b}} + \\\\frac{z}{\\\\var{c}} = 1$ can be rewritten as a functions as follows\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\\\\[z = f(x,y) = \\\\var{c}\\\\left( 1 - \\\\frac{x}{\\\\var{a}} - \\\\frac{y}{\\\\var{b}}\\\\right).\\\\]\u003c/p\u003e\\n\u003cp\u003eThe surface of $f(x,y)$ intersects the axes at $x=\\\\var{a}, y=\\\\var{b}$ and $z=\\\\var{c}$.\u003c/p\u003e\\n\u003cp\u003eWe can write the boundaries of the tetrahedron as\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\\\\[0\u0026lt;x\u0026lt;\\\\var{a} \\\\quad \\\\mbox{and} \\\\quad 0 \u0026lt; y\u0026lt;\u0026nbsp; \\\\frac{\\\\var{b}}{\\\\var{a}}(\\\\var{a} -x) \\\\quad\\\\mbox{and }\\\\quad 0\\\\leq z \\\\leq \\\\var{c}\\\\left( 1 - \\\\frac{x}{\\\\var{a}} - \\\\frac{y}{\\\\var{b}}\\\\right).\\\\]\u003c/p\u003e\\n\u003cp\u003e\u003c/p\u003e\\n\u003cp\u003eThus, with mass element $dM = \\\\rho(x)dV = \\\\rho(x)dx\\\\,dy\\\\,dz$, the total mass is\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\\\\[M= \\\\int_T\\\\,dM = \\\\int_0^\\\\var{a}\\\\int_0^{\\\\frac{\\\\var{b}}{\\\\var{a}}(\\\\var{a} -x)}\\\\int_0^{\\\\var{c}\\\\left( 1 - \\\\frac{x}{\\\\var{a}} - \\\\frac{y}{\\\\var{b}}\\\\right)}\\\\rho(x)\\\\,dz\\\\,dy\\\\,dx =\\\\\\\\[3mm]\u003cbr/\u003e\u0026nbsp;\\\\int_0^\\\\var{a}\\\\int_0^{\\\\frac{\\\\var{b}}{\\\\var{a}}(\\\\var{a} -x)}\\\\int_0^{\\\\var{c}\\\\left( 1 - \\\\frac{x}{\\\\var{a}} - \\\\frac{y}{\\\\var{b}}\\\\right)} \\\\var{R0}(\\\\var{a}+x) \\\\,dz\\\\,dy\\\\,dx =\\\\\\\\[3mm]\u003cbr/\u003e\\\\int_0^\\\\var{a} \\\\var{R0}(\\\\var{a}+x) \\\\int_0^{\\\\frac{\\\\var{b}}{\\\\var{a}}(\\\\var{a} -x)}\\\\int_0^{\\\\var{c}\\\\left( 1 - \\\\frac{x}{\\\\var{a}} - \\\\frac{y}{\\\\var{b}}\\\\right)}\u0026nbsp; \\\\,dz\\\\,dy\\\\,dx =\\\\\\\\[3mm]\u003cbr/\u003e\\\\int_0^\\\\var{a} \\\\var{R0}(\\\\var{a}+x) \\\\int_0^{\\\\frac{\\\\var{b}}{\\\\var{a}}(\\\\var{a} -x)} \\\\var{c}\\\\left( 1 - \\\\frac{x}{\\\\var{a}} - \\\\frac{y}{\\\\var{b}}\\\\right) \\\\,dy\\\\,dx =\\\\\\\\[3mm]\u003cbr/\u003e\\\\int_0^\\\\var{a} \\\\var{R0}(\\\\var{a}+x)\\\\left[ \\\\frac{\\\\simplify{{b*c}}}{\\\\simplify{{2*a^2}}}(\\\\var{a}-x)^2\\\\right]\\\\, dx = \\\\frac{5\\\\cdot\\\\var{a}^2\\\\cdot\\\\var{b}\\\\cdot\\\\var{c}\\\\cdot\\\\var{R0}}{24}=\\\\frac{\\\\simplify{{5*{a^2}*{b}*{c}*{R0}}}}{24}.\\\\]\u003c/p\u003e\\n\u003cp\u003e\u003c/p\u003e\\n\u003cp\u003e\u003cstrong\u003eb)\u003c/strong\u003e\u003c/p\u003e\\n\u003cp\u003eWe start with the $x$ coordinate.\u003c/p\u003e\\n\u003cp\u003e\\\\[\\\\bar x= \\\\frac{1}{M}\\\\int_T x\\\\,dM = \\\\int_0^\\\\var{a}\\\\int_0^{\\\\frac{\\\\var{b}}{\\\\var{a}}(\\\\var{a} -x)}\\\\int_0^{\\\\var{c}\\\\left( 1 - \\\\frac{x}{\\\\var{a}} - \\\\frac{y}{\\\\var{b}}\\\\right)}x\\\\rho(x)\\\\,dz\\\\,dy\\\\,dx =\\\\\\\\[3mm]\u003cbr/\u003e\\\\frac{1}{M} \\\\int_0^\\\\var{a}\\\\int_0^{\\\\frac{\\\\var{b}}{\\\\var{a}}(\\\\var{a} -x)}\\\\int_0^{\\\\var{c}\\\\left( 1 - \\\\frac{x}{\\\\var{a}} - \\\\frac{y}{\\\\var{b}}\\\\right)} x\\\\var{R0}(\\\\var{a}+x) \\\\,dz\\\\,dy\\\\,dx =\\\\\\\\[3mm]\u003cbr/\u003e\\\\frac{1}{M}\\\\int_0^\\\\var{a} x\\\\var{R0}(\\\\var{a}+x) \\\\int_0^{\\\\frac{\\\\var{b}}{\\\\var{a}}(\\\\var{a} -x)}\\\\int_0^{\\\\var{c}\\\\left( 1 - \\\\frac{x}{\\\\var{a}} - \\\\frac{y}{\\\\var{b}}\\\\right)}\u0026nbsp; \\\\,dz\\\\,dy\\\\,dx =\\\\\\\\[3mm]\u003cbr/\u003e\\\\frac{1}{M}\\\\int_0^\\\\var{a} x\\\\var{R0}(\\\\var{a}+x) \\\\int_0^{\\\\frac{\\\\var{b}}{\\\\var{a}}(\\\\var{a} -x)} \\\\var{c}\\\\left( 1 - \\\\frac{x}{\\\\var{a}} - \\\\frac{y}{\\\\var{b}}\\\\right) \\\\,dy\\\\,dx =\\\\\\\\[3mm]\u003cbr/\u003e\\\\frac{1}{M}\\\\int_0^\\\\var{a} x\\\\var{R0}(\\\\var{a}+x)\\\\left[ \\\\frac{\\\\simplify{{b*c}}}{\\\\simplify{{2*a^2}}}(\\\\var{a}-x)^2\\\\right]\\\\, dx =\\\\\\\\[3mm]\u003cbr/\u003e\\\\frac{\\\\simplify{{R0*b*c}}}{\\\\simplify{{2*a^2}}M}\\\\int_0^\\\\var{a} x\u0026nbsp; (\\\\var{a}+x)\\\\left[ (\\\\var{a}-x)^2\\\\right]\\\\, dx =\u003cbr/\u003e\\\\frac{\\\\simplify{{R0*b*c}}}{\\\\simplify{{2*a^2}}M}\\\\int_0^\\\\var{a}x(\\\\var{a^3} -\\\\var{a^2}x-\\\\var{a} x^2 + x^3) \\\\, dx =\\\\\\\\[3mm]\u003cbr/\u003e\\\\frac{\\\\simplify{{R0*b*c}}}{\\\\simplify{{2*a^2}}M}\\\\int_0^\\\\var{a}\\\\var{a^3}x -\\\\var{a^2}x^2-\\\\var{a} x^3 + x^4 \\\\, dx = \\\\\\\\[3mm]\u003cbr/\u003e\\\\frac{\\\\simplify{{R0*b*c}}}{\\\\simplify{{2*a^2}}M}\\\\left[\\\\frac{\\\\var{a^3}x^2}{2} -\\\\frac{\\\\var{a^2}x^3}{3}-\\\\frac{\\\\var{a} x^4}{4} + \\\\frac{x^5}{5} \\\\right]_0^{\\\\var{a}}=\\\\\\\\[3mm]\u003cbr/\u003e\\\\simplify[fractionNumbers]{({a}^5/2 - ({a}^5)/3 - {a}^5/4 + {a}^5/5) *{R0*b*c}/{2*a^2*Mass}} = \u003cbr/\u003e\\\\simplify[fractionNumbers,otherNumbers]{({a}^5/2 - ({a}^5)/3 - {a}^5/4 + {a}^5/5) *{R0*b*c}/{2*a^2*Mass}}.\\\\]\u003c/p\u003e\\n\u003cp\u003eSimlarly, for $y$ coordinate:\u003c/p\u003e\\n\u003cp\u003e\\\\[\\\\bar y = \\\\frac{1}{M}\\\\int_T y\\\\,dM = \\\\int_0^\\\\var{a}\\\\int_0^{\\\\frac{\\\\var{b}}{\\\\var{a}}(\\\\var{a} -x)}\\\\int_0^{\\\\var{c}\\\\left( 1 - \\\\frac{x}{\\\\var{a}} - \\\\frac{y}{\\\\var{b}}\\\\right)}y\\\\rho(x)\\\\,dz\\\\,dy\\\\,dx =\\\\\\\\[3mm]\u003cbr/\u003e\\\\frac{1}{M} \\\\int_0^\\\\var{a}\\\\int_0^{\\\\frac{\\\\var{b}}{\\\\var{a}}(\\\\var{a} -x)}\\\\int_0^{\\\\var{c}\\\\left( 1 - \\\\frac{x}{\\\\var{a}} - \\\\frac{y}{\\\\var{b}}\\\\right)} y\\\\var{R0}(\\\\var{a}+x) \\\\,dz\\\\,dy\\\\,dx =\\\\\\\\[3mm]\u003cbr/\u003e\\\\frac{1}{M}\\\\int_0^\\\\var{a} \\\\var{R0}(\\\\var{a}+x) \\\\int_0^{\\\\frac{\\\\var{b}}{\\\\var{a}}(\\\\var{a} -x)} y \\\\int_0^{\\\\var{c}\\\\left( 1 - \\\\frac{x}{\\\\var{a}} - \\\\frac{y}{\\\\var{b}}\\\\right)}\u0026nbsp; \\\\,dz\\\\,dy\\\\,dx =\\\\\\\\[3mm]\u003cbr/\u003e\\\\frac{1}{M}\\\\int_0^\\\\var{a} \\\\var{R0}(\\\\var{a}+x) \\\\int_0^{\\\\frac{\\\\var{b}}{\\\\var{a}}(\\\\var{a} -x)} y\\\\var{c}\\\\left( 1 - \\\\frac{x}{\\\\var{a}} - \\\\frac{y}{\\\\var{b}}\\\\right) \\\\,dy\\\\,dx =\\\\\\\\[3mm]\u003cbr/\u003e\\\\frac{1}{M}\\\\int_0^\\\\var{a} \\\\var{R0}(\\\\var{a}+x) \\\\int_0^{\\\\frac{\\\\var{b}}{\\\\var{a}}(\\\\var{a} -x)} \\\\var{c}\\\\left( y - \\\\frac{xy}{\\\\var{a}} - \\\\frac{y^2}{\\\\var{b}}\\\\right) \\\\,dy\\\\,dx =\\\\\\\\[3mm]\u003cbr/\u003e\\\\frac{1}{M}\\\\int_0^\\\\var{a} \\\\var{R0}(\\\\var{a}+x)\\\\frac{\\\\simplify{{c*b^2}}}{\\\\simplify{{6*a^3}}}\\\\left[\\\\var{a^3}-3\\\\cdot\\\\simplify[unitFactor]{{a^2}x} +3\\\\cdot\\\\simplify[unitFactor]{{a}x^2}-x^3\\\\right]\\\\, dx =\\\\\\\\[3mm]\u003cbr/\u003e\\\\frac{\\\\simplify{{R0*b^2*c}}}{\\\\simplify{{6*a^3}}M}\\\\int_0^\\\\var{a}\u0026nbsp; \u0026nbsp;(\\\\var{a}+x)( \\\\var{a}-x)^3, dx =\u003cbr/\u003e\\\\frac{\\\\simplify{{R0*b^2*c}}}{\\\\simplify{{6*a^3}}M}\\\\int_0^\\\\var{a}\\\\var{a^4} -2\\\\cdot\\\\simplify[unitFactor]{{a^3}x} +2\\\\cdot\\\\simplify[unitFactor]{{a}x^3}-x^4 \\\\, dx =\\\\\\\\[3mm]\u003cbr/\u003e\\\\frac{\\\\simplify{{R0*b^2*c}}}{\\\\simplify{{6*a^3}}M}\\\\left[\\\\simplify[unitFactor]{{a^4}x} - \\\\simplify[unitFactor]{{a^3}x^2} +\\\\frac{\\\\simplify[unitFactor]{{a}x^4}}{2}-\\\\frac{x^5}{5} \\\\right]_0^\\\\var{a} = \\\\\\\\[3mm]\u003cbr/\u003e\u003cbr/\u003e\\\\simplify[fractionNumbers]{({a}^5 - ({a}^5) + {a}^5 /2- {a}^5/5) *{R0*b^2*c}/{6*a^3*Mass}} = \u003cbr/\u003e\\\\simplify[fractionNumbers,otherNumbers]{({a}^5 - ({a}^5) + {a}^5 /2- {a}^5/5) *{R0*b^2*c}/{6*a^3*Mass}}.\\\\]\u003c/p\u003e\\n\u003cp\u003eFinaly, for $z$ coordinate:\u003c/p\u003e\\n\u003cp\u003e\\\\[\\\\bar z= \\\\frac{1}{M}\\\\int_T z\\\\,dM = \\\\int_0^\\\\var{a}\\\\int_0^{\\\\frac{\\\\var{c}}{\\\\var{a}}(\\\\var{a} -x)}\\\\int_0^{\\\\var{b}\\\\left( 1 - \\\\frac{x}{\\\\var{a}} - \\\\frac{z}{\\\\var{c}}\\\\right)}z\\\\rho(x)\\\\,dy\\\\,dz\\\\,dx =\\\\\\\\[3mm]\u003cbr/\u003e\\\\frac{1}{M}\\\\int_0^\\\\var{a}\\\\int_0^{\\\\frac{\\\\var{c}}{\\\\var{a}}(\\\\var{a} -x)}\\\\int_0^{\\\\var{b}\\\\left( 1 - \\\\frac{x}{\\\\var{a}} - \\\\frac{z}{\\\\var{c}}\\\\right)} z\\\\var{R0}(\\\\var{a}+x) \\\\,dy\\\\,dz\\\\,dx =\\\\\\\\[3mm]\u003cbr/\u003e\\\\frac{1}{M} \\\\int_0^\\\\var{a}\\\\var{R0}(\\\\var{a}+x)\\\\int_0^{\\\\frac{\\\\var{c}}{\\\\var{a}}(\\\\var{a} -x)}z\\\\int_0^{\\\\var{b}\\\\left( 1 - \\\\frac{x}{\\\\var{a}} - \\\\frac{z}{\\\\var{c}}\\\\right)}\u0026nbsp; \u0026nbsp;\\\\,dy\\\\,dz\\\\,dx =\\\\\\\\[3mm]\u003cbr/\u003e\\\\frac{1}{M}\\\\int_0^\\\\var{a} \\\\var{R0}(\\\\var{a}+x)\\\\int_0^{\\\\frac{\\\\var{c}}{\\\\var{a}}(\\\\var{a} -x)} z\\\\var{b}\\\\left( 1 - \\\\frac{x}{\\\\var{a}} - \\\\frac{z}{\\\\var{c}}\\\\right)\\\\,dz\\\\,dx =\\\\\\\\[3mm]\u003cbr/\u003e\\\\frac{1}{M}\\\\int_0^\\\\var{a} \\\\var{R0}(\\\\var{a}+x)\\\\int_0^{\\\\frac{\\\\var{c}}{\\\\var{a}}(\\\\var{a} -x)} \\\\var{b}\\\\left( z - \\\\frac{xz}{\\\\var{a}} - \\\\frac{z^2}{\\\\var{c}}\\\\right)\\\\,dz\\\\,dx =\\\\\\\\[3mm]\u003cbr/\u003e\\\\frac{\\\\simplify{{R0*a}}}{M}\\\\int_0^\\\\var{a} (\\\\var{a}+x) \\\\left[ \\\\frac{z^2}{2} - \\\\frac{xz^2}{\\\\var{2*a}} - \\\\frac{z^3}{\\\\var{3*c}}\\\\right]_0^{\\\\frac{\\\\var{c}}{\\\\var{a}}(\\\\var{a} -x)}\\\\,dx =\\\\\\\\[3mm]\u003cbr/\u003e\\\\frac{\\\\simplify{{R0*c^2}}}{\\\\simplify{{6*a^2}}M}\\\\int_0^\\\\var{a} (\\\\var{a}+x)(a-x)^3\\\\,dx = \u003cbr/\u003e\\\\frac{\\\\simplify{{R0*c^2}}}{\\\\simplify{{6*a^2}}M}\\\\int_0^\\\\var{a} \\\\var{a^4}-\\\\var{2*a^3}x + \\\\var{2*a}x^3 - x^4\\\\,dx\\\\\\\\[3mm]\u003cbr/\u003e\\\\frac{\\\\simplify{{R0*c^2}}}{\\\\simplify{{6*a^2}}M}\\\\left[\\\\var{a^4}x -\\\\frac{\\\\var{2*a^3}x^2}{2} + \\\\frac{\\\\var{a}x^4}{2} - \\\\frac{x^5}{5}\\\\right]_0^{\\\\var{a}}=\\\\\\\\[3mm]\u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\\\\simplify[fractionNumbers]{({a^5} -{2*a^5}/2 + {a^5}/2 - {a^5}/5) *{R0*c^2}/{6*a^2*Mass}} = \u003cbr/\u003e\\\\simplify[fractionNumbers,otherNumbers]{({a^5} -{2*a^5}/2 + {a^5}/2 - {a^5}/5) *{R0*c^2}/{6*a^2*Mass}}.\u003cbr/\u003e\\\\]\u003c/p\u003e\", \"rulesets\": {}, \"builtin_constants\": {\"e\": true, \"pi,\\u03c0\": true, \"i\": true}, \"constants\": [], \"variables\": {\"a\": {\"name\": \"a\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1 .. 6#1)\", \"description\": \"\", \"templateType\": \"randrange\", \"can_override\": false}, \"b\": {\"name\": \"b\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1 .. 6#1)\", \"description\": \"\", \"templateType\": \"randrange\", \"can_override\": false}, \"c\": {\"name\": \"c\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1 .. 6#1)\", \"description\": \"\", \"templateType\": \"randrange\", \"can_override\": false}, \"r0\": {\"name\": \"r0\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1 .. 5#1)\", \"description\": \"\", \"templateType\": \"randrange\", \"can_override\": false}, \"massCentrex\": {\"name\": \"massCentrex\", \"group\": \"Ungrouped variables\", \"definition\": \"((a^5/2 - a^5/3 - a^5/4 + a^5/5)*(R0*b*c))/(2*(a^2)*Mass)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"Mass\": {\"name\": \"Mass\", \"group\": \"Ungrouped variables\", \"definition\": \"(5*{a^2}*{b}*{c}*{R0})/24\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"massCentrey\": {\"name\": \"massCentrey\", \"group\": \"Ungrouped variables\", \"definition\": \"((a^5 - a^5 + a^5/2- a^5/5) *(R0*b^2*c))/(6*a^3*Mass)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"massCentrez\": {\"name\": \"massCentrez\", \"group\": \"Ungrouped variables\", \"definition\": \"((a^5  - (2*a^5)/2 +  a^5/2 - a^5/5)*(R0*c^2))/(6*(a^2)*Mass)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}}, \"variablesTest\": {\"condition\": \"\", \"maxRuns\": 100}, \"ungrouped_variables\": [\"a\", \"b\", \"c\", \"r0\", \"Mass\", \"massCentrex\", \"massCentrey\", \"massCentrez\"], \"variable_groups\": [], \"functions\": {}, \"preamble\": {\"js\": \"\", \"css\": \"\"}, \"parts\": [{\"type\": \"jme\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"prompt\": \"\u003cp\u003eFind the mass of the tetrahedron.\u003c/p\u003e\\n\u003cp\u003e(enter your answer as an interger or a fraction)\u003c/p\u003e\", \"answer\": \"5*{a^2}*{b}*{c}*{R0}/24\", \"showPreview\": true, \"checkingType\": \"absdiff\", \"checkingAccuracy\": 0.001, \"failureRate\": 1, \"vsetRangePoints\": 5, \"vsetRange\": [0, 1], \"checkVariableNames\": false, \"singleLetterVariables\": false, \"allowUnknownFunctions\": true, \"implicitFunctionComposition\": false, \"caseSensitive\": false, \"valuegenerators\": []}, {\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"prompt\": \"\u003cp\u003eFind the centre of mass of the tetrahedron:\u003c/p\u003e\\n\u003cp\u003e$\\\\bar x$ = [[0]]\u003c/p\u003e\\n\u003cp\u003e$\\\\bar y$ = [[1]]\u003c/p\u003e\\n\u003cp\u003e$\\\\bar z$ = [[2]]\u003c/p\u003e\", \"gaps\": [{\"type\": \"jme\", \"useCustomName\": true, \"customName\": \"Gap 0\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"answer\": \"{massCentrex}\", \"showPreview\": true, \"checkingType\": \"absdiff\", \"checkingAccuracy\": 0.001, \"failureRate\": 1, \"vsetRangePoints\": 5, \"vsetRange\": [0, 1], \"checkVariableNames\": false, \"singleLetterVariables\": false, \"allowUnknownFunctions\": true, \"implicitFunctionComposition\": false, \"caseSensitive\": false, \"valuegenerators\": []}, {\"type\": \"jme\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"answer\": \"{massCentrey}\", \"showPreview\": true, \"checkingType\": \"absdiff\", \"checkingAccuracy\": 0.001, \"failureRate\": 1, \"vsetRangePoints\": 5, \"vsetRange\": [0, 1], \"checkVariableNames\": false, \"singleLetterVariables\": false, \"allowUnknownFunctions\": true, \"implicitFunctionComposition\": false, \"caseSensitive\": false, \"valuegenerators\": []}, {\"type\": \"jme\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"answer\": \"{massCentrez}\", \"showPreview\": true, \"checkingType\": \"absdiff\", \"checkingAccuracy\": 0.001, \"failureRate\": 1, \"vsetRangePoints\": 5, \"vsetRange\": [0, 1], \"checkVariableNames\": false, \"singleLetterVariables\": false, \"allowUnknownFunctions\": true, \"implicitFunctionComposition\": false, \"caseSensitive\": false, \"valuegenerators\": []}], \"sortAnswers\": false}], \"partsMode\": \"all\", \"maxMarks\": 0, \"objectives\": [], \"penalties\": [], \"objectiveVisibility\": \"always\", \"penaltyVisibility\": \"always\", \"type\": \"question\"}, {\"name\": \"Double integral in polar coordinates - concentric circles\", \"extensions\": [\"eukleides\", \"geogebra\", \"jsxgraph\"], \"custom_part_types\": [], \"resources\": [], \"navigation\": {\"allowregen\": true, \"showfrontpage\": false, \"preventleave\": false, \"typeendtoleave\": false}, \"contributors\": [{\"name\": \"Ugur Efem\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/18261/\"}], \"tags\": [], \"metadata\": {\"description\": \"\u003cp\u003eDouble integral in polar coordinates - concentric circles\u003c/p\u003e\", \"licence\": \"Creative Commons Attribution-NonCommercial 4.0 International\"}, \"statement\": \"\u003cp\u003eCompute the integral\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\\\\[\\\\iint_R \\\\frac{y^2}{\\\\sqrt{x^2 + y^2}}\\\\, dx\\\\, dy\\\\]\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003ewhere $R$ is the region between the circles $x^2 + y^2 = \\\\var{r1}$ and $x^2 + y^2 = \\\\var{r2}$.\u0026nbsp;\u003c/p\u003e\", \"advice\": \"\u003cp\u003eRecall that ew pass to polar coordinates using $x=r\\\\cos(\\\\theta)$ and $r\\\\sin(\\\\theta)$.\u003c/p\u003e\\n\u003cp\u003ea) Plug the values above into $ \\\\frac{y^2}{\\\\sqrt{x^2 + y^2}}$ we get\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\\\\[ \\\\frac{r^2\\\\sin^2(\\\\theta)}{\\\\sqrt{r^2\\\\cos^2(\\\\theta) + r^2\\\\sin^2(\\\\theta)}} = \\\\frac{r^2\\\\sin^2(\\\\theta)}{r\\\\sqrt{\\\\cos^2(\\\\theta) + \\\\sin^2(\\\\theta)}} = r\\\\sin^2(\\\\theta).\\\\]\u003c/p\u003e\\n\u003cp\u003e\u003c/p\u003e\\n\u003cp\u003eb) The area we are interested is the area between the concentric circles below (this shape is called and annulus)\u003c/p\u003e\\n\u003cp\u003e{diagram}\u003c/p\u003e\\n\u003cp\u003eThis are can be described by the inequalities\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\\\\[0\u0026lt;\\\\theta\\\\leq 2\\\\pi \\\\quad \\\\mbox{ and }\\\\quad \\\\var{r1}\u0026lt;r\u0026lt;\\\\var{r2}\\\\]\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003ein polar coordinates.\u003c/p\u003e\\n\u003cp\u003e\u003c/p\u003e\\n\u003cp\u003ec) Note that the order the integration does not matter as boundaries for both variables are constants. The integral thus can be written as\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\\\\[\\\\int_{\\\\var{r1}}^{\\\\var{r2}}\\\\int_{0}^{2\\\\pi} r^2\\\\sin^2(\\\\theta)\\\\, d\\\\theta\\\\,dr.\\\\]\u003c/p\u003e\\n\u003cp\u003e\u003c/p\u003e\\n\u003cp\u003ed)\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\\\\[\\\\int_{\\\\var{r1}}^{\\\\var{r2}}\\\\int_{0}^{2\\\\pi} r^2\\\\sin^2(\\\\theta)\\\\, d\\\\theta\\\\,dr = \\\\int_{\\\\var{r1}}^{\\\\var{r2}}r^2 \\\\int_{0}^{2\\\\pi} \\\\sin^2(\\\\theta)\\\\, d\\\\theta\\\\,dr\u0026nbsp; = -\\\\int_{\\\\var{r1}}^{\\\\var{r2}}r^2 \\\\left[\\\\frac{\\\\sin(2\\\\theta) - 2\\\\theta}{4}\\\\right]_0^{2\\\\pi}\\\\,dr\u0026nbsp; \u003cbr/\u003e= \\\\\\\\[3mm ]\\\\int_{\\\\var{r1}}^{\\\\var{r2}}r^2 \\\\pi\\\\,dr = \\\\pi\\\\left[\\\\frac{r^3}{3}\\\\right]_{\\\\var{r1}}^{\\\\var{r2}} \u0026nbsp;= \\\\pi\\\\left(\\\\frac{\\\\var{r2}^3 - \\\\var{r1}^3}{3}\\\\right) = \\\\var{ans}.\\\\]\u003c/p\u003e\", \"rulesets\": {}, \"builtin_constants\": {\"e\": true, \"pi,\\u03c0\": true, \"i\": true}, \"constants\": [], \"variables\": {\"r1\": {\"name\": \"r1\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1 .. 3#1)\", \"description\": \"\", \"templateType\": \"randrange\", \"can_override\": false}, \"r2\": {\"name\": \"r2\", \"group\": \"Ungrouped variables\", \"definition\": \"random(r1..4 except r1)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"ans\": {\"name\": \"ans\", \"group\": \"Ungrouped variables\", \"definition\": \"(1/3)*pi*(r2^3 - r1^3)\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}, \"diagram\": {\"name\": \"diagram\", \"group\": \"Ungrouped variables\", \"definition\": \"jessiecode(400,400,\\\"\\\"\\\"\\n\\n  A = point(0,0) \u003c\u003cid: \u0027O\u0027, name: \u0027\u0027\u003e\u003e;\\n  C = circle(O,{r1}) \u003c\u003cid: \u0027C\u0027\u003e\u003e;\\n  D = circle(O,{r2}) \u003c\u003cid: \u0027D\u0027\u003e\u003e;\\n\\n\\\"\\\"\\\")\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}}, \"variablesTest\": {\"condition\": \"\", \"maxRuns\": 100}, \"ungrouped_variables\": [\"r1\", \"r2\", \"ans\", \"diagram\"], \"variable_groups\": [], \"functions\": {}, \"preamble\": {\"js\": \"\", \"css\": \"\"}, \"parts\": [{\"type\": \"jme\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"prompt\": \"\u003cp\u003eRewrite the function $ \\\\frac{y^2}{\\\\sqrt{x^2 + y^2}}$ in polar coordinates\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\u003c/p\u003e\", \"answer\": \"r*sin^2(theta)\", \"showPreview\": true, \"checkingType\": \"absdiff\", \"checkingAccuracy\": 0.001, \"failureRate\": 1, \"vsetRangePoints\": 5, \"vsetRange\": [0, 1], \"checkVariableNames\": false, \"singleLetterVariables\": false, \"allowUnknownFunctions\": true, \"implicitFunctionComposition\": false, \"caseSensitive\": false, \"valuegenerators\": [{\"name\": \"r\", \"value\": \"\"}, {\"name\": \"sin\", \"value\": \"\"}, {\"name\": \"theta\", \"value\": \"\"}]}, {\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"prompt\": \"\u003cp\u003eParametrise the region $R$ in polar coordinate\u003c/p\u003e\\n\u003cp\u003e[[0]]$\u0026lt;\\\\theta\u0026lt;$ [[1]]\u0026nbsp; and [[2]] $\u0026lt;r\u0026lt;$[[3]]\u003c/p\u003e\", \"gaps\": [{\"type\": \"numberentry\", \"useCustomName\": true, \"customName\": \"Gap0\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"minValue\": \"0\", \"maxValue\": \"0\", \"correctAnswerFraction\": false, \"allowFractions\": false, \"mustBeReduced\": false, \"mustBeReducedPC\": 0, \"displayAnswer\": \"\", \"showFractionHint\": true, \"notationStyles\": [\"plain\", \"en\", \"si-en\"], \"correctAnswerStyle\": \"plain\"}, {\"type\": \"jme\", \"useCustomName\": true, \"customName\": \"Gap1\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"answer\": \"2*pi\", \"showPreview\": true, \"checkingType\": \"absdiff\", \"checkingAccuracy\": 0.001, \"failureRate\": 1, \"vsetRangePoints\": 5, \"vsetRange\": [0, 1], \"checkVariableNames\": false, \"singleLetterVariables\": false, \"allowUnknownFunctions\": true, \"implicitFunctionComposition\": false, \"caseSensitive\": false, \"valuegenerators\": []}, {\"type\": \"jme\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"answer\": \"{r1}\", \"showPreview\": true, \"checkingType\": \"absdiff\", \"checkingAccuracy\": 0.001, \"failureRate\": 1, \"vsetRangePoints\": 5, \"vsetRange\": [0, 1], \"checkVariableNames\": false, \"singleLetterVariables\": false, \"allowUnknownFunctions\": true, \"implicitFunctionComposition\": false, \"caseSensitive\": false, \"valuegenerators\": []}, {\"type\": \"numberentry\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"minValue\": \"{r2}\", \"maxValue\": \"{r2}\", \"correctAnswerFraction\": false, \"allowFractions\": false, \"mustBeReduced\": false, \"mustBeReducedPC\": 0, \"displayAnswer\": \"\", \"showFractionHint\": true, \"notationStyles\": [\"plain\", \"en\", \"si-en\"], \"correctAnswerStyle\": \"plain\"}], \"sortAnswers\": false}, {\"type\": \"jme\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": false, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"prompt\": \"\u003cp\u003eWrite down the integral in polar coordinates\u003c/p\u003e\", \"answer\": \"defint(defint(r^2sin^2theta,theta,0,2pi),r,{r1},{r2})\", \"showPreview\": true, \"checkingType\": \"absdiff\", \"checkingAccuracy\": 0.001, \"failureRate\": 1, \"vsetRangePoints\": 5, \"vsetRange\": [0, 1], \"checkVariableNames\": false, \"singleLetterVariables\": false, \"allowUnknownFunctions\": true, \"implicitFunctionComposition\": false, \"caseSensitive\": false, \"valuegenerators\": [{\"name\": \"r\", \"value\": \"\"}, {\"name\": \"sin\", \"value\": \"\"}, {\"name\": \"theta\", \"value\": \"\"}]}, {\"type\": \"gapfill\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 0, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"prompt\": \"\u003cp\u003eEvaluate the integral you wrote in the previous part:\u003c/p\u003e\\n\u003cp\u003e[[0]]\u003c/p\u003e\", \"gaps\": [{\"type\": \"numberentry\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"minValue\": \"{ans}\", \"maxValue\": \"{ans}\", \"correctAnswerFraction\": false, \"allowFractions\": false, \"mustBeReduced\": false, \"mustBeReducedPC\": 0, \"displayAnswer\": \"\", \"precisionType\": \"dp\", \"precision\": \"2\", \"precisionPartialCredit\": \"50\", \"precisionMessage\": \"You have not given your answer to the correct precision.\", \"strictPrecision\": true, \"showPrecisionHint\": true, \"notationStyles\": [\"plain\", \"en\", \"si-en\"], \"correctAnswerStyle\": \"plain\"}], \"sortAnswers\": false}], \"partsMode\": \"all\", \"maxMarks\": 0, \"objectives\": [], \"penalties\": [], \"objectiveVisibility\": \"always\", \"penaltyVisibility\": \"always\", \"type\": \"question\"}, {\"name\": \"moment of inertia - cylinder\", \"extensions\": [], \"custom_part_types\": [], \"resources\": [], \"navigation\": {\"allowregen\": true, \"showfrontpage\": false, \"preventleave\": false, \"typeendtoleave\": false}, \"contributors\": [{\"name\": \"Ugur Efem\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/18261/\"}], \"tags\": [], \"metadata\": {\"description\": \"\u003cp\u003emoment of inertia - cylinder\u003c/p\u003e\", \"licence\": \"Creative Commons Attribution-NonCommercial 4.0 International\"}, \"statement\": \"\u003cp\u003eDetermine the moment of inertia of the cylinder $C$ of uniform density $\\\\rho = \\\\var{d}$, height $\\\\var{h}$, and radius $\\\\var{a}$ about the axis passing through the centres of its circular faces.\u003c/p\u003e\", \"advice\": \"\u003cp\u003eWe can, naturally, consider this problem in cylindricla coordinates.\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003eWe may assume that the cylinder $C$ sits in the space such that the axis rotation described in the question is the $z$-axis.\u003c/p\u003e\\n\u003cp\u003eThen $C$ can be described by\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\\\\[0\\\\leq r \\\\leq \\\\var{a} \\\\quad \\\\mbox{and } \\\\quad 0\\\\leq \\\\theta\\\\leq 2\\\\pi \\\\quad\\\\mbox{and}\\\\quad 0\\\\leq z\\\\leq h.\\\\]\u003c/p\u003e\\n\u003cp\u003e\u003c/p\u003e\\n\u003cp\u003eIn cylindrical coordinates, the mass element is $dM = \\\\rho dV = \\\\rho r\\\\,d\\\\theta\\\\,dr\\\\, dz$. Also observe that each mass element is at the distance of $r$ to the axis of rotation. Then the moment of inertia is\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\\\\[I_z = \\\\int_C r^2 \\\\, dM = \\\\int_C r^2\\\\rho\\\\, dV =\\\\iiint_C r^3\\\\rho\\\\, d\\\\theta\\\\,dr\\\\, dz =\\\\\\\\[3mm] \\\\int_0^{\\\\var{h}}\\\\int_0^{2\\\\pi}\\\\int_0^{\\\\var{a}} r^3\\\\rho\\\\, dr\\\\,d\\\\theta \\\\, dz = \\\\rho\\\\int_0^{\\\\var{h}}\\\\, dz \\\\int_0^{2\\\\pi}\\\\,d\\\\theta \\\\int_0^{\\\\var{a}} r^3\\\\, dr . \\\\]\u003c/p\u003e\\n\u003cp\u003eNote that for the last equality we used the fact that boundaries of the integrals are constants.\u003c/p\u003e\\n\u003cp\u003e\u003c/p\u003e\\n\u003cp\u003eThus we obtain\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\\\\[I_z = \\\\rho [z]_0^{\\\\var{h}} [\\\\theta]_0^{2\\\\pi}\\\\left[ \\\\frac{r^4}{4}\\\\right]_0^{\\\\var{a}} = \\\\frac{1}{2}\\\\pi\\\\rho\\\\times\\\\var{h}\\\\times{a^4} = \\\\simplify{1/2*pi*{d}*{h}*{a}^4}.\\\\]\u003c/p\u003e\\n\u003cp\u003eAlso note that $I_z = \\\\frac{1}{2}M\\\\var{a}^2$ where $M = \\\\rho V$, with $V=\\\\pi\\\\times\\\\var{a}^2\\\\times\\\\var{h}$.\u0026nbsp;\u003c/p\u003e\", \"rulesets\": {}, \"builtin_constants\": {\"e\": true, \"pi,\\u03c0\": true, \"i\": true}, \"constants\": [], \"variables\": {\"d\": {\"name\": \"d\", \"group\": \"Ungrouped variables\", \"definition\": \"random(2 .. 5#1)\", \"description\": \"\", \"templateType\": \"randrange\", \"can_override\": false}, \"a\": {\"name\": \"a\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1 .. 3#1)\", \"description\": \"\", \"templateType\": \"randrange\", \"can_override\": false}, \"h\": {\"name\": \"h\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1 .. 5#0.25)\", \"description\": \"\", \"templateType\": \"randrange\", \"can_override\": false}, \"V\": {\"name\": \"V\", \"group\": \"Ungrouped variables\", \"definition\": \"pi*(a^2)*h\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}}, \"variablesTest\": {\"condition\": \"\", \"maxRuns\": 100}, \"ungrouped_variables\": [\"d\", \"a\", \"h\", \"V\"], \"variable_groups\": [], \"functions\": {}, \"preamble\": {\"js\": \"\", \"css\": \"\"}, \"parts\": [{\"type\": \"numberentry\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"minValue\": \"1/2*{d}*{V}*{a^2}\", \"maxValue\": \"1/2*{d}*{V}*{a^2}\", \"correctAnswerFraction\": false, \"allowFractions\": false, \"mustBeReduced\": false, \"mustBeReducedPC\": 0, \"displayAnswer\": \"\", \"precisionType\": \"dp\", \"precision\": \"3\", \"precisionPartialCredit\": 0, \"precisionMessage\": \"You have not given your answer to the correct precision.\", \"strictPrecision\": true, \"showPrecisionHint\": true, \"notationStyles\": [\"plain\", \"en\", \"si-en\"], \"correctAnswerStyle\": \"plain\"}], \"partsMode\": \"all\", \"maxMarks\": 0, \"objectives\": [], \"penalties\": [], \"objectiveVisibility\": \"always\", \"penaltyVisibility\": \"always\", \"type\": \"question\"}, {\"name\": \" moment of inertia - cylinder-non-uniform\", \"extensions\": [], \"custom_part_types\": [], \"resources\": [], \"navigation\": {\"allowregen\": true, \"showfrontpage\": false, \"preventleave\": false, \"typeendtoleave\": false}, \"contributors\": [{\"name\": \"Ugur Efem\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/18261/\"}], \"tags\": [], \"metadata\": {\"description\": \"\u003cp\u003emoment of inertia - cylinder\u003c/p\u003e\", \"licence\": \"Creative Commons Attribution-NonCommercial 4.0 International\"}, \"statement\": \"\u003cp\u003eDetermine the moment of inertia of the cylinder $C$ of density varies as $\\\\rho = \\\\var{d}xy$, height $\\\\var{h}$, and radius $\\\\var{a}$ about the axis passing through the centres of its circular faces.\u003c/p\u003e\", \"advice\": \"\u003cp\u003eWe can, naturally, consider this problem in cylindricla coordinates.\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003eWe may assume that the cylinder $C$ sits in the space such that the axis rotation described in the question is the $z$-axis.\u003c/p\u003e\\n\u003cp\u003eThen $C$ can be described by\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\\\\[0\\\\leq r \\\\leq \\\\var{a} \\\\quad \\\\mbox{and } \\\\quad 0\\\\leq \\\\theta\\\\leq 2\\\\pi \\\\quad\\\\mbox{and}\\\\quad 0\\\\leq z\\\\leq h.\\\\]\u003c/p\u003e\\n\u003cp\u003eWe also have to turn $\\\\rho(x,y)$ into polar coordinates.\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\\\\[\\\\rho(x,y) = \\\\var{d}(r\\\\cos\\\\theta)(r\\\\sin\\\\theta) = \\\\var{d}\\\\cdot r^2\\\\cos\\\\theta\\\\sin\\\\theta.\\\\]\u003c/p\u003e\\n\u003cp\u003eThen, in cylindrical coordinates, the mass element becomes $dM = \\\\rho dV = r^2\\\\cos\\\\theta\\\\sin\\\\theta \\\\,r\\\\,d\\\\theta\\\\,dr\\\\, dz$. Also, observe that each mass element is at the distance of $r$ to the axis of rotation. Then the moment of inertia is\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\\\\[I_z = \\\\int_C r^2 \\\\, dM = \\\\int_C r^2\\\\rho\\\\, dV =\\\\iiint_C \\\\var{d}\\\\cdot r^5 \\\\cos\\\\theta\\\\sin\\\\theta\\\\, d\\\\theta\\\\,dr\\\\, dz =\\\\\\\\[3mm] \\\\var{d}\\\\int_0^{\\\\var{h}}\\\\int_0^{2\\\\pi}\\\\int_0^{\\\\var{a}} r^5\\\\cos\\\\theta\\\\sin\\\\theta\\\\, dr\\\\,d\\\\theta \\\\, dz = \\\\var{d}\\\\int_0^{\\\\var{h}}\\\\, dz \\\\int_0^{2\\\\pi} \\\\cos\\\\theta\\\\sin\\\\theta\\\\,d\\\\theta \\\\int_0^{\\\\var{a}} r^5\\\\, dr . \\\\]\u003c/p\u003e\\n\u003cp\u003eNote that for the last equality we used the fact that boundaries of the integrals are constants.\u003c/p\u003e\\n\u003cp\u003eWe can compute the integrals separately as follows:\u003c/p\u003e\\n\u003cul\u003e\\n\u003cli\u003e\\\\[\\\\int_0^{\\\\var{h}}\\\\, dz = [z]_0^{\\\\var{h}} = \\\\var{h}\\\\]\u003c/li\u003e\\n\u003cli\u003e\\\\[\\\\int_0^{2\\\\pi} \\\\cos\\\\theta\\\\sin\\\\theta\\\\,d\\\\theta =\u0026nbsp; \\\\left[-\\\\frac{\\\\cos^2\\\\theta}{2}\\\\right]_0^{2\\\\pi} = \\\\frac{1-\\\\cos^2(2\\\\pi)}{2} =0.\\\\]\u003c/li\u003e\\n\u003cli\u003e\\\\[\\\\int_0^{\\\\var{a}} r^5\\\\, dr = \\\\left[\\\\frac{r^6}{6}\\\\right]_0^{\\\\var{a}} = \\\\frac{\\\\var{a^6}}{6}.\\\\]\u003c/li\u003e\\n\u003c/ul\u003e\\n\u003cp\u003e\u003c/p\u003e\\n\u003cp\u003eThus we obtain\u0026nbsp;\u003c/p\u003e\\n\u003cp\u003e\\\\[I_z = \\\\var{d}\\\\times\\\\var{h}\\\\times 0\\\\times \\\\frac{\\\\var{a^6}}{6} = 0.\\\\]\u003c/p\u003e\\n\u003cp\u003e\u003c/p\u003e\", \"rulesets\": {}, \"builtin_constants\": {\"e\": true, \"pi,\\u03c0\": true, \"i\": true}, \"constants\": [], \"variables\": {\"d\": {\"name\": \"d\", \"group\": \"Ungrouped variables\", \"definition\": \"random(2 .. 5#1)\", \"description\": \"\", \"templateType\": \"randrange\", \"can_override\": false}, \"a\": {\"name\": \"a\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1 .. 3#1)\", \"description\": \"\", \"templateType\": \"randrange\", \"can_override\": false}, \"h\": {\"name\": \"h\", \"group\": \"Ungrouped variables\", \"definition\": \"random(1 .. 5#0.25)\", \"description\": \"\", \"templateType\": \"randrange\", \"can_override\": false}, \"V\": {\"name\": \"V\", \"group\": \"Ungrouped variables\", \"definition\": \"pi*(a^2)*h\", \"description\": \"\", \"templateType\": \"anything\", \"can_override\": false}}, \"variablesTest\": {\"condition\": \"\", \"maxRuns\": 100}, \"ungrouped_variables\": [\"d\", \"a\", \"h\", \"V\"], \"variable_groups\": [], \"functions\": {}, \"preamble\": {\"js\": \"\", \"css\": \"\"}, \"parts\": [{\"type\": \"numberentry\", \"useCustomName\": false, \"customName\": \"\", \"marks\": 1, \"scripts\": {}, \"customMarkingAlgorithm\": \"\", \"extendBaseMarkingAlgorithm\": true, \"unitTests\": [], \"showCorrectAnswer\": true, \"showFeedbackIcon\": true, \"variableReplacements\": [], \"variableReplacementStrategy\": \"originalfirst\", \"nextParts\": [], \"suggestGoingBack\": false, \"adaptiveMarkingPenalty\": 0, \"exploreObjective\": null, \"minValue\": \"0\", \"maxValue\": \"0\", \"correctAnswerFraction\": false, \"allowFractions\": false, \"mustBeReduced\": false, \"mustBeReducedPC\": 0, \"displayAnswer\": \"\", \"precisionType\": \"dp\", \"precision\": \"3\", \"precisionPartialCredit\": 0, \"precisionMessage\": \"You have not given your answer to the correct precision.\", \"strictPrecision\": true, \"showPrecisionHint\": true, \"notationStyles\": [\"plain\", \"en\", \"si-en\"], \"correctAnswerStyle\": \"plain\"}], \"partsMode\": \"all\", \"maxMarks\": 0, \"objectives\": [], \"penalties\": [], \"objectiveVisibility\": \"always\", \"penaltyVisibility\": \"always\", \"type\": \"question\"}]}], \"allowPrinting\": true, \"navigation\": {\"allowregen\": true, \"reverse\": true, \"browse\": true, \"allowsteps\": true, \"showfrontpage\": true, \"showresultspage\": \"oncompletion\", \"navigatemode\": \"sequence\", \"onleave\": {\"action\": \"none\", \"message\": \"\"}, \"preventleave\": true, \"typeendtoleave\": false, \"startpassword\": \"\", \"allowAttemptDownload\": false, \"downloadEncryptionKey\": \"\"}, \"timing\": {\"allowPause\": true, \"timeout\": {\"action\": \"none\", \"message\": \"\"}, \"timedwarning\": {\"action\": \"none\", \"message\": \"\"}}, \"feedback\": {\"showactualmark\": true, \"showtotalmark\": true, \"showanswerstate\": true, \"allowrevealanswer\": true, \"advicethreshold\": 0, \"intro\": \"\", \"end_message\": \"\", \"reviewshowscore\": true, \"reviewshowfeedback\": true, \"reviewshowexpectedanswer\": true, \"reviewshowadvice\": true, \"results_options\": {\"printquestions\": true, \"printadvice\": true}, \"feedbackmessages\": [], \"enterreviewmodeimmediately\": true, \"showexpectedanswerswhen\": \"inreview\", \"showpartfeedbackmessageswhen\": \"always\", \"showactualmarkwhen\": \"always\", \"showtotalmarkwhen\": \"always\", \"showanswerstatewhen\": \"always\", \"showadvicewhen\": \"inreview\"}, \"diagnostic\": {\"knowledge_graph\": {\"topics\": [], \"learning_objectives\": []}, \"script\": \"diagnosys\", \"customScript\": \"\"}, \"type\": \"exam\", \"contributors\": [{\"name\": \"Ugur Efem\", \"profile_url\": \"https://numbas.mathcentre.ac.uk/accounts/profile/18261/\"}], \"extensions\": [\"eukleides\", \"geogebra\", \"jsxgraph\"], \"custom_part_types\": [], \"resources\": []}",
            extension_data: "{\"eukleides\": {\"root\": \"extensions/eukleides\", \"stylesheets\": [], \"javascripts\": [\"eukleides.js\"]}, \"geogebra\": {\"root\": \"extensions/geogebra\", \"stylesheets\": [], \"javascripts\": [\"geogebra.js\"]}, \"jsxgraph\": {\"root\": \"extensions/jsxgraph\", \"stylesheets\": [\"jsxgraph.css\"], \"javascripts\": [\"jsxgraph.js\"]}}"
        }
    }
</script>



	</head>
	
    <body>
        <template id="numbas-exam-template">
    
    <style id="numbas-style">@import 'numbas.css?build_time=1764969658.787597';</style>
    
    <exam-container class="numbas-container" data-bind="with: exam, css: css, attr: attr">
        <div id="loading">
    <img class="logo center-block" src="resources/numbas-logo.svg" alt="Numbas"/>
    <progress min="0" max="100" value="0"></progress>
    <span class="loading-text" data-localise="page.loading">Loading...</span>
</div>
        <!-- modal dialog boxes -->
<dialog id="saving" data-bind="modal: saving">
    <div class="text" data-localise="page.saving"></div>
</dialog>
<dialog class="modal" id="alert-modal" aria-labelledby="alert-modal-title" aria-describedby="alert-modal-body" data-bind="modal: {submit: $root.modal.ok}">
    <section>
        <header>
            <h2 id="alert-modal-title" data-localise="modal.alert"></h2>
        </header>

        <div class="modal-body" id="alert-modal-body"></div>

        <footer>
            <form method="dialog">
                <button value="ok" autofocus class="ok btn primary" data-localise="modal.ok"></button>
            </form>
        </footer>
    </section>
</dialog>

<dialog class="modal" id="confirm-modal" aria-labelledby="confirm-modal-title" aria-describedby="confirm-modal-body" data-bind="modal: {submit: $root.modal.ok, cancel: $root.modal.cancel}">
    <section>
        <header>
            <h2 id="confirm-modal-title" data-localise="modal.confirm"></h2>
        </header>
        <div class="modal-body" id="confirm-modal-body">
        </div>
        <footer>
            <form method="dialog">
                <button autofocus class="cancel btn" value="cancel" data-localise="modal.cancel"></button>
                <button value="ok" class="ok btn primary" data-localise="modal.ok"></button>
            </form>
        </footer>
    </section>
</dialog>
<dialog class="modal" id="confirm-end-exam-modal" aria-labelledby="confirm-end-exam-modal-title" aria-describedby="confirm-end-exam-modal-body" data-bind="modal: {submit: $root.modal.ok, cancel: $root.modal.cancel}">
    <form method="dialog">
        <header>
            <h4 id="confirm-end-exam-modal-title" data-localise="modal.confirm"></h4>
        </header>
        <div class="modal-body" id="confirm-end-exam-modal-body" data-bind="with: $root.exam">
            <p id="confirm-end-exam-modal-message"></p>
            <form class="form-inline" data-bind="submit: $root.modal.ok">
                <label for="confirm-end-text-input" id="confirm-end-exam-modal-input-message"></label>
                <input autofocus id="confirm-end-text-input" type="text" data-bind="textInput: confirmEndHandler.value, autosize: confirmEndHandler.value">
                <span class="password-feedback feedback-icon" data-bind="css: confirmEndHandler.feedback().iconClass, attr: {title: confirmEndHandler.feedback().title}"></span>
            </form>
        </div>
        <footer>
            <button value="cancel" class="cancel btn" data-localise="modal.cancel"></button>
            <button value="ok" class="ok btn primary" data-bind="disable: !confirmEndHandler.valid(), css: confirmEndHandler.feedback().buttonClass" data-localise="modal.end exam button"></button>
        </footer>
    </form>
</dialog>
<dialog class="modal force-default-style" id="style-modal" aria-labelledby="style-modal-title" aria-describedby="style-modal-explanation" data-bind="with: $root.style_customiser, modal: {submit: $root.saveStyle}">
    <form method="dialog">
        <header>
            <h4 id="style-modal-title" data-localise="control.style options"></h4>
        </header>

        
        <p class="help-block" id="style-modal-explanation" data-localise="modal.style.explanation"></p>

        <p class="help-block warning" data-bind="visible: forced_colors" data-localise="modal.forced colours warning"></p>

        
        <section class="style-controls">
            <fieldset>
                <label for="main-font-picker" data-localise="modal.style.main font"></label>
                <select id="main-font-picker" data-bind="value: staged_style['--main-font'], options: font_options, optionsText: 'label', optionsValue: 'name'">
                </select>
            </fieldset>
            <fieldset>
                <label for="text-size-picker" data-localise="modal.style.text size"></label>
                <input id="text-size-picker" type="number" step="0.1" min="0.5" max="4" data-bind="value: staged_style['--text-size']">
                <output id="text-size-preview" class="big" data-localise="modal.style.text preview"></output>
            </fieldset>
            <fieldset>
                <label for="font-weight-picker" data-localise="modal.style.font weight"></label>
                <input id="font-weight-picker" type="range" step="100" min="200" max="800" data-bind="value: staged_style['--font-weight'], valueUpdate: 'input'">
                <output id="font-weight-preview" data-bind="text: staged_style['--font-weight']"></output>
            </fieldset>
            <fieldset>
                <label for="spacing-picker" data-localise="modal.style.spacing"></label>
                <input id="spacing-picker" type="range" step="0.1" min="0.1" max="3" data-bind="value: staged_style['--spacing-scale'], valueUpdate: 'input'">
                <output id="spacing-preview" data-bind="percentage: parseFloat(staged_style['--spacing-scale']())"></output>
            </fieldset>
            <fieldset>
                <label for="color-scheme-picker" data-localise="modal.style.colour scheme"></label>
                <select id="color-scheme-picker" data-bind="value: color_scheme">
                    <option value="automatic" data-localise="modal.style.automatic colour scheme"></option>
                    <option value="light" data-localise="modal.style.light colour scheme"></option>
                    <option value="dark" data-localise="modal.style.dark colour scheme"></option>
                    <option value="custom" data-localise="modal.style.custom colour scheme"></option>
                </select>
            </fieldset>
            <fieldset>
                <label for="invert-images" data-localise="modal.style.invert images in dark mode"></label>
                <input id="invert-images" type="checkbox" data-bind="checked: invert_images">
            </fieldset>
        </section>

        <section class="style-controls" data-bind="visible: using_custom_color_scheme">
            <fieldset>
                <label for="background-colour-picker" data-localise="modal.style.background colour"></label>
                <input id="background-colour-picker" type="color" data-bind="value: style['--custom-background-color']">
            </fieldset>
            <fieldset>
                <label for="text-colour-picker" data-localise="modal.style.text colour"></label>
                <input id="text-colour-picker" type="color" data-bind="value: style['--custom-text-color']">
            </fieldset>
            <fieldset>
                <label for="main-colour-picker" data-localise="modal.style.main colour"></label>
                <input id="main-colour-picker" type="color" data-bind="value: style['--custom-main-color']">
            </fieldset>
            <fieldset>
                <label for="primary-colour-picker" data-localise="modal.style.primary colour"></label>
                <input id="primary-colour-picker" type="color" data-bind="value: style['--custom-primary-color']">
            </fieldset>
            <fieldset>
                <label for="link-colour-picker" data-localise="modal.style.link colour"></label>
                <input id="link-colour-picker" type="color" data-bind="value: style['--custom-link-color']">
            </fieldset>
            <fieldset>
                <label for="success-colour-picker" data-localise="modal.style.success colour"></label>
                <input id="success-colour-picker" type="color" data-bind="value: style['--custom-success-color']">
            </fieldset>
            <fieldset>
                <label for="info-colour-picker" data-localise="modal.style.info colour"></label>
                <input id="info-colour-picker" type="color" data-bind="value: style['--custom-info-color']">
            </fieldset>
            <fieldset>
                <label for="warning-colour-picker" data-localise="modal.style.warning colour"></label>
                <input id="warning-colour-picker" type="color" data-bind="value: style['--custom-warning-color']">
            </fieldset>
            <fieldset>
                <label for="danger-colour-picker" data-localise="modal.style.danger colour"></label>
                <input id="danger-colour-picker" type="color" data-bind="value: style['--custom-danger-color']">
            </fieldset>
            <fieldset>
                <label for="muted-colour-picker" data-localise="modal.style.muted colour"></label>
                <input id="muted-colour-picker" type="color" data-bind="value: style['--custom-muted-color']">
            </fieldset>
            <fieldset>
                <label for="highlight-colour-picker" data-localise="modal.style.highlight colour"></label>
                <input id="highlight-colour-picker" type="color" data-bind="value: style['--custom-highlight-color']">
            </fieldset>
        </section>

        

        

        
        <hr/>
        <p class="help-block"><a href="https://docs.numbas.org.uk/en/latest/accessibility/exam.html" target="_blank" data-localise="accessibility statement"></a></p>
        

        <footer>
            <button type="button" class="btn danger sm" data-localise="modal.style.reset to defaults" data-bind="click: reset"></button>
            <button class="cancel btn" value="cancel" autofocus data-localise="modal.cancel"></button>
            <button value="ok" class="ok btn primary" data-localise="modal.ok"></button>
        </footer>
    </form>
</dialog>
<dialog class="modal" id="next-actions-modal" aria-labelledby="next-actions-modal-title">
    <form method="dialog" data-bind="with: diagnostic_next_actions">
        <header>
            <h4 id="next-actions-modal-title" data-localise="diagnostic.make a choice"></h4>
        </header>
        <div data-bind="latex: feedback"></div>

        <menu data-bind="foreach: actions" class="list-unstyled actions">
            <li>
                <button type="button" data-bind="click: go"><span data-bind="latex: label"></span></button>
            </li>
        </menu>
    </form>
</dialog>

<dialog id="lightbox"></dialog>
        <div id="everything">
            <a class="sr-only" id="skip-link" data-bind="attr: {href: infoPage() ? '#infoDisplay' : '#questionContainer'}" data-localise="page.skip to content"></a>
            <!-- ko if: exam.settings.navigateMode=='sequence' -->
    <!-- side menu, slides out on narrow screens -->
<nav id="sideNav">

    <header>
        <img class="logo center-block" src="resources/numbas-logo.svg" alt="Numbas"/>

        <h1 class="exam-name" data-bind="text: exam.settings.name, typeset: exam.settings.name"></h1>

        <button type="button" class="navbar-toggle btn" aria-controls="navMenu">
            <svg viewBox="0 0 9 9">
    <title data-localise="control.toggle navigation menu"></title>
    <line x1="1" y1="1" x2="8" y2="8" stroke="currentColor"/>
    <line x1="1" y1="8" x2="8" y2="1" stroke="currentColor"/>
</svg>
        </button>
    </header>

    <!-- ko if: numQuestions() > 1 -->
    <label class="sr-only" for="exam-progress" data-localise="exam.progress"></label>
    <progress id="exam-progress" data-bind="attr: {max: numQuestions(), value: questionsAttempted(), title: questionsAttemptedDisplay}, text: questionsAttemptedDisplay"></progress>
    <!-- /ko -->

    <menu id="questionList" class="nav navmenu-nav" role="tablist" aria-orientation="vertical" data-bind="tablist: true">
        <li class="introduction" data-bind="visible: exam.hasIntro, css: {active: $root.exam().infoPage()=='introduction'}">
            <a href="#" role="tab" data-bind="click: () => showInfoPage('introduction'), attr: {'aria-current': $root.exam().infoPage()=='introduction' ? 'step' : false, tabindex: $root.exam().infoPage()=='introduction' ? 0 : -1, 'data-name': R('control.show introduction')}" data-localise="control.show introduction"></a>
       </li>
        <!-- ko foreach: question_groups -->
            <!-- ko if: $root.exam().showQuestionGroupNames -->
            <li class="question-group-header" data-bind="visible: show_name">
                <h2 data-bind="text: name, typeset: name"></h2>
                <span class="score" data-bind="html: feedback.message"></span>
            </li>
            <!-- /ko -->
            <!-- ko foreach: questions -->
            <li class="questionSelector" data-bind="visible: visible, css: {active: $root.exam().currentQuestion()==$data}">
                <a href="#" role="tab" data-bind="click: Numbas.controls.makeQuestionJumper(question.number, question.exam), attr: {'aria-current': isCurrentQuestion() ? 'step' : false, tabindex: isCurrentQuestion() ? 0 : -1, 'data-number': question.number+1, 'data-name': displayName}">
                    <div class="question-info">
                        <span class="feedback-icon" data-bind="css: scoreFeedback.iconClass, attr: scoreFeedback.iconAttr" aria-hidden="true"></span>
                        <span class="name" data-bind="text: displayName"></span>
                        <span class="sr-only" data-bind="text: scoreFeedback.iconAttr().title"></span>
                        <span class="score" data-bind="html: scoreFeedback.message"></span>
                    </div>
                    <div class="messages">
                        <div class="answered-state" data-bind="">
                            <span data-bind="text: scoreFeedback.answeredString"></span>
                        </div>
                        <div data-bind="visible: isDirty" class="dirty-message">
                            <span class="warning-icon icon-exclamation-sign"></span>
                            <span data-localise="question.selector.unsubmitted changes"></span>
                        </div>
                    </div>
                </a>
            </li>
            <!-- /ko -->
        <!-- /ko -->
        <!-- total exam score display -->
        <li class="examScore" data-bind="visible: showActualMark">
            <span data-localise="control.total"></span> 
            <span id="examScore" data-bind="html: examScoreDisplay"></span>
        </li>
    </menu>

    <div class="stopWatch" data-bind="visible: showTime">
    <span class="" data-localise="timing.time remaining"></span>
    <time class="time" data-bind="duration: timeRemaining"></time>
</div>

    <menu class="nav navmenu-nav menuButtons">
        <li><button class="btn center-block thin-button display-options force-original-color" type="button" data-bind="click: $root.showStyleModal" data-localise="control.style options"></button></li>
        <li data-bind="visible: allowPause && mode()=='normal'"><button class="btn center-block thin-button" id="pauseBtn" data-localise="control.pause" data-bind="click: pause"></button></li>
        <li data-bind="visible: mode()=='normal'"><button class="btn danger center-block" id="endBtn" data-localise="control.end exam" data-bind="click: endExam"></button></li>
        <li data-bind="visible: mode()=='review'"><button class="btn center-block" data-localise="control.back to results" data-bind="click: () => showInfoPage('result')"></button></li>
    </menu>

</nav>

<!-- top menu shown on narrow screens -->
<nav id="topNav" class="navbar">
    <!-- ko if: numQuestions() > 1 -->
    <div class="prev"><button type="button" class="btn" data-bind="click: reverse, attr: {disabled: !canReverse()}"><span class="sr-only" data-localise="control.previous"></span>&larr;</button></div>
    <div class="next"><button type="button" class="btn" data-bind="click: advance, attr: {disabled: !canAdvance()}"><span class="sr-only" data-localise="control.next"></span>&rarr;</span></button></div>
    <!-- /ko -->
    <div class="end"><button class="btn danger" data-localise="control.end exam" data-bind="click: endExam, visible: mode()=='normal' && !canAdvance()"></button></div>
    <div class="titleBits" data-bind="with: currentQuestion">
        <span class="review-header" data-bind="visible: $root.exam().mode()=='review'" data-localise="exam.review header"></span>
        <span id="questionNameDisplay" data-bind="text: displayName"></span>
    </div>

    <div class="stopWatch" data-bind="visible: showTime">
    <span class="" data-localise="timing.time remaining"></span>
    <time class="time" data-bind="duration: timeRemaining"></time>
</div>

    <button type="button" class="navbar-toggle btn" aria-controls="navMenu">
        <svg viewBox="0 0 9 9">
    <title data-localise="control.toggle navigation menu"></title>
    <rect x="0" y="0" width="9" height="1" fill="currentColor"/>
    <rect x="0" y="4" width="9" height="1" fill="currentColor"/>
    <rect x="0" y="8" width="9" height="1" fill="currentColor"/>
</svg>
    </button>
</nav>
<!-- /ko -->

<!-- ko if: exam.settings.navigateMode=='menu' -->
    <nav id="topNav" class="navbar">
    <button type="button" class="btn primary" data-bind="visible: mode()=='normal', click: showMenu">&larr; <span data-localise="control.back to menu"></span></button>
    <button type="button" class="btn primary" data-bind="visible: mode()=='review', click: () => showInfoPage('result')">&larr; <span data-localise="control.back to results"></span></button>
    <div class="titleBits" data-bind="with: currentQuestion">
        <span class="review-header" data-bind="visible: $root.exam().mode()=='review'" data-localise="exam.review header"></span>
        <span id="questionNameDisplay" data-bind="latex: displayName"></span>
    </div>
    <button class="btn thin-button display-options force-original-color" type="button" data-bind="click: $root.showStyleModal" data-localise="control.style options"></button>
</nav>
<!-- /ko -->

<!-- ko if: exam.settings.navigateMode=='diagnostic' -->
    <!-- side menu, slides out on narrow screens -->
<nav id="sideNav">

    <header>
        <div class="navmenu-brand">
            <img class="logo center-block" src="resources/numbas-logo.svg" alt="Numbas"/>
        </div>
        <h1 class="exam-name navmenu-brand" data-bind="text: exam.settings.name, typeset: exam.settings.name"></h1>
        <button type="button" class="navbar-toggle btn" aria-controls="navMenu">
            <svg viewBox="0 0 9 9">
    <title data-localise="control.toggle navigation menu"></title>
    <line x1="1" y1="1" x2="8" y2="8" stroke="currentColor"/>
    <line x1="1" y1="8" x2="8" y2="1" stroke="currentColor"/>
</svg>
        </button>
    </header>

    <dl id="learning-objective-list" class="nav navemnu-nav">
        <!-- ko foreach: diagnostic_progress -->
        <dt class="name" data-bind="latex: name"></dt>
        <dd data-bind="text: Math.floor(100*progress)+'%'"></dd>
        <!-- /ko -->
    </dl>


    <div class="stopWatch" data-bind="visible: showTime">
    <span class="" data-localise="timing.time remaining"></span>
    <time class="time" data-bind="duration: timeRemaining"></time>
</div>

    <menu class="nav navmenu-nav menuButtons">
        <li><button class="btn center-block thin-button display-options force-original-color" type="button" data-bind="click: $root.showStyleModal" data-localise="control.style options"></button></li>
        <li data-bind="visible: allowPause && mode()=='normal'"><button class="btn center-block thin-button" id="pauseBtn" data-localise="control.pause" data-bind="click: pause"></button></li>
        <li data-bind="visible: mode()=='normal'"><button class="btn danger center-block" id="endBtn" data-localise="control.end exam" data-bind="click: endExam"></button></li>
        <li data-bind="visible: mode()=='review'"><button class="btn center-block" data-localise="control.back to results" data-bind="click: () => showInfoPage('result')"></button></li>
    </menu>

</nav>

<!-- top menu shown on narrow screens -->
<nav id="topNav" class="navbar">
    <div class="nav">
        <div class="titleBits" data-bind="with: currentQuestion">
            <span class="review-header" data-bind="visible: $root.exam().mode()=='review'" data-localise="exam.review header"></span>
            <span id="questionNameDisplay" data-bind="text: displayName"></span>
        </div>

        <div class="stopWatch" data-bind="visible: showTime">
    <span class="" data-localise="timing.time remaining"></span>
    <time class="time" data-bind="duration: timeRemaining"></time>
</div>
    </div>

    <button type="button" class="navbar-toggle btn" aria-controls="navMenu">
        <svg viewBox="0 0 9 9">
    <title data-localise="control.toggle navigation menu"></title>
    <rect x="0" y="0" width="9" height="1" fill="currentColor"/>
    <rect x="0" y="4" width="9" height="1" fill="currentColor"/>
    <rect x="0" y="8" width="9" height="1" fill="currentColor"/>
</svg>
    </button>
</nav>
<!-- /ko -->

            <!-- main content area - info pages or questions go in here -->
            <main class="mainDisplay" role="main" data-bind="attr: {'aria-labelledby': main_labelledby}">
                <div id="infoDisplay" class="main-content" data-bind="visible: infoPage">
    <div id="frontpage" data-bind="visible: infoPage()=='frontpage', if: infoPage()=='frontpage'">
        <h1 class="break-words" id="infopage-frontpage-header" data-bind="html: exam.settings.name"></h1>
<table class="summary">
    <tbody>
    <!-- ko if: exam.settings.navigateMode != 'diagnostic' -->
    <tr>
        <th data-localise="exam.number of questions"></th>
        <td class="rtd" data-bind="html: numAssessedQuestions"></td>
    </tr>
    <tr data-bind="visible: exam.settings.showTotalMark">
        <th data-localise="exam.marks available"></th>
        <td class="rtd" data-bind="niceNumber: marks"></td>
    </tr>
    <!-- /ko -->
    <tr data-bind="visible: exam.settings.percentPass>0">
        <th data-localise="exam.pass percentage"></th>
        <td class="rtd" data-bind="text: percentPass"></td>
    </tr>
    <tr data-bind="visible: duration()>0">
        <th data-localise="exam.time allowed"></th>
        <td class="rtd"><time data-bind="duration: duration"></time></td>
    </tr>
    <tr data-bind="visible: exam.settings.showStudentName && exam.student_name && !needsStudentName">
        <th data-localise="exam.student name"></th>
        <td><span data-bind="text: exam.student_name"></span><span data-bind="visible: exam.student_id"> (<span data-bind="text: exam.student_id"></span>)</span></td>
    </tr>
    </tbody>
</table>

<div id="intro" data-bind="visible: exam.hasIntro, latex: exam.introMessage" localise-data-jme-context-description="exam.introduction"></div>

<div class="alert danger" data-bind="visible: showAttemptDownloadSecurityWarning">
    <p data-localise="exam.attempt download security warning"></p>
</div>
<div id="standalone-warning" class="alert info" data-bind="visible: !Numbas.storage.lmsConnected && !allowAttemptDownload" data-localise="frontpage.scorm.lms not connected"></div>

<form data-bind="submit: beginExam" class="info-buttons">
    <button class="btn display-options force-original-color" type="button" data-bind="click: $root.showStyleModal" data-localise="control.style options"></button>
    <div class="student-name" data-bind="visible: needsStudentName">
        <label for="begin-exam-student-name" data-localise="exam.enter your name"></label>
        <input id="begin-exam-student-name" name="begin-exam-student-name" type="text" data-bind="textInput: student_name, autosize: student_name"/>
    </div>
    <div class="password" data-bind="visible: needsPassword">
        <label for="begin-exam-password" data-localise="exam.enter password"></label>
        <input id="begin-exam-password" autocomplete="off" name="begin-exam-password" type="text" data-bind="textInput: passwordHandler.value, autosize: passwordHandler.value, css: {'has-errors': passwordHandler.value().length && !passwordHandler.valid(), 'success': passwordHandler.valid()}"/>
        <span class="password-feedback feedback-icon" data-bind="css: passwordHandler.feedback().iconClass, attr: {title: passwordHandler.feedback().title}"></span>
    </div>
    <button class="btn" id="startBtn" type="submit" data-bind="disable: !canBegin(), css: passwordHandler.feedback().buttonClass" data-localise="frontpage.start"></button>
</form>
    </div>
    <div id="menu" data-bind="visible: infoPage()=='menu', if: infoPage()=='menu'">
        <h1 id="infopage-menu-header" class="break-words" data-bind="html: exam.settings.name"></h1>

<div class="intro" class="alert" data-bind="visible: exam.hasIntro, latex: exam.introMessage" localise-data-jme-context-description="exam.introduction"></div>

<nav id="question-chooser">
    <table class="table questionSelector">
        <colgroup>
            <col class="question">
            <col class="score">
            <col class="icon">
        </colgroup>
        <tbody>
        <!-- ko foreach: question_groups -->
            <!-- ko if: $parent.showQuestionGroupNames -->
            <tr>
                <th data-bind="visible: $parent.question_groups.length>1">
                    <span data-bind="latex: name"></span>
                </th>
                <th class="messages">
                    <span class="score" data-bind="html: feedback.plainMessage"></span>
                </th>
                <th class="icon">
                    <span class="feedback-icon" data-bind="css: feedback.iconClass, attr: feedback.iconAttr" aria-hidden="true"></span>
                </th>
            </tr>
            <!-- /ko -->
            <!-- ko foreach: questions -->
            <tr class="" role="button" data-bind="click: Numbas.controls.makeQuestionJumper(question.number, question.exam), attr: {'aria-labelledby': question.path+'-menu-name'}">
                <td class="info">
                    <button class="btn link" type="button" class="name" data-bind="latex: displayName, attr: {id: question.path+'-menu-name'}"></button>
                </td>
                <td class="messages">
                    <span class="sr-only" data-bind="text: scoreFeedback.iconAttr().title"></span>
                    <span class="score" data-bind="html: scoreFeedback.plainMessage"></span>
                    <div class="answered-state" data-bind="">
                        <span data-bind="text: scoreFeedback.attemptedString"></span>
                    </div>
                    <div data-bind="visible: isDirty" class="dirty-message">
                        <span class="warning-icon icon-exclamation-sign"></span>
                        <span data-localise="question.selector.unsubmitted changes"></span>
                    </div>
                </td>
                <td class="icon">
                    <span class="feedback-icon" data-bind="css: scoreFeedback.iconClass, attr: scoreFeedback.iconAttr" aria-hidden="true"></span>
                </td>
            </tr>
            <!-- /ko -->
        <!-- /ko -->
        </tbody>
    </table>
</nav>

<menu class="nav navmenu-nav menuButtons">
    <li><button class="btn thin-button" type="button" data-bind="click: $root.showStyleModal" data-localise="control.style options"></button></li>
    <li><button class="btn danger thin-button" id="endBtn" data-localise="control.end exam" data-bind="click: endExam"></button></li>
</menu>
    </div>
    <div id="introduction" data-bind="visible: infoPage()=='introduction', if: infoPage()=='introduction'">
        <h1 id="infopage-introduction-header" data-localise="exam.introduction"></h1>
<div data-bind="latex: exam.introMessage" localise-data-jme-context-description="exam.introduction"></div>
    </div>
    <div id="suspend" data-bind="visible: infoPage()=='paused' || infoPage()=='resumed', if: infoPage()=='paused' || infoPage()=='resumed'">
        <h1 id="infopage-suspend-header">
    <span data-bind="visible: infoPage()=='paused'" data-localise="suspend.paused header" ></span>
    <span data-bind="visible: infoPage()=='resumed'" data-localise="suspend.resumed header" ></span>
</h1>
<p data-localise="suspend.exam suspended"></p>
<p data-localise="suspend.you can resume"></p>
<button class="btn primary" id="resumeBtn" data-bind="click: resumeExam" data-localise="suspend.resume"></button>
    </div>
    <div id="results" data-bind="visible: infoPage()=='result', if: infoPage()=='result'">
        <header>
    <h1 class="exam-name text-center break-words" data-bind="latex: exam.settings.name"></h1>
</header>

<!-- ko if: exam.settings.navigateMode=='diagnostic' -->
    <table id="diagnostic-breakdown">
    <colgroup>
        <col>
        <col>
    </colgroup>
    <thead>
        <th data-localise="result.learning objective"></th>
        <!-- ko if: showActualMark -->
        <th data-localise="result.question score"></th>
        <!-- /ko -->
    </thead>
    <tbody>
        <!-- ko foreach: diagnostic_progress -->
            <tr data-bind="css: {total: $index()==$parent.diagnostic_progress().length-1}">
                <td class="name" data-bind="latex: name"></td>
                <!-- ko if: $parent.showActualMark -->
                <td class="score" data-bind="text: Math.floor(100*credit)+'%'"></td>
                <!-- /ko -->
            </tr>
        <!-- /ko -->
    </tbody>
</table>
<!-- /ko -->

<!-- ko if: exam.settings.navigateMode=='sequence' || exam.settings.navigateMode=='menu' -->
<p data-localise="result.click a question to review"></p>
<table id="question-breakdown">
    <colgroup>
        <col>
        <col span="3" class="score">
        <col>
    </colgroup>
    <thead>
        <tr>
        <!-- ko if: exam.settings.navigateMode=='sequence' -->
            <th data-localise="result.question number"></th>
        <!-- /ko -->
        <!-- ko if: exam.settings.navigateMode=='menu' -->
            <th data-localise="question"></th>
        <!-- /ko -->
        <th data-bind="text: resultsScoreColumnHeader"></th>
        </tr>
    </thead>
    <tbody>
        <!-- ko foreach: question_groups -->
            <!-- ko if: $root.exam().showQuestionGroupNames -->
            <tr class="question-group-header" data-bind="visible: show_name">
                <th data-bind="text: name, typeset: name"></th>
                <th class="score-cell" data-bind="html: feedback.plainMessage"></th>
            </tr>
            <!-- /ko -->
            <!-- ko foreach: questions -->
            <tr class="question" data-bind="click: review, attr: {title: R('result.question review title')}">
                <td class="name"><a href="#" data-bind="latex: displayName"></a></td>
                <td class="score-cell" data-bind="html: scoreFeedback.plainMessage"></td>
            </tr>
            <!-- /ko -->
        <!-- /ko -->
        <!-- ko if: scoreFeedback.showActualMark() || scoreFeedback.showTotalMark() -->
        <tr class="total">
            <th scope="row" data-localise="Total"></th>
            <td class="score-cell">
                <span class="score" data-bind="html: scoreFeedback.plainMessage"></span>
                <!-- ko if: scoreFeedback.showActualMark() && scoreFeedback.showTotalMark() -->(<span data-bind="text: percentScore"></span>%)<!-- /ko -->
            </td>
        </tr>
        <!-- /ko -->
    </tbody>
</table>

<!-- /ko -->

<div id="end-message" class="alert" data-bind="visible: exam.has_end_message, latex: exam.end_message" localise-data-jme-context-description="exam.end_message"></div>

<!-- ko if: scoreFeedback.showActualMark -->
<div id="feedback" class="alert results-feedback" data-bind="visible: feedbackMessage()!==null, latex: feedbackMessage" localise-data-jme-context-description="exam.feedback"></div>
<!-- /ko -->

<div id="performance-summary">
    <h2 data-localise="result.performance summary"></h2>

    <table class="summary">
        <tr>
            <th data-localise="exam.exam name"></th>
            <td class="break-words" data-bind="html: exam.settings.name"></td>
        </tr>
        <tr>
            <th data-localise="exam.random seed"></th>
            <td class="break-words" data-bind="html: exam.seed"></td>
        </tr>
        <tr data-bind="visible: exam.settings.showStudentName && exam.student_name">
            <th data-localise="exam.student name"></th>
            <td class="break-words"><span data-bind="text: exam.student_name"></span><span data-bind="visible: exam.student_id"> (<span data-bind="text: exam.student_id"></span>)</span></td>
        </tr>
        <tr>
            <th data-localise="result.exam start"></th>
            <td class="break-words"><time data-bind="datetime: startTime"></time></td>
        </tr>
        <tr>
            <th data-localise="result.exam stop"></th>
            <td class="break-words"><time data-bind="datetime: endTime"></time></td>
        </tr>
        <tr>
            <th data-localise="result.time spent"></th>
            <td class="break-words"><time data-bind="duration: timeSpent"></time></td>
        </tr>
    </table>
</div>



<div class="info-buttons">
    <button class="btn info" data-bind="visible: allowPrinting, click: function(){ window.print(); }, text: printLabel"></button>
    <button class="btn info" data-bind="visible: allowAttemptDownload, click: download_attempt_data" data-localise="result.download exam object"></button>
</div>

<p id="finished-text" class="text-center" data-localise="end.exam has finished"></p>
    </div>

    
    <footer class="copyright-footer">
    Created using <a target="_blank" href="https://www.numbas.org.uk">Numbas</a> v9.1, developed by <a target="_blank" href="https://www.newcastle.ac.uk">Newcastle University</a>.
</footer>
    
</div>

                <div id="questionContainer" class="print-visible" data-bind="visible: currentQuestion, css: {review: mode()=='review'}">
    <div class="contentArea ">
        <div id="diagnostic-feedback" class="diagnostic-feedback" data-bind="visible: diagnostic_feedback, latex: diagnostic_feedback"></div>

        <div id="questionDisplay" data-bind="foreach: questions">
            <div class="question-wrapper print-visible" data-bind="promise: html_promise, visible: isCurrentQuestion">
            </div>
        </div>

        <footer class="copyright-footer">
    Created using <a target="_blank" href="https://www.numbas.org.uk">Numbas</a> v9.1, developed by <a target="_blank" href="https://www.newcastle.ac.uk">Newcastle University</a>.
</footer>
    </div>

</div>
            </main>
        </div>
    </exam-container>
</template>
        <div id="no-stylesheet">
            <p data-localise="page.no stylesheet loaded"></p>
        </div>

        <div id="with-stylesheet">
<div id="die" hidden class="force-default-style">
    <h1 data-localise="die.numbas failed">Numbas failed</h1>
    <p data-localise="die.sorry"></p>
    <div class="error" tabindex="1">
        <div class="message"></div>
        <div class="stack"></div>
    </div>
</div>
<div id="loading">
    <img class="logo center-block" src="resources/numbas-logo.svg" alt="Numbas"/>
    <progress min="0" max="100" value="0"></progress>
    <span class="loading-text" data-localise="page.loading">Loading...</span>
</div>

            
            <numbas-exam storage="scorm">
                <script type="application/numbas-exam">// Numbas version: finer_feedback_settings
{"name": "Double Integrals", "metadata": {"description": "<p>set of exercises on double and triple integrals</p>", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", "", "", "", "", "", ""], "variable_overrides": [[], [], [], [], [], [], [], [], []], "questions": [{"name": "Ugur's copy of Resolve a double integral", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18261/"}], "tags": [], "metadata": {"description": "<p>Calculate a repeated integral of the form $\\displaystyle I=\\int_0^1\\;\\int_0^{x^{m-1}}mf(x^m+a)dy \\;dx$</p>\n<p>The $y$ integral is trivial, and the $x$ integral is of the form $g'(x)f'(g(x))$, so it straightforwardly integrates to $f(g(x))$.</p>", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "<p>Evaluate the following repeated integral:</p>\n<p>\\[ I = \\int_0^1&nbsp; \\; \\int_0^{\\simplify[all]{x^{m-1}}}\\var{m} \\var{fun} \\; \\mathrm{d}y\\; \\mathrm{d}x \\]</p>", "advice": "<p>We want to find</p>\n<p>\\[ I=\\int_0^1&nbsp; \\; \\int_0^{\\simplify[all]{x^{m-1}}} \\var{m} \\var{fun} \\; \\mathrm{d}y \\; dx \\]</p>\n<p>The innermost integral gives:</p>\n<p>\\[ \\int_0^{\\simplify[all]{x^{m-1}}}\\var{m} \\var{fun} \\; \\mathrm{d}y = \\left[\\var{m}y \\; \\var{fun} \\right]_0^{\\simplify[all]{x^{m-1}}}=\\simplify[all]{{m}x^{m-1}} \\var{fun} \\]</p>\n<p>So we have to find &nbsp;$\\displaystyle I=\\int_0^1\\simplify[all]{{m}x^{m-1}} \\var{fun} \\; \\mathrm{d}x$.</p>\n<p>Note that if we use the substitution $u=\\simplify[all]{x^{m}+{a}}$ then it is easy to find this last definite integral and we find that:</p>\n<p>$I=\\var{ans}$ to 3 decimal places.</p>", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"ans": {"name": "ans", "group": "Ungrouped variables", "definition": "precround(upper-lower,3)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "fun": {"name": "fun", "group": "Ungrouped variables", "definition": "latex(\n  switch(\n    t=1,\n    '\\\\sin',\n    t=2,\n    '\\\\cos',\n    '\\\\exp'\n  )\n  +'(x^{'+m+'}+'+a+')'\n)", "description": "", "templateType": "anything", "can_override": false}, "t": {"name": "t", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything", "can_override": false}, "upper": {"name": "upper", "group": "Ungrouped variables", "definition": "switch(t=1,-cos(1+a),t=2,sin(1+a),exp(1+a))", "description": "", "templateType": "anything", "can_override": false}, "lower": {"name": "lower", "group": "Ungrouped variables", "definition": "switch(t=1,-cos(a),t=2,sin(a),exp(a))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "upper", "lower", "m", "t", "ans", "fun"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "<p>$I=\\;$[[0]]</p>\n<p>Input your answer to 3 decimal places.</p>", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ans", "maxValue": "ans", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "3", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Ugur's copy of Double integral - limit is a polynomial", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "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": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18261/"}], "tags": [], "metadata": {"description": "<p>3 Repeated integrals of the form $\\int_a^b\\;\\int_c^{f(x)}g(x,y)\\;dy \\;dx$ where $g(x,y)$ is a polynomial in $x,\\;y$ and $f(x)$ is a degree 0, 1 or 2 polynomial in $x$.</p>", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "<p>Calculate the following repeated integrals.</p>", "advice": "<h4>a)</h4>\n<p>\\[I = \\int_0^{\\var{a}} \\;\\int_{\\var{f}}^{\\var{g}}\\simplify[all]{({b}+{c}*x+{d}*y)} \\; \\mathrm{d}y\\; \\mathrm{d}x\\]</p>\n<p>Calculating the inner integral, we have:</p>\n<p>\\begin{align}<br/>\\int_{\\var{f}}^{\\var{g}}\\simplify[all,!noleadingminus,!collectNumbers]{({b}+{c}*x+{d}*y)} \\; \\mathrm{d}y &amp;= \\left[\\simplify[all,!noleadingminus,!collectNumbers]{{b}y+{c}*x*y+{d}*y^2/2}\\right]_{\\var{f}}^{\\var{g}}\\\\<br/>&amp;= \\simplify[all,!noleadingminus,!collectNumbers]{{b} * {g} + {c} * {g} * x + {d / 2} * {g ^ 2} + {b} * { -f} + {c} * { -f} * x + {d / 2} * { -(f ^ 2)}} \\\\<br/>&amp;= \\simplify[all,!noleadingminus,!collectNumbers]{ {b * g -(b * f) + (d / 2) * (g ^ 2 -(f ^ 2))} + {c * g -(c * f)} * x}<br/>\\end{align}</p>\n<p>The outer integral gives:</p>\n<p>\\begin{align}<br/>I &amp;= \\simplify[std]{DefInt({b * g -(b * f) + (d / 2) * (g ^ 2 -(f ^ 2))} + {c * g -(c * f)} * x,x,0,{a}) } \\\\<br/>&amp;= \\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}} \\\\<br/>&amp;= \\var{ans1}<br/>\\end{align}</p>\n<h4>b)</h4>\n<p>\\[ 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 \\]</p>\n<p>Calculating the inner integral, we have:</p>\n<p>\\begin{align}<br/>\\int_x^{\\var{b1}}\\simplify[std]{({n + 1} * x ^ {m} * y ^ {n})}dy &amp;= \\left[x^{\\var{m}}y^{\\var{n+1}}\\right]_x^{\\var{b1}} \\\\<br/>&amp;= \\simplify{{b1 ^ (n + 1)}* x ^ {m} -(x ^ {m + n + 1})}<br/>\\end{align}</p>\n<p>Finally the outer integral gives:</p>\n<p>\\begin{align}<br/>I &amp;= \\var{(m + 1) * (m + n + 2)}\\int_0^1\\simplify[std]{{b1^ (n + 1)} * x ^ {m} -(x ^ {m + n + 1})} \\; \\mathrm{d}x \\\\<br/>&amp;= \\simplify[std]{ {(m + 1) * (m + n + 2)} * ({b1 ^ (n + 1)} / {m + 1} -(1 / {m + n + 2})) } \\\\<br/>&amp;= \\var{ans2}<br/>\\end{align}</p>\n<h4>c)</h4>\n<p>\\[ I=\\var{con}\\int_{-1}^1&nbsp; \\; \\int_0^{\\simplify[all]{{c2}+{d2}*x^{p2}}}\\simplify[all]{{c1}+{d1}*y^{p1}} \\; \\mathrm{d}y \\; \\mathrm{d}x \\]</p>\n<p>Calculating the inner integral, we have:</p>\n<p>\\begin{align}<br/>\\int_0^{\\simplify[all]{{c2}+{d2}*x^{p2}}}\\simplify[all]{{c1}+{d1}*y^{p1}} \\; \\mathrm{d}y &amp;= \\left[\\simplify[all]{{c1} * y + {d1 / (p1 + 1)} * y ^ {p1 + 1}}\\right]_0^{\\simplify[all]{{c2}+{d2}*x^{p2}}} \\\\<br/>&amp;= \\simplify[std]{{c1} * ({c2} + {d2} * x ^ {p2}) + {d1 / (p1 + 1)} * ({c2} + {d2} * x ^ {p2}) ^ {p1 + 1}} \\\\<br/>&amp;= \\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})} \\\\<br/>&amp;= \\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}}<br/>\\end{align}</p>\n<p>Finally the outer integral gives:</p>\n<p>\\begin{align}<br/>I &amp;= \\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)} \\\\<br/>&amp;= \\var{ans3}<br/>\\end{align}</p>\n<p>&nbsp;</p>\n<p>&nbsp;</p>", "rulesets": {"std": ["all", "!collectnumbers", "!noleadingminus", "fractionNumbers"]}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"p2": {"name": "p2", "group": "Ungrouped variables", "definition": "if(p1=1,2,1)", "description": "", "templateType": "anything", "can_override": false}, "ans2": {"name": "ans2", "group": "Ungrouped variables", "definition": "(m+n+2)*b1^(n+1)-m-1", "description": "", "templateType": "anything", "can_override": false}, "ans3": {"name": "ans3", "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": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(2,4,6)", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "random(-2..3)", "description": "", "templateType": "anything", "can_override": false}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "random(-2..3 except 0)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-3..3 except 0)", "description": "", "templateType": "anything", "can_override": false}, "d1": {"name": "d1", "group": "Ungrouped variables", "definition": "switch(p1=1,random(-6,-4,-2,2,4,6),random(-6,-3,3,6))", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1..4)", "description": "", "templateType": "anything", "can_override": false}, "c2": {"name": "c2", "group": "Ungrouped variables", "definition": "random(1,2)", "description": "", "templateType": "anything", "can_override": false}, "d2": {"name": "d2", "group": "Ungrouped variables", "definition": "random(-2,-1,1,2)", "description": "", "templateType": "anything", "can_override": false}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "ans1": {"name": "ans1", "group": "Ungrouped variables", "definition": "a*b*(g-f)+c*(g-f)*a^2/2+d*(g^2-f^2)*a/2", "description": "", "templateType": "anything", "can_override": false}, "p1": {"name": "p1", "group": "Ungrouped variables", "definition": "random(1,2)", "description": "", "templateType": "anything", "can_override": false}, "con": {"name": "con", "group": "Ungrouped variables", "definition": "if(p2=1,3,15)", "description": "", "templateType": "anything", "can_override": false}, "h1": {"name": "h1", "group": "Ungrouped variables", "definition": "round(d1/(p1+1))", "description": "", "templateType": "anything", "can_override": false}, "g": {"name": "g", "group": "Ungrouped variables", "definition": "f+random(2,4,6)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-4..4 except 0)", "description": "", "templateType": "anything", "can_override": false}}, "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"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "<p>\\[I = \\int_0^{\\var{a}}\\;\\int_{\\var{f}}^{\\var{g}}\\simplify[all]{({b}+{c}*x+{d}*y)}\\;dy \\;dx\\]</p>\n<p>$I=$&nbsp;[[0]]</p>", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ans1", "maxValue": "ans1", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "<p>\\[I=\\var{(m+1)(m+n+2)}\\int _0^1\\;\\int_x^{\\var{b1}}\\simplify[all]{{n+1}*x^{m}*y^{n}}\\;dy \\;dx\\]</p>\n<p>$I=\\;$[[0]]</p>", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ans2", "maxValue": "ans2", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "<p>\\[I=\\var{con}\\int_{-1}^1\\;\\int_0^{\\simplify[all]{{c2}+{d2}*x^{p2}}}\\simplify[all]{{c1}+{d1}*y^{p1}}\\;dy \\;dx\\]</p>\n<p>$I=\\;$?[[0]]</p>", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ans3", "maxValue": "ans3", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Tutorial: Inputting Integrals", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18261/"}], "tags": [], "metadata": {"description": "<p>Inputing Integrals tutorial</p>", "licence": "Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International"}, "statement": "<p>To input integrals in Numbas we use the commands int() and defint(). We will see how to use them in more detail here.&nbsp;</p>\n<p><strong>This is a tutorial</strong>&nbsp;</p>", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "<p>To input the integral $\\int x^3 \\,dx$, write <code>int(x^3, x)</code> in the area below.</p>\n<p></p>", "answer": "int(x^3, x)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "<p>One can also write the expression $\\int\\, dx$. To do so, input <code>int('',x)</code>. The expression <code>''</code> tells that the firtst argument of the function is an empty string.</p>", "answer": "int('',x)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "<p>You can also input definite integrals. For this we use <code>defint()</code>. This function has four arguments, as made clear in the below example:</p>\n<p>To input $\\int^b_a f(x) \\, dx$, write <code>defint(f(x), x, a, b)</code>.</p>", "answer": "defint(f(x), x, a, b)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "a", "value": ""}, {"name": "b", "value": ""}, {"name": "x", "value": ""}]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "<p>For inputting double integrals, one can use <code>int()</code> and <code>defint()</code> nested.&nbsp;</p>\n<p>For example to write $\\int^b_a\\int^d_c g(x,y) \\,dx\\, dy$, input <code>defint(defint(g(x,y), x, c,d),y,a,b)</code>&nbsp;</p>", "answer": "defint(defint(g(x,y), x, c,d),y,a,b)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "a", "value": ""}, {"name": "b", "value": ""}, {"name": "c", "value": ""}, {"name": "d", "value": ""}, {"name": "x", "value": ""}, {"name": "y", "value": ""}]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Area between 2 graphs by Double Integral (Advanced)", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}, {"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18261/"}], "tags": [], "metadata": {"description": "<p>Calculating the area enclosed between a linear function and a quadratic function by integration. The limits (points of intersection) are not given in the question and must be calculated.</p>", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "<p>Find the area enclosed by $\\simplify{y={m}x+{c_1}}$ and $\\simplify{y=x^2+{b}x+{c_2}}$ using a double integral.</p>\n<p></p>\n<p>{geogebra_applet('https://www.geogebra.org/m/fyxr2fqj',defs)}</p>", "advice": "<p>a)</p>\n<p>To find the points of intersection, we will solve the given eqautions simultaneously. We equate the two and solve for $x$ first:</p>\n<p>\\[ \\begin{split} \\simplify{x^2+{b}x+{c_2}} &amp;\\,= \\simplify{{m}x+{c_1}}, \\\\ \\simplify{x^2+{b-m}x+{c_2-c_1}} &amp;\\,=0, \\\\ \\simplify{(x-{cp1})(x-{cp2})}&amp;\\,=0.&nbsp;\\end{split} \\]</p>\n<p>Therefore, the points of intersection are when $\\simplify{x1={cp1}}$ and $\\simplify{x2={cp2}}$.</p>\n<p>Now by pluging-in these values into $\\simplify{y={m}x+{c_1}}$ we get $\\simplify{y_1 = {y1}}$ and $\\simplify{y_2 = {y2}}$.</p>\n<p></p>\n<p>b)&nbsp;</p>\n<p>We are asked to integrate $y$ first. So, $x$ can vary freely in the range we found above, and $y$ will vary depending on $x$. So the relevant boundaries of the variables are&nbsp;</p>\n<p>\\[ \\var{x1} &lt; x &lt; \\var{x2} \\quad \\mbox{ and }\\quad&nbsp; \\simplify{x^2+{b}x+{c_2}} &lt; y &lt; \\simplify{{m}x+{c_1}}\\simplify{x^2+{b}x+{c_2}}.\\]</p>\n<p>Then the integral&nbsp;</p>\n<p>\\[\\int_{\\var{x1}}^{\\var{x2}} \\int_{\\simplify{x^2+{b}x+{c_2}}}^{\\simplify{{m}x+{c_1}}}\\, \\mathrm{d}y\\, \\mathrm{d}x\\]&nbsp;</p>\n<p>can be used to compute the shaded area.</p>\n<p></p>\n<p>c)</p>\n<p>We start with the inner integral first</p>\n<p>\\[\\int_{\\simplify{x^2+{b}x+{c_2}}}^{\\simplify{{m}x+{c_1}}}\\, \\mathrm{d}y = y|_{\\simplify{x^2+{b}x+{c_2}}}^{\\simplify{{m}x+{c_1}}} =&nbsp; \\simplify{{m}x+{c_1}} - (\\simplify{x^2+{b}x+{c_2}}) = \\simplify{-x^2 + {m-b}x&nbsp; + {c_1-c_2}}.\\]</p>\n<p></p>\n<p>Then we get&nbsp;</p>\n<p>\\[\\int_{\\var{x1}}^{\\var{x2}} \\int_{\\simplify{x^2+{b}x+{c_2}}}^{\\simplify{{m}x+{c_1}}}\\, \\mathrm{d}y\\, \\mathrm{d}x =\\] {advice}</p>\n<p></p>\n<p>&nbsp;</p>\n<p></p>\n<p></p>", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-6..6)", "description": "", "templateType": "anything", "can_override": false}, "c_1": {"name": "c_1", "group": "Ungrouped variables", "definition": "random(-6..6 except 0)", "description": "", "templateType": "anything", "can_override": false}, "cp1": {"name": "cp1", "group": "Ungrouped variables", "definition": "(-(b-m)-sqrt(dis))/2", "description": "", "templateType": "anything", "can_override": false}, "cp2": {"name": "cp2", "group": "Ungrouped variables", "definition": "(-(b-m)+sqrt(dis))/2", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "c_2": {"name": "c_2", "group": "Ungrouped variables", "definition": "random(-8..8 except [0,c_1])", "description": "", "templateType": "anything", "can_override": false}, "dis": {"name": "dis", "group": "Ungrouped variables", "definition": "(b-m)^2-4*(c_2-c_1)", "description": "", "templateType": "anything", "can_override": false}, "sol": {"name": "sol", "group": "Ungrouped variables", "definition": "-(cp2^3/3)+(m-b)cp2^2/2+(c_1-c_2)*cp2+(cp1)^3/3-(m-b)cp1^2/2-(c_1-c_2)*cp1", "description": "", "templateType": "anything", "can_override": false}, "sol2dp": {"name": "sol2dp", "group": "Ungrouped variables", "definition": "precround(sol,2)", "description": "", "templateType": "anything", "can_override": false}, "advice": {"name": "advice", "group": "Ungrouped variables", "definition": "if(sol=round(sol),'{simplified}',advice2)", "description": "", "templateType": "anything", "can_override": false}, "simplified": {"name": "simplified", "group": "Ungrouped variables", "definition": "\"<p>\\\\[ \\\\begin{split}\\\\simplify[all, !noLeadingMinus]{defint(-x^2+{m-b}x+{c_1-c_2},x,{cp1},{cp2})} &amp;\\\\,= \\\\left[\\\\simplify[all, !noLeadingMinus]{-x^3/3+{m-b}x^2/2+{c_1-c_2}x} \\\\right]_\\\\var{cp1}^\\\\var{cp2},\\\\\\\\ &amp;\\\\,=\\\\left[\\\\simplify[all, !collectNumbers,fractionNumbers,!noLeadingMinus]{-{cp2^3/3}+{(m-b)*cp2^2/2}+{(c_1-c_2)*cp2}}\\\\right]-\\\\left[\\\\simplify[all, !collectNumbers,fractionNumbers,!noLeadingMinus]{-{cp1^3/3}+{(m-b)*cp1^2/2}+{(c_1-c_2)*cp1}}\\\\right]\\\\\\\\ &amp;\\\\,= \\\\left(\\\\simplify[all, fractionNumbers]{{-(cp2^3/3)+(m-b)cp2^2/2+(c_1-c_2)*cp2}}\\\\right)-\\\\left(\\\\simplify[all, fractionNumbers]{{-(cp1)^3/3+(m-b)cp1^2/2+(c_1-c_2)*cp1}}\\\\right)\\\\\\\\ &amp;\\\\,=\\\\simplify[all, fractionNumbers]{{-(cp2^3/3)+(m-b)cp2^2/2+(c_1-c_2)*cp2+(cp1)^3/3-(m-b)cp1^2/2-(c_1-c_2)*cp1}}. \\\\end{split} \\\\]</p>\"", "description": "", "templateType": "long string", "can_override": false}, "simplify": {"name": "simplify", "group": "Ungrouped variables", "definition": "safe(\"<p>\\\\[ \\\\begin{split}\\\\simplify[all, !noLeadingMinus]{defint(-x^2+{m-b}x+{c_1-c_2},x,{cp1},{cp2})} &amp;\\\\,= \\\\left[\\\\simplify[all, !noLeadingMinus]{-x^3/3+{m-b}x^2/2+{c_1-c_2}x} \\\\right]_\\\\var{cp1}^\\\\var{cp2},\\\\\\\\ &amp;\\\\,=\\\\left[\\\\simplify[all, !collectNumbers,fractionNumbers,!noLeadingMinus]{-{cp2^3/3}+{(m-b)*cp2^2/2}+{(c_1-c_2)*cp2}}\\\\right]-\\\\left[\\\\simplify[all, !collectNumbers,fractionNumbers,!noLeadingMinus]{-{cp1^3/3}+{(m-b)*cp1^2/2}+{(c_1-c_2)*cp1}}\\\\right]\\\\\\\\ &amp;\\\\,= \\\\left(\\\\simplify[all, fractionNumbers]{{-(cp2^3/3)+(m-b)cp2^2/2+(c_1-c_2)*cp2}}\\\\right)-\\\\left(\\\\simplify[all, fractionNumbers]{{-(cp1)^3/3+(m-b)cp1^2/2+(c_1-c_2)*cp1}}\\\\right)\\\\\\\\ &amp;\\\\,=\\\\simplify[all, fractionNumbers]{{-(cp2^3/3)+(m-b)cp2^2/2+(c_1-c_2)*cp2+(cp1)^3/3-(m-b)cp1^2/2-(c_1-c_2)*cp1}}\\\\\\\\ &amp;\\\\,=\\\\var{sol2dp} \\\\,\\\\text{(2dp)}. \\\\end{split} \\\\]</p>\")", "description": "", "templateType": "long string", "can_override": false}, "advice2": {"name": "advice2", "group": "Ungrouped variables", "definition": "if(sol=sol2dp,'{simplifyy}','{simplify}')", "description": "", "templateType": "anything", "can_override": false}, "simplifyy": {"name": "simplifyy", "group": "Ungrouped variables", "definition": "\"<p>\\\\[ \\\\begin{split}\\\\simplify[all,!noLeadingMinus]{defint(-x^2+{m-b}x+{c_1-c_2},x,{cp1},{cp2})} &amp;\\\\,= \\\\left[\\\\simplify[all,!noLeadingMinus]{-x^3/3+{m-b}x^2/2+{c_1-c_2}x} \\\\right]_\\\\var{cp1}^\\\\var{cp2},\\\\\\\\ &amp;\\\\,=\\\\left[\\\\simplify[all, !collectNumbers,fractionNumbers,!noLeadingMinus]{-{cp2^3/3}+{(m-b)*cp2^2/2}+{(c_1-c_2)*cp2}}\\\\right]-\\\\left[\\\\simplify[all, !collectNumbers,fractionNumbers,!noLeadingMinus]{-{cp1^3/3}+{(m-b)*cp1^2/2}+{(c_1-c_2)*cp1}}\\\\right]\\\\\\\\ &amp;\\\\,= \\\\left(\\\\simplify[all, fractionNumbers]{{-(cp2^3/3)+(m-b)cp2^2/2+(c_1-c_2)*cp2}}\\\\right)-\\\\left(\\\\simplify[all, fractionNumbers]{{-(cp1)^3/3+(m-b)cp1^2/2+(c_1-c_2)*cp1}}\\\\right)\\\\\\\\ &amp;\\\\,=\\\\simplify[all, fractionNumbers]{{-(cp2^3/3)+(m-b)cp2^2/2+(c_1-c_2)*cp2+(cp1)^3/3-(m-b)cp1^2/2-(c_1-c_2)*cp1}}\\\\\\\\ &amp;\\\\,=\\\\var{sol2dp} \\\\end{split} \\\\]</p>\"", "description": "", "templateType": "long string", "can_override": false}, "defs": {"name": "defs", "group": "Ungrouped variables", "definition": "[\n  ['M',m],\n  ['D',c_1],\n  ['B',b],\n  ['C',c_2]\n]", "description": "", "templateType": "anything", "can_override": false}, "x2": {"name": "x2", "group": "Ungrouped variables", "definition": "((m-b)+delta)/2", "description": "", "templateType": "anything", "can_override": false}, "delta": {"name": "delta", "group": "Ungrouped variables", "definition": "sqrt((b-m)^2 - 4*(c_2-c_1))", "description": "", "templateType": "anything", "can_override": false}, "x1": {"name": "x1", "group": "Ungrouped variables", "definition": "((m-b)-delta)/2", "description": "", "templateType": "anything", "can_override": false}, "y1": {"name": "y1", "group": "Ungrouped variables", "definition": "m*x1 + c_1", "description": "", "templateType": "anything", "can_override": false}, "y2": {"name": "y2", "group": "Ungrouped variables", "definition": "m*x2 + c_1", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "cp1=round(cp1) and cp2=round(cp2) and dis>0", "maxRuns": "100"}, "ungrouped_variables": ["m", "c_1", "b", "c_2", "cp1", "cp2", "dis", "sol", "sol2dp", "advice", "advice2", "simplified", "simplify", "simplifyy", "defs", "x2", "delta", "x1", "y1", "y2"], "variable_groups": [{"name": "Unnamed group", "variables": []}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "<p>Denote the intersection points of $\\simplify{y={m}x+{c_1}}$ and $\\simplify{y=x^2+{b}x+{c_2}}$ as $(x_1, y_1)$ (leftmost) and $(x_2,y_2)$ (rightmost). Find these points</p>\n<p>$x_1=$[[0]], $y_1=$[[1]]</p>\n<p>$x_2=$[[2]], $y_2=$ [[3]]</p>", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{x1}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{y1}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{x2}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": true, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{y2}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}, {"type": "jme", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "<p>Write a double integral, integrating $y$ first, to compute the shaded area.&nbsp;</p>", "answer": "defint(defint( '',y, x^2+{b}x+{c_2}, {m}x+{c_1}), x,{x1},{x2})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}, {"name": "y", "value": ""}]}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "<p>Compute the double integral you wrote in part b)</p>\n<p>[[0]]&nbsp;<em>(Give your answers to 2 decimal places where necessary)</em></p>", "gaps": [{"type": "jme", "useCustomName": true, "customName": "Gap 0", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{sol2dp}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "0.01", "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Volume of a tetrahedron", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18261/"}], "tags": [], "metadata": {"description": "<p>Volume of a tetrahedron using integrals</p>", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "<p>Find the volume of the tetrahedron bounded by the coordinate planes $x=0$, $y=0$ and $z=0$ and the plane $\\frac{x}{\\var{a}} + \\frac{y}{\\var{b}} + \\frac{z}{\\var{c}} =1$.</p>", "advice": "<p>The coordinate surfaces $x=0$, $y=0$ and $z=0$ are given. The plane $\\frac{x}{\\var{a}} + \\frac{y}{\\var{b}} + \\frac{z}{\\var{c}} = 1$ can be rewritten as a functions as follows&nbsp;</p>\n<p>\\[z = f(x,y) = \\var{c}\\left( 1 - \\frac{x}{\\var{a}} - \\frac{y}{\\var{b}}\\right).\\]</p>\n<p>The surface of $f(x,y)$ intersects the axes at $x=\\var{a}, y=\\var{b}$ and $z=\\var{c}$.</p>\n<p>Let us integrate $y$-firts. Then the triangular region the tetrahedron sits is bounded by the lines $x=0, y=0$ and $\\frac{x}{\\var{a}} + \\frac{y}{\\var{b}} = 1$. Then we have the following bounds for integration&nbsp;</p>\n<p>\\[0&lt;x&lt;\\var{a} \\quad \\mbox{and} \\quad 0 &lt; y&lt;&nbsp; \\frac{\\var{b}}{\\var{a}}(\\var{a} -x).\\]</p>\n<p>Hence, we can compute the volume of the tetrahedron as&nbsp;</p>\n<p>\\[V = \\int_0^\\var{a}\\int_0^{\\frac{\\var{b}}{\\var{a}}(\\var{a} -x)}f(x,y) \\,dy\\, dx = \\int_0^\\var{a}\\int_0^{\\frac{\\var{b}}{\\var{a}}(\\var{a} -x)} \\var{c}\\left( 1 - \\frac{x}{\\var{a}} - \\frac{y}{\\var{b}}\\right) \\,dy\\, dx =\\\\[3mm]<br/>= \\int_0^\\var{a} \\var{c}\\left[ y - \\frac{xy}{\\var{a}} - \\frac{y^2}{\\simplify{2*{b}}}\\right]_0^{\\frac{\\var{b}}{\\var{a}}(\\var{a} -x)}\\, dx = \\int_0^\\var{a} \\frac{\\simplify{{b*c}}}{\\simplify{{2*a^2}}}(\\var{a}-x)^2 \\, dx = \\frac{\\simplify{{a*b*c}}}{6}\\]</p>\n<pre></pre>\n<pre></pre>", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1 .. 6#1)", "description": "", "templateType": "randrange", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(1 .. 6#1)", "description": "", "templateType": "randrange", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(1 .. 6#1)", "description": "", "templateType": "randrange", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "<p>(enter your answer as an interger or a fraction)</p>", "answer": "{a}*{b}*{c}/6", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "mass of tetrahedron", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18261/"}], "tags": [], "metadata": {"description": "<p>mass of tetrahedron via integration</p>", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "<p>Cosider the tetrahedron bounded by the coordinate planes $x=0$, $y=0$ and $z=0$ and the plane $\\frac{x}{\\var{a}} + \\frac{y}{\\var{b}} + \\frac{z}{\\var{c}} =1$. Assume that it has a density function $\\rho(x) = \\var{R0}(\\var{a}+x)$.&nbsp;</p>", "advice": "<p><strong>a)</strong></p>\n<p>The coordinate surfaces $x=0$, $y=0$ and $z=0$ are given. The plane $\\frac{x}{\\var{a}} + \\frac{y}{\\var{b}} + \\frac{z}{\\var{c}} = 1$ can be rewritten as a functions as follows&nbsp;</p>\n<p>\\[z = f(x,y) = \\var{c}\\left( 1 - \\frac{x}{\\var{a}} - \\frac{y}{\\var{b}}\\right).\\]</p>\n<p>The surface of $f(x,y)$ intersects the axes at $x=\\var{a}, y=\\var{b}$ and $z=\\var{c}$.</p>\n<p>We can write the boundaries of the tetrahedron as&nbsp;</p>\n<p>\\[0&lt;x&lt;\\var{a} \\quad \\mbox{and} \\quad 0 &lt; y&lt;&nbsp; \\frac{\\var{b}}{\\var{a}}(\\var{a} -x) \\quad\\mbox{and }\\quad 0\\leq z \\leq \\var{c}\\left( 1 - \\frac{x}{\\var{a}} - \\frac{y}{\\var{b}}\\right).\\]</p>\n<p></p>\n<p>Thus, with mass element $dM = \\rho(x)dV = \\rho(x)dx\\,dy\\,dz$, the total mass is&nbsp;</p>\n<p>\\[M= \\int_T\\,dM = \\int_0^\\var{a}\\int_0^{\\frac{\\var{b}}{\\var{a}}(\\var{a} -x)}\\int_0^{\\var{c}\\left( 1 - \\frac{x}{\\var{a}} - \\frac{y}{\\var{b}}\\right)}\\rho(x)\\,dz\\,dy\\,dx =\\\\[3mm]<br/>&nbsp;\\int_0^\\var{a}\\int_0^{\\frac{\\var{b}}{\\var{a}}(\\var{a} -x)}\\int_0^{\\var{c}\\left( 1 - \\frac{x}{\\var{a}} - \\frac{y}{\\var{b}}\\right)} \\var{R0}(\\var{a}+x) \\,dz\\,dy\\,dx =\\\\[3mm]<br/>\\int_0^\\var{a} \\var{R0}(\\var{a}+x) \\int_0^{\\frac{\\var{b}}{\\var{a}}(\\var{a} -x)}\\int_0^{\\var{c}\\left( 1 - \\frac{x}{\\var{a}} - \\frac{y}{\\var{b}}\\right)}&nbsp; \\,dz\\,dy\\,dx =\\\\[3mm]<br/>\\int_0^\\var{a} \\var{R0}(\\var{a}+x) \\int_0^{\\frac{\\var{b}}{\\var{a}}(\\var{a} -x)} \\var{c}\\left( 1 - \\frac{x}{\\var{a}} - \\frac{y}{\\var{b}}\\right) \\,dy\\,dx =\\\\[3mm]<br/>\\int_0^\\var{a} \\var{R0}(\\var{a}+x)\\left[ \\frac{\\simplify{{b*c}}}{\\simplify{{2*a^2}}}(\\var{a}-x)^2\\right]\\, dx = \\frac{5\\cdot\\var{a}^2\\cdot\\var{b}\\cdot\\var{c}\\cdot\\var{R0}}{24}=\\frac{\\simplify{{5*{a^2}*{b}*{c}*{R0}}}}{24}.\\]</p>\n<p></p>\n<p><strong>b)</strong></p>\n<p>We start with the $x$ coordinate.</p>\n<p>\\[\\bar x= \\frac{1}{M}\\int_T x\\,dM = \\int_0^\\var{a}\\int_0^{\\frac{\\var{b}}{\\var{a}}(\\var{a} -x)}\\int_0^{\\var{c}\\left( 1 - \\frac{x}{\\var{a}} - \\frac{y}{\\var{b}}\\right)}x\\rho(x)\\,dz\\,dy\\,dx =\\\\[3mm]<br/>\\frac{1}{M} \\int_0^\\var{a}\\int_0^{\\frac{\\var{b}}{\\var{a}}(\\var{a} -x)}\\int_0^{\\var{c}\\left( 1 - \\frac{x}{\\var{a}} - \\frac{y}{\\var{b}}\\right)} x\\var{R0}(\\var{a}+x) \\,dz\\,dy\\,dx =\\\\[3mm]<br/>\\frac{1}{M}\\int_0^\\var{a} x\\var{R0}(\\var{a}+x) \\int_0^{\\frac{\\var{b}}{\\var{a}}(\\var{a} -x)}\\int_0^{\\var{c}\\left( 1 - \\frac{x}{\\var{a}} - \\frac{y}{\\var{b}}\\right)}&nbsp; \\,dz\\,dy\\,dx =\\\\[3mm]<br/>\\frac{1}{M}\\int_0^\\var{a} x\\var{R0}(\\var{a}+x) \\int_0^{\\frac{\\var{b}}{\\var{a}}(\\var{a} -x)} \\var{c}\\left( 1 - \\frac{x}{\\var{a}} - \\frac{y}{\\var{b}}\\right) \\,dy\\,dx =\\\\[3mm]<br/>\\frac{1}{M}\\int_0^\\var{a} x\\var{R0}(\\var{a}+x)\\left[ \\frac{\\simplify{{b*c}}}{\\simplify{{2*a^2}}}(\\var{a}-x)^2\\right]\\, dx =\\\\[3mm]<br/>\\frac{\\simplify{{R0*b*c}}}{\\simplify{{2*a^2}}M}\\int_0^\\var{a} x&nbsp; (\\var{a}+x)\\left[ (\\var{a}-x)^2\\right]\\, dx =<br/>\\frac{\\simplify{{R0*b*c}}}{\\simplify{{2*a^2}}M}\\int_0^\\var{a}x(\\var{a^3} -\\var{a^2}x-\\var{a} x^2 + x^3) \\, dx =\\\\[3mm]<br/>\\frac{\\simplify{{R0*b*c}}}{\\simplify{{2*a^2}}M}\\int_0^\\var{a}\\var{a^3}x -\\var{a^2}x^2-\\var{a} x^3 + x^4 \\, dx = \\\\[3mm]<br/>\\frac{\\simplify{{R0*b*c}}}{\\simplify{{2*a^2}}M}\\left[\\frac{\\var{a^3}x^2}{2} -\\frac{\\var{a^2}x^3}{3}-\\frac{\\var{a} x^4}{4} + \\frac{x^5}{5} \\right]_0^{\\var{a}}=\\\\[3mm]<br/>\\simplify[fractionNumbers]{({a}^5/2 - ({a}^5)/3 - {a}^5/4 + {a}^5/5) *{R0*b*c}/{2*a^2*Mass}} = <br/>\\simplify[fractionNumbers,otherNumbers]{({a}^5/2 - ({a}^5)/3 - {a}^5/4 + {a}^5/5) *{R0*b*c}/{2*a^2*Mass}}.\\]</p>\n<p>Simlarly, for $y$ coordinate:</p>\n<p>\\[\\bar y = \\frac{1}{M}\\int_T y\\,dM = \\int_0^\\var{a}\\int_0^{\\frac{\\var{b}}{\\var{a}}(\\var{a} -x)}\\int_0^{\\var{c}\\left( 1 - \\frac{x}{\\var{a}} - \\frac{y}{\\var{b}}\\right)}y\\rho(x)\\,dz\\,dy\\,dx =\\\\[3mm]<br/>\\frac{1}{M} \\int_0^\\var{a}\\int_0^{\\frac{\\var{b}}{\\var{a}}(\\var{a} -x)}\\int_0^{\\var{c}\\left( 1 - \\frac{x}{\\var{a}} - \\frac{y}{\\var{b}}\\right)} y\\var{R0}(\\var{a}+x) \\,dz\\,dy\\,dx =\\\\[3mm]<br/>\\frac{1}{M}\\int_0^\\var{a} \\var{R0}(\\var{a}+x) \\int_0^{\\frac{\\var{b}}{\\var{a}}(\\var{a} -x)} y \\int_0^{\\var{c}\\left( 1 - \\frac{x}{\\var{a}} - \\frac{y}{\\var{b}}\\right)}&nbsp; \\,dz\\,dy\\,dx =\\\\[3mm]<br/>\\frac{1}{M}\\int_0^\\var{a} \\var{R0}(\\var{a}+x) \\int_0^{\\frac{\\var{b}}{\\var{a}}(\\var{a} -x)} y\\var{c}\\left( 1 - \\frac{x}{\\var{a}} - \\frac{y}{\\var{b}}\\right) \\,dy\\,dx =\\\\[3mm]<br/>\\frac{1}{M}\\int_0^\\var{a} \\var{R0}(\\var{a}+x) \\int_0^{\\frac{\\var{b}}{\\var{a}}(\\var{a} -x)} \\var{c}\\left( y - \\frac{xy}{\\var{a}} - \\frac{y^2}{\\var{b}}\\right) \\,dy\\,dx =\\\\[3mm]<br/>\\frac{1}{M}\\int_0^\\var{a} \\var{R0}(\\var{a}+x)\\frac{\\simplify{{c*b^2}}}{\\simplify{{6*a^3}}}\\left[\\var{a^3}-3\\cdot\\simplify[unitFactor]{{a^2}x} +3\\cdot\\simplify[unitFactor]{{a}x^2}-x^3\\right]\\, dx =\\\\[3mm]<br/>\\frac{\\simplify{{R0*b^2*c}}}{\\simplify{{6*a^3}}M}\\int_0^\\var{a}&nbsp; &nbsp;(\\var{a}+x)( \\var{a}-x)^3, dx =<br/>\\frac{\\simplify{{R0*b^2*c}}}{\\simplify{{6*a^3}}M}\\int_0^\\var{a}\\var{a^4} -2\\cdot\\simplify[unitFactor]{{a^3}x} +2\\cdot\\simplify[unitFactor]{{a}x^3}-x^4 \\, dx =\\\\[3mm]<br/>\\frac{\\simplify{{R0*b^2*c}}}{\\simplify{{6*a^3}}M}\\left[\\simplify[unitFactor]{{a^4}x} - \\simplify[unitFactor]{{a^3}x^2} +\\frac{\\simplify[unitFactor]{{a}x^4}}{2}-\\frac{x^5}{5} \\right]_0^\\var{a} = \\\\[3mm]<br/><br/>\\simplify[fractionNumbers]{({a}^5 - ({a}^5) + {a}^5 /2- {a}^5/5) *{R0*b^2*c}/{6*a^3*Mass}} = <br/>\\simplify[fractionNumbers,otherNumbers]{({a}^5 - ({a}^5) + {a}^5 /2- {a}^5/5) *{R0*b^2*c}/{6*a^3*Mass}}.\\]</p>\n<p>Finaly, for $z$ coordinate:</p>\n<p>\\[\\bar z= \\frac{1}{M}\\int_T z\\,dM = \\int_0^\\var{a}\\int_0^{\\frac{\\var{c}}{\\var{a}}(\\var{a} -x)}\\int_0^{\\var{b}\\left( 1 - \\frac{x}{\\var{a}} - \\frac{z}{\\var{c}}\\right)}z\\rho(x)\\,dy\\,dz\\,dx =\\\\[3mm]<br/>\\frac{1}{M}\\int_0^\\var{a}\\int_0^{\\frac{\\var{c}}{\\var{a}}(\\var{a} -x)}\\int_0^{\\var{b}\\left( 1 - \\frac{x}{\\var{a}} - \\frac{z}{\\var{c}}\\right)} z\\var{R0}(\\var{a}+x) \\,dy\\,dz\\,dx =\\\\[3mm]<br/>\\frac{1}{M} \\int_0^\\var{a}\\var{R0}(\\var{a}+x)\\int_0^{\\frac{\\var{c}}{\\var{a}}(\\var{a} -x)}z\\int_0^{\\var{b}\\left( 1 - \\frac{x}{\\var{a}} - \\frac{z}{\\var{c}}\\right)}&nbsp; &nbsp;\\,dy\\,dz\\,dx =\\\\[3mm]<br/>\\frac{1}{M}\\int_0^\\var{a} \\var{R0}(\\var{a}+x)\\int_0^{\\frac{\\var{c}}{\\var{a}}(\\var{a} -x)} z\\var{b}\\left( 1 - \\frac{x}{\\var{a}} - \\frac{z}{\\var{c}}\\right)\\,dz\\,dx =\\\\[3mm]<br/>\\frac{1}{M}\\int_0^\\var{a} \\var{R0}(\\var{a}+x)\\int_0^{\\frac{\\var{c}}{\\var{a}}(\\var{a} -x)} \\var{b}\\left( z - \\frac{xz}{\\var{a}} - \\frac{z^2}{\\var{c}}\\right)\\,dz\\,dx =\\\\[3mm]<br/>\\frac{\\simplify{{R0*a}}}{M}\\int_0^\\var{a} (\\var{a}+x) \\left[ \\frac{z^2}{2} - \\frac{xz^2}{\\var{2*a}} - \\frac{z^3}{\\var{3*c}}\\right]_0^{\\frac{\\var{c}}{\\var{a}}(\\var{a} -x)}\\,dx =\\\\[3mm]<br/>\\frac{\\simplify{{R0*c^2}}}{\\simplify{{6*a^2}}M}\\int_0^\\var{a} (\\var{a}+x)(a-x)^3\\,dx = <br/>\\frac{\\simplify{{R0*c^2}}}{\\simplify{{6*a^2}}M}\\int_0^\\var{a} \\var{a^4}-\\var{2*a^3}x + \\var{2*a}x^3 - x^4\\,dx\\\\[3mm]<br/>\\frac{\\simplify{{R0*c^2}}}{\\simplify{{6*a^2}}M}\\left[\\var{a^4}x -\\frac{\\var{2*a^3}x^2}{2} + \\frac{\\var{a}x^4}{2} - \\frac{x^5}{5}\\right]_0^{\\var{a}}=\\\\[3mm]<br/><br/><br/><br/><br/>\\simplify[fractionNumbers]{({a^5} -{2*a^5}/2 + {a^5}/2 - {a^5}/5) *{R0*c^2}/{6*a^2*Mass}} = <br/>\\simplify[fractionNumbers,otherNumbers]{({a^5} -{2*a^5}/2 + {a^5}/2 - {a^5}/5) *{R0*c^2}/{6*a^2*Mass}}.<br/>\\]</p>", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1 .. 6#1)", "description": "", "templateType": "randrange", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(1 .. 6#1)", "description": "", "templateType": "randrange", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(1 .. 6#1)", "description": "", "templateType": "randrange", "can_override": false}, "r0": {"name": "r0", "group": "Ungrouped variables", "definition": "random(1 .. 5#1)", "description": "", "templateType": "randrange", "can_override": false}, "massCentrex": {"name": "massCentrex", "group": "Ungrouped variables", "definition": "((a^5/2 - a^5/3 - a^5/4 + a^5/5)*(R0*b*c))/(2*(a^2)*Mass)", "description": "", "templateType": "anything", "can_override": false}, "Mass": {"name": "Mass", "group": "Ungrouped variables", "definition": "(5*{a^2}*{b}*{c}*{R0})/24", "description": "", "templateType": "anything", "can_override": false}, "massCentrey": {"name": "massCentrey", "group": "Ungrouped variables", "definition": "((a^5 - a^5 + a^5/2- a^5/5) *(R0*b^2*c))/(6*a^3*Mass)", "description": "", "templateType": "anything", "can_override": false}, "massCentrez": {"name": "massCentrez", "group": "Ungrouped variables", "definition": "((a^5  - (2*a^5)/2 +  a^5/2 - a^5/5)*(R0*c^2))/(6*(a^2)*Mass)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "r0", "Mass", "massCentrex", "massCentrey", "massCentrez"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "<p>Find the mass of the tetrahedron.</p>\n<p>(enter your answer as an interger or a fraction)</p>", "answer": "5*{a^2}*{b}*{c}*{R0}/24", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "<p>Find the centre of mass of the tetrahedron:</p>\n<p>$\\bar x$ = [[0]]</p>\n<p>$\\bar y$ = [[1]]</p>\n<p>$\\bar z$ = [[2]]</p>", "gaps": [{"type": "jme", "useCustomName": true, "customName": "Gap 0", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{massCentrex}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{massCentrey}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{massCentrez}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Double integral in polar coordinates - concentric circles", "extensions": ["eukleides", "geogebra", "jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18261/"}], "tags": [], "metadata": {"description": "<p>Double integral in polar coordinates - concentric circles</p>", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "<p>Compute the integral&nbsp;</p>\n<p>\\[\\iint_R \\frac{y^2}{\\sqrt{x^2 + y^2}}\\, dx\\, dy\\]&nbsp;</p>\n<p>where $R$ is the region between the circles $x^2 + y^2 = \\var{r1}$ and $x^2 + y^2 = \\var{r2}$.&nbsp;</p>", "advice": "<p>Recall that ew pass to polar coordinates using $x=r\\cos(\\theta)$ and $r\\sin(\\theta)$.</p>\n<p>a) Plug the values above into $ \\frac{y^2}{\\sqrt{x^2 + y^2}}$ we get&nbsp;</p>\n<p>\\[ \\frac{r^2\\sin^2(\\theta)}{\\sqrt{r^2\\cos^2(\\theta) + r^2\\sin^2(\\theta)}} = \\frac{r^2\\sin^2(\\theta)}{r\\sqrt{\\cos^2(\\theta) + \\sin^2(\\theta)}} = r\\sin^2(\\theta).\\]</p>\n<p></p>\n<p>b) The area we are interested is the area between the concentric circles below (this shape is called and annulus)</p>\n<p>{diagram}</p>\n<p>This are can be described by the inequalities&nbsp;</p>\n<p>\\[0&lt;\\theta\\leq 2\\pi \\quad \\mbox{ and }\\quad \\var{r1}&lt;r&lt;\\var{r2}\\]&nbsp;</p>\n<p>in polar coordinates.</p>\n<p></p>\n<p>c) Note that the order the integration does not matter as boundaries for both variables are constants. The integral thus can be written as&nbsp;</p>\n<p>\\[\\int_{\\var{r1}}^{\\var{r2}}\\int_{0}^{2\\pi} r^2\\sin^2(\\theta)\\, d\\theta\\,dr.\\]</p>\n<p></p>\n<p>d)&nbsp;</p>\n<p>\\[\\int_{\\var{r1}}^{\\var{r2}}\\int_{0}^{2\\pi} r^2\\sin^2(\\theta)\\, d\\theta\\,dr = \\int_{\\var{r1}}^{\\var{r2}}r^2 \\int_{0}^{2\\pi} \\sin^2(\\theta)\\, d\\theta\\,dr&nbsp; = -\\int_{\\var{r1}}^{\\var{r2}}r^2 \\left[\\frac{\\sin(2\\theta) - 2\\theta}{4}\\right]_0^{2\\pi}\\,dr&nbsp; <br/>= \\\\[3mm ]\\int_{\\var{r1}}^{\\var{r2}}r^2 \\pi\\,dr = \\pi\\left[\\frac{r^3}{3}\\right]_{\\var{r1}}^{\\var{r2}} &nbsp;= \\pi\\left(\\frac{\\var{r2}^3 - \\var{r1}^3}{3}\\right) = \\var{ans}.\\]</p>", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"r1": {"name": "r1", "group": "Ungrouped variables", "definition": "random(1 .. 3#1)", "description": "", "templateType": "randrange", "can_override": false}, "r2": {"name": "r2", "group": "Ungrouped variables", "definition": "random(r1..4 except r1)", "description": "", "templateType": "anything", "can_override": false}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "(1/3)*pi*(r2^3 - r1^3)", "description": "", "templateType": "anything", "can_override": false}, "diagram": {"name": "diagram", "group": "Ungrouped variables", "definition": "jessiecode(400,400,\"\"\"\n\n  A = point(0,0) <<id: 'O', name: ''>>;\n  C = circle(O,{r1}) <<id: 'C'>>;\n  D = circle(O,{r2}) <<id: 'D'>>;\n\n\"\"\")", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["r1", "r2", "ans", "diagram"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "<p>Rewrite the function $ \\frac{y^2}{\\sqrt{x^2 + y^2}}$ in polar coordinates&nbsp;</p>\n<p></p>", "answer": "r*sin^2(theta)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "r", "value": ""}, {"name": "sin", "value": ""}, {"name": "theta", "value": ""}]}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "<p>Parametrise the region $R$ in polar coordinate</p>\n<p>[[0]]$&lt;\\theta&lt;$ [[1]]&nbsp; and [[2]] $&lt;r&lt;$[[3]]</p>", "gaps": [{"type": "numberentry", "useCustomName": true, "customName": "Gap0", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "0", "maxValue": "0", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "jme", "useCustomName": true, "customName": "Gap1", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "2*pi", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{r1}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{r2}", "maxValue": "{r2}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "<p>Write down the integral in polar coordinates</p>", "answer": "defint(defint(r^2sin^2theta,theta,0,2pi),r,{r1},{r2})", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "r", "value": ""}, {"name": "sin", "value": ""}, {"name": "theta", "value": ""}]}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "<p>Evaluate the integral you wrote in the previous part:</p>\n<p>[[0]]</p>", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "{ans}", "maxValue": "{ans}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "2", "precisionPartialCredit": "50", "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "moment of inertia - cylinder", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18261/"}], "tags": [], "metadata": {"description": "<p>moment of inertia - cylinder</p>", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "<p>Determine the moment of inertia of the cylinder $C$ of uniform density $\\rho = \\var{d}$, height $\\var{h}$, and radius $\\var{a}$ about the axis passing through the centres of its circular faces.</p>", "advice": "<p>We can, naturally, consider this problem in cylindricla coordinates.&nbsp;</p>\n<p>We may assume that the cylinder $C$ sits in the space such that the axis rotation described in the question is the $z$-axis.</p>\n<p>Then $C$ can be described by&nbsp;</p>\n<p>\\[0\\leq r \\leq \\var{a} \\quad \\mbox{and } \\quad 0\\leq \\theta\\leq 2\\pi \\quad\\mbox{and}\\quad 0\\leq z\\leq h.\\]</p>\n<p></p>\n<p>In cylindrical coordinates, the mass element is $dM = \\rho dV = \\rho r\\,d\\theta\\,dr\\, dz$. Also observe that each mass element is at the distance of $r$ to the axis of rotation. Then the moment of inertia is&nbsp;</p>\n<p>\\[I_z = \\int_C r^2 \\, dM = \\int_C r^2\\rho\\, dV =\\iiint_C r^3\\rho\\, d\\theta\\,dr\\, dz =\\\\[3mm] \\int_0^{\\var{h}}\\int_0^{2\\pi}\\int_0^{\\var{a}} r^3\\rho\\, dr\\,d\\theta \\, dz = \\rho\\int_0^{\\var{h}}\\, dz \\int_0^{2\\pi}\\,d\\theta \\int_0^{\\var{a}} r^3\\, dr . \\]</p>\n<p>Note that for the last equality we used the fact that boundaries of the integrals are constants.</p>\n<p></p>\n<p>Thus we obtain&nbsp;</p>\n<p>\\[I_z = \\rho [z]_0^{\\var{h}} [\\theta]_0^{2\\pi}\\left[ \\frac{r^4}{4}\\right]_0^{\\var{a}} = \\frac{1}{2}\\pi\\rho\\times\\var{h}\\times{a^4} = \\simplify{1/2*pi*{d}*{h}*{a}^4}.\\]</p>\n<p>Also note that $I_z = \\frac{1}{2}M\\var{a}^2$ where $M = \\rho V$, with $V=\\pi\\times\\var{a}^2\\times\\var{h}$.&nbsp;</p>", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"d": {"name": "d", "group": "Ungrouped variables", "definition": "random(2 .. 5#1)", "description": "", "templateType": "randrange", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1 .. 3#1)", "description": "", "templateType": "randrange", "can_override": false}, "h": {"name": "h", "group": "Ungrouped variables", "definition": "random(1 .. 5#0.25)", "description": "", "templateType": "randrange", "can_override": false}, "V": {"name": "V", "group": "Ungrouped variables", "definition": "pi*(a^2)*h", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["d", "a", "h", "V"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "1/2*{d}*{V}*{a^2}", "maxValue": "1/2*{d}*{V}*{a^2}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "3", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": " moment of inertia - cylinder-non-uniform", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18261/"}], "tags": [], "metadata": {"description": "<p>moment of inertia - cylinder</p>", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "<p>Determine the moment of inertia of the cylinder $C$ of density varies as $\\rho = \\var{d}xy$, height $\\var{h}$, and radius $\\var{a}$ about the axis passing through the centres of its circular faces.</p>", "advice": "<p>We can, naturally, consider this problem in cylindricla coordinates.&nbsp;</p>\n<p>We may assume that the cylinder $C$ sits in the space such that the axis rotation described in the question is the $z$-axis.</p>\n<p>Then $C$ can be described by&nbsp;</p>\n<p>\\[0\\leq r \\leq \\var{a} \\quad \\mbox{and } \\quad 0\\leq \\theta\\leq 2\\pi \\quad\\mbox{and}\\quad 0\\leq z\\leq h.\\]</p>\n<p>We also have to turn $\\rho(x,y)$ into polar coordinates.&nbsp;</p>\n<p>\\[\\rho(x,y) = \\var{d}(r\\cos\\theta)(r\\sin\\theta) = \\var{d}\\cdot r^2\\cos\\theta\\sin\\theta.\\]</p>\n<p>Then, in cylindrical coordinates, the mass element becomes $dM = \\rho dV = r^2\\cos\\theta\\sin\\theta \\,r\\,d\\theta\\,dr\\, dz$. Also, observe that each mass element is at the distance of $r$ to the axis of rotation. Then the moment of inertia is&nbsp;</p>\n<p>\\[I_z = \\int_C r^2 \\, dM = \\int_C r^2\\rho\\, dV =\\iiint_C \\var{d}\\cdot r^5 \\cos\\theta\\sin\\theta\\, d\\theta\\,dr\\, dz =\\\\[3mm] \\var{d}\\int_0^{\\var{h}}\\int_0^{2\\pi}\\int_0^{\\var{a}} r^5\\cos\\theta\\sin\\theta\\, dr\\,d\\theta \\, dz = \\var{d}\\int_0^{\\var{h}}\\, dz \\int_0^{2\\pi} \\cos\\theta\\sin\\theta\\,d\\theta \\int_0^{\\var{a}} r^5\\, dr . \\]</p>\n<p>Note that for the last equality we used the fact that boundaries of the integrals are constants.</p>\n<p>We can compute the integrals separately as follows:</p>\n<ul>\n<li>\\[\\int_0^{\\var{h}}\\, dz = [z]_0^{\\var{h}} = \\var{h}\\]</li>\n<li>\\[\\int_0^{2\\pi} \\cos\\theta\\sin\\theta\\,d\\theta =&nbsp; \\left[-\\frac{\\cos^2\\theta}{2}\\right]_0^{2\\pi} = \\frac{1-\\cos^2(2\\pi)}{2} =0.\\]</li>\n<li>\\[\\int_0^{\\var{a}} r^5\\, dr = \\left[\\frac{r^6}{6}\\right]_0^{\\var{a}} = \\frac{\\var{a^6}}{6}.\\]</li>\n</ul>\n<p></p>\n<p>Thus we obtain&nbsp;</p>\n<p>\\[I_z = \\var{d}\\times\\var{h}\\times 0\\times \\frac{\\var{a^6}}{6} = 0.\\]</p>\n<p></p>", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"d": {"name": "d", "group": "Ungrouped variables", "definition": "random(2 .. 5#1)", "description": "", "templateType": "randrange", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1 .. 3#1)", "description": "", "templateType": "randrange", "can_override": false}, "h": {"name": "h", "group": "Ungrouped variables", "definition": "random(1 .. 5#0.25)", "description": "", "templateType": "randrange", "can_override": false}, "V": {"name": "V", "group": "Ungrouped variables", "definition": "pi*(a^2)*h", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["d", "a", "h", "V"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "0", "maxValue": "0", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "3", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": true, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "typeendtoleave": false, "startpassword": "", "allowAttemptDownload": false, "downloadEncryptionKey": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "", "end_message": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "results_options": {"printquestions": true, "printadvice": true}, "feedbackmessages": [], "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "inreview"}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "type": "exam", "contributors": [{"name": "Ugur Efem", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18261/"}], "extensions": ["eukleides", "geogebra", "jsxgraph"], "custom_part_types": [], "resources": []}</script>
                <script type="application/json" slot="extension-data">{"eukleides": {"root": "extensions/eukleides", "stylesheets": [], "javascripts": ["eukleides.js"]}, "geogebra": {"root": "extensions/geogebra", "stylesheets": [], "javascripts": ["geogebra.js"]}, "jsxgraph": {"root": "extensions/jsxgraph", "stylesheets": ["jsxgraph.css"], "javascripts": ["jsxgraph.js"]}}</script>
            </numbas-exam>
            
        </div>
	</body>
</html>