// Numbas version: exam_results_page_options {"name": "Ann's copy of Integration", "duration": 0, "percentPass": 0, "navigation": {"onleave": {"action": "none", "message": ""}, "showfrontpage": true, "browse": true, "reverse": true, "preventleave": true, "showresultspage": "oncompletion", "allowregen": true}, "timing": {"allowPause": true, "timedwarning": {"action": "none", "message": ""}, "timeout": {"action": "none", "message": ""}}, "showstudentname": true, "feedback": {"allowrevealanswer": true, "advicethreshold": 0, "intro": "", "showanswerstate": true, "feedbackmessages": [], "showtotalmark": true, "showactualmark": true}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Basic indefinite integrals, Basic definite integrals, integration by substitution

\n

\n

Missing: Area type question, solving diff eq application

"}, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questions": [{"name": "Antiderivatives", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "TEAME UCC", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/351/"}], "parts": [{"scripts": {}, "checkingaccuracy": 0.001, "showpreview": true, "checkingtype": "absdiff", "showCorrectAnswer": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "prompt": "

$f(x) = \\var{a}x - \\var{b}$

", "marks": 1, "expectedvariablenames": [], "type": "jme", "answer": "{a}x^2/2-{b}x+C", "vsetrange": [0, 1], "checkvariablenames": false, "showFeedbackIcon": true}, {"scripts": {}, "checkingaccuracy": 0.001, "showpreview": true, "checkingtype": "absdiff", "showCorrectAnswer": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "prompt": "

$f(x) = \\frac{1}{\\var{c}}+ \\frac{2}{\\var{d}}x^2 - \\frac{3}{\\var{f}}x^3$

", "marks": 1, "expectedvariablenames": [], "type": "jme", "answer": "1/{c}x+2/(3{d})x^3-3x^4/(4{f})+C", "vsetrange": [0, 1], "checkvariablenames": false, "showFeedbackIcon": true}, {"scripts": {}, "checkingaccuracy": 0.001, "showpreview": true, "checkingtype": "absdiff", "showCorrectAnswer": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "prompt": "

$f(x) = e^\\var{g}$

", "marks": 1, "expectedvariablenames": [], "type": "jme", "answer": "e^{g}x+C", "vsetrange": [0, 1], "checkvariablenames": false, "showFeedbackIcon": true}, {"scripts": {}, "checkingaccuracy": 0.001, "showpreview": true, "checkingtype": "absdiff", "showCorrectAnswer": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "prompt": "

$f(x) = e^{\\var{g}x}$

", "marks": 1, "expectedvariablenames": [], "type": "jme", "answer": "e^({g}x)/{g}+C", "vsetrange": [0, 1], "checkvariablenames": false, "showFeedbackIcon": true}], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"f": {"description": "", "group": "Ungrouped variables", "definition": "random(4,5,7,8)", "templateType": "anything", "name": "f"}, "c": {"description": "", "group": "Ungrouped variables", "definition": "random(2..4)", "templateType": "anything", "name": "c"}, "d": {"description": "", "group": "Ungrouped variables", "definition": "random(3,5,7)", "templateType": "anything", "name": "d"}, "g": {"description": "", "group": "Ungrouped variables", "definition": "random(2..5)", "templateType": "anything", "name": "g"}, "a": {"description": "", "group": "Ungrouped variables", "definition": "2*random(2..4)", "templateType": "anything", "name": "a"}, "b": {"description": "", "group": "Ungrouped variables", "definition": "random(1..9 except a)", "templateType": "anything", "name": "b"}}, "metadata": {"description": "

Antiderivatives

\n

rebel 

\n

rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Find the most general antiderivatives of the functions. Use the letter C to represent an unknown constant. 

", "preamble": {"js": "", "css": ""}, "advice": "

Don't forget to include the unknown constant C.

", "rulesets": {}, "variable_groups": [], "ungrouped_variables": ["a", "c", "b", "d", "g", "f"], "tags": ["Rebel", "REBEL", "rebel", "rebelmaths"], "functions": {}, "type": "question"}, {"name": "Definite Integrals", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "TEAME UCC", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/351/"}], "functions": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Definite Integrals

\n

rebel

\n

rebelmaths

\n

Rebelmaths

\n

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "c", "b", "d", "g", "f", "h", "k", "j", "l"], "parts": [{"checkvariablenames": false, "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "prompt": "

$\\int_\\var{a}^\\var{b}(1 + \\var{c}x)\\mathrm{dx}$

", "variableReplacements": [], "checkingaccuracy": 0.001, "answer": "{b}+{c}{b}^2/2-{a}-{a}^2{c}/2", "expectedvariablenames": [], "showCorrectAnswer": true, "checkingtype": "absdiff", "vsetrange": [0, 1], "marks": 1, "showFeedbackIcon": true, "type": "jme", "scripts": {}, "showpreview": true}, {"checkvariablenames": false, "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "prompt": "

$\\int_\\var{d}^\\var{f} (x^2 + \\var{g}x-\\var{h})\\mathrm{dx}$

", "variableReplacements": [], "checkingaccuracy": 0.001, "answer": "{f}^3/3+{g}{f}^2/2-{h}{f}-{d}^3/3-{g}{d}^2/2+{h}{d}", "expectedvariablenames": [], "showCorrectAnswer": true, "checkingtype": "absdiff", "vsetrange": [0, 1], "marks": 1, "showFeedbackIcon": true, "type": "jme", "scripts": {}, "showpreview": true}, {"checkvariablenames": false, "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "prompt": "

$\\int_\\var{j}^\\var{k}(x^3-\\var{l}x^2)\\mathrm{dx}$

", "variableReplacements": [], "checkingaccuracy": 0.001, "answer": "{k}^4/4-{l}{k}^3/3-{j}^4/4+{l}{j}^3/3", "expectedvariablenames": [], "showCorrectAnswer": true, "checkingtype": "absdiff", "vsetrange": [0, 1], "marks": 1, "showFeedbackIcon": true, "type": "jme", "scripts": {}, "showpreview": true}], "preamble": {"css": "", "js": ""}, "tags": ["Rebel", "REBEL", "rebel", "rebelmaths"], "statement": "

Evaluate the integrals: 

", "rulesets": {}, "variable_groups": [], "advice": "

First integrate the function and then substitute in the given limits.

", "variables": {"d": {"name": "d", "definition": "random(-4..0)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "h": {"name": "h", "definition": "random(2..8)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "l": {"name": "l", "definition": "random(2..6)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "j": {"name": "j", "definition": "random(-4..0)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "c": {"name": "c", "definition": "random(2..6)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "f": {"name": "f", "definition": "random(1..4)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "k": {"name": "k", "definition": "random(1..4)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "b": {"name": "b", "definition": "random(1..5)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "g": {"name": "g", "definition": "random(2..6)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "a": {"name": "a", "definition": "random(-4..0)", "templateType": "anything", "group": "Ungrouped variables", "description": ""}}, "type": "question"}, {"name": "Indefinite Integrals", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "TEAME UCC", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/351/"}, {"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}], "tags": ["rebel", "REBEL", "Rebel", "rebelmaths"], "metadata": {"description": "

Indefinite Integrals

\n

rebel

\n

rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Solve the following indefinite integrals, using $C$ to represent an unknown constant.

", "advice": "

Indefinite Integrals

", "rulesets": {}, "variables": {"c": {"name": "c", "group": "Ungrouped variables", "definition": "random(1..9 except a except b)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything"}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "random(1..8 except d)", "description": "", "templateType": "anything"}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(1..8)", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..9 except a)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "c", "b", "d", "f"], "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": "

$\\int(x^4-\\var{a}x^3+\\var{b}x-\\var{c})\\mathrm{dx}$

", "answer": "x^5/5-{a}x^4/4+{b}x^2/2-{c}x+C", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "c", "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": "

$\\int(u+\\var{d})(2u+\\var{f})\\mathrm{du}$

", "answer": "2u^3/3+u^2({f}+2{d})/2+{d}{f}u+C", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "valuegenerators": [{"name": "c", "value": ""}, {"name": "u", "value": ""}]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Definite Integrals 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "TEAME UCC", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/351/"}], "advice": "

First integrate the function and then substitute in the limits given

", "parts": [{"checkingtype": "absdiff", "vsetrange": [0, 1], "showCorrectAnswer": true, "type": "jme", "checkingaccuracy": 0.001, "showFeedbackIcon": true, "answer": "e^2/(e+1)", "showpreview": true, "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "variableReplacements": [], "marks": 1, "scripts": {}, "checkvariablenames": false, "prompt": "

$\\int_0^1(x^e+e^x)\\mathrm{dx}$

", "expectedvariablenames": []}, {"checkingtype": "absdiff", "vsetrange": [0, 1], "showCorrectAnswer": true, "type": "jme", "checkingaccuracy": 0.001, "showFeedbackIcon": true, "answer": "ln({b})+{c}{b}^3/3-{c}/3", "showpreview": true, "variableReplacementStrategy": "originalfirst", "vsetrangepoints": 5, "variableReplacements": [], "marks": 1, "scripts": {}, "checkvariablenames": false, "prompt": "

$\\int_1^\\var{b}(\\frac{x^3+\\var{c}x^6}{x^4})\\mathrm{dx}$

\n

You may have $\\ln$ terms in your answer.

", "expectedvariablenames": []}, {"allowFractions": false, "correctAnswerStyle": "plain", "showCorrectAnswer": true, "type": "numberentry", "correctAnswerFraction": false, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "minValue": "6{a}", "prompt": "

$\\int_0^\\var{d}\\sqrt{\\frac{3}{z}}\\mathrm{dz}$

", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "scripts": {}, "maxValue": "6{a}"}], "variablesTest": {"condition": "", "maxRuns": 100}, "tags": ["Rebel", "REBEL", "rebel", "rebelmaths"], "metadata": {"description": "

Definite Intgerals

\n

rebel

\n

rebelmaths

\n

Rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "rulesets": {}, "variable_groups": [], "functions": {}, "ungrouped_variables": ["a", "c", "b", "d"], "preamble": {"css": "", "js": ""}, "statement": "

Find the following definite integrals

", "variables": {"d": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "d", "definition": "3*a*a"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "b", "definition": "random(2..5)"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "c", "definition": "random(2..4)"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "a", "definition": "random(2..4)"}}, "type": "question"}, {"name": "Julie's copy of Definite integration 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}], "functions": {}, "ungrouped_variables": ["ans1", "ans2", "ans3", "ans4", "b4", "b1", "b2", "d1", "s2", "s7", "s6", "m4", "m3", "m2", "tol", "a1", "tans4", "c1", "tans1", "tans3", "tol1", "p", "t", "w", "n4"], "tags": ["Calculus", "calculus", "definite integration", "integration", "integration by parts", "integration by parts twice", "rebelmaths"], "advice": "\n

a)
\\[I=\\int_1^\\var{b1}\\simplify[std]{({a1} * x ^ 2 + {c1} * x + {d1})^2}\\;dx\\]
Expand the parentheses to obtain:

\n

\\[\\begin{eqnarray*}I &=& \\int_1^\\var{b1} \\simplify[std]{{a1 ^ 2} * x ^ 4 + {2 * a1 * c1} * x ^ 3+ {c1 ^ 2+2*a1*d1} * x ^ 2 + {2 * c1 * d1} * x+ {d1 ^ 2} }\\;dx\\\\ &=&\\left[\\simplify[std]{{a1 ^ 2}/5 * x ^ 5 + {2 * a1 * c1}/4 * x ^ 4+ {c1 ^ 2+2*a1*d1}/3 * x ^ 3 + {2 * c1 * d1}/2 * x^2+ {d1 ^ 2}x }\\right]_1^\\var{b1}\\\\ &=&\\var{tans1}\\\\ \\\\&=&\\var{ans1}\\mbox{ to 2 decimal places} \\end{eqnarray*} \\]

\n

b)
\\[\\begin{eqnarray*}I&=&\\int_0^{\\var{b2}}\\simplify[std]{1/(x+{m2})}\\;dx\\\\ &=&\\left[\\ln(x+\\var{m2})\\right]_0^{\\var{b2}}\\\\ &=& \\ln(\\var{b2+m2})-\\ln(\\var{m2})\\\\ &=&\\ln\\left(\\frac{\\var{b2+m2}}{\\var{m2}}\\right)\\\\ &=&\\var{ans2}\\mbox{ to 2 decimal places} \\end{eqnarray*} \\]

\n

c)
\\[I=\\int_0^\\pi\\simplify[std]{x * ({w} * Sin({m3} * x) + {1 -w} * Cos({m3} * x))}\\;dx\\]
We use integration by parts.

\n

Recall that:
\\[\\int u\\frac{dv}{dx}\\;dx=uv-\\int \\frac{du}{dx}\\;v\\;dx\\]
Here we set $u=x$ and $\\displaystyle \\frac{dv}{dx}=\\simplify[std]{ {w} * Sin({m3} * x) + {1 -w} * Cos({m3} * x)}$

\n

Hence \\[v=\\simplify[std]{({-w}/ {m3}) * Cos({m3} * x) + {1 -w} * (({1-w}/ {m3}) * Sin({m3} * x))}\\]

\n

So \\[\\begin{eqnarray*} I&=&\\left[\\simplify[std]{{-w}*((x / {m3}) * Cos({m3} * x)) + {1 -w} * ((x / {m3}) * Sin({m3} * x))}\\right]_0^\\pi -\\int_0^\\pi\\simplify[std]{ ({ -w} / {m3} )* Cos({m3} * x) + {1 -w} * (1 / {m3} * Sin({m3} * x))}\\;dx\\\\ &=&\\simplify[std]{({-w*cos(m3*pi)})*({pi}/{m3})}-\\left[\\simplify[std]{{ -w} * (1 / {m3 ^ 2})* Sin({m3} * x) -({1 -w} * (1 / {m3 ^ 2}) * Cos({m3} * x))}\\right]_0^\\pi\\\\ &=& \\var{ans3}\\mbox{ to 2 decimal places} \\end{eqnarray*} \\]
d)

\n

\\[I=\\int_0^{\\var{b4}}\\simplify[std]{x ^ {m4} * Exp({n4} * x)}\\;dx\\]

\n

Use integration by parts twice with $u=x^2$ and $\\displaystyle \\frac{dv}{dx}=\\simplify[std]{e^({n4}x)}\\Rightarrow v = \\simplify[std]{1/{n4}e^({n4}x)}$
\\[\\begin{eqnarray*} I&=&\\left[\\simplify[std]{x^2/{n4}Exp({n4} * x)}\\right]_0^{\\var{b4}}+\\simplify[std]{2/{abs(n4)}DefInt(x*Exp({n4} * x),x,0,{b4})}\\\\ &=&\\simplify[std]{{b4^2}/{n4}*e^{p}-2/{n4}}\\left(\\left[\\simplify[std]{x/{n4}*e^({n4}*x)}\\right]_0^{\\var{b4}}+\\simplify[std]{1/{abs(n4)}DefInt(e^({n4}x),x,0,{b4})}\\right)\\\\ &=&\\simplify[std]{{b4^2}/{n4}*e^{p}-2/{n4}}\\left(\\simplify[std]{{b4}/{n4}*e^{p}-1/{n4}}\\left[\\simplify[std]{1/{n4}*e^({n4}*x)}\\right]_0^{\\var{b4}}\\right)\\\\ &=&\\simplify[std]{({b4 ^ 2} / {n4}) * Exp({p}) -(({2 * b4} / {n4 ^ 2}) * Exp({p})) + (2 / {n4 ^ 3}) * (Exp({p}) -1)}\\\\ &=&\\var{ans4}\\mbox{ to 4 decimal places} \\end{eqnarray*} \\]

\n \n", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "parts": [{"prompt": "\n

\\[I=\\int_1^{\\var{b1}}\\simplify[std]{({a1} * x ^ 2 + {c1} * x + {d1})^2}\\;dx\\]

\n

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

\n

Input your answer to 2 decimal places.

\n \n", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "ans1+tol", "minValue": "ans1-tol", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 4, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "

Evaluate the following definite integral.

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"ans1": {"definition": "precround(tans1,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans1", "description": ""}, "ans2": {"definition": "precround(ln(1+b2/m2),2)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans2", "description": ""}, "ans3": {"definition": "precround(tans3,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans3", "description": ""}, "ans4": {"definition": "precround(tans4,4)", "templateType": "anything", "group": "Ungrouped variables", "name": "ans4", "description": ""}, "b4": {"definition": "s7*random(1,2,3)", "templateType": "anything", "group": "Ungrouped variables", "name": "b4", "description": ""}, "b1": {"definition": "random(2..6)", "templateType": "anything", "group": "Ungrouped variables", "name": "b1", "description": ""}, "b2": {"definition": "random(1..20)", "templateType": "anything", "group": "Ungrouped variables", "name": "b2", "description": ""}, "d1": {"definition": "random(-9..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "d1", "description": ""}, "s2": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s2", "description": ""}, "s7": {"definition": "1", "templateType": "anything", "group": "Ungrouped variables", "name": "s7", "description": ""}, "s6": {"definition": "-1", "templateType": "anything", "group": "Ungrouped variables", "name": "s6", "description": ""}, "m4": {"definition": "2", "templateType": "anything", "group": "Ungrouped variables", "name": "m4", "description": ""}, "m3": {"definition": "random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "m3", "description": ""}, "m2": {"definition": "random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "m2", "description": ""}, "tol": {"definition": "0.01", "templateType": "anything", "group": "Ungrouped variables", "name": "tol", "description": ""}, "a1": {"definition": "random(1..7)", "templateType": "anything", "group": "Ungrouped variables", "name": "a1", "description": ""}, "tans4": {"definition": "(e^(p)*(p^2-2*p+2)-2)/(n4^3)", "templateType": "anything", "group": "Ungrouped variables", "name": "tans4", "description": ""}, "c1": {"definition": "t*random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "c1", "description": ""}, "tans1": {"definition": "a1^2*(b1^5-1)/5+a1*c1*(b1^4-1)/2+(2*a1*d1+c1^2)*(b1^3-1)/3+c1*d1*(b1^2-1)+d1^2*(b1-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "tans1", "description": ""}, "tans3": {"definition": "if(w=0,((-1)^(m3)-1)/m3^2,-pi*(-1)^(m3)/m3)", "templateType": "anything", "group": "Ungrouped variables", "name": "tans3", "description": ""}, "tol1": {"definition": "0.0001", "templateType": "anything", "group": "Ungrouped variables", "name": "tol1", "description": ""}, "p": {"definition": "n4*b4", "templateType": "anything", "group": "Ungrouped variables", "name": "p", "description": ""}, "t": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "t", "description": ""}, "w": {"definition": "random(0,1)", "templateType": "anything", "group": "Ungrouped variables", "name": "w", "description": ""}, "n4": {"definition": "s6*random(1,2,3)", "templateType": "anything", "group": "Ungrouped variables", "name": "n4", "description": ""}}, "metadata": {"description": "

Evaluate $\\int_1^{\\,m}(ax ^ 2 + b x + c)^2\\;dx$, $\\int_0^{p}\\frac{1}{x+d}\\;dx,\\;\\int_0^\\pi x \\sin(qx) \\;dx$, $\\int_0^{r}x ^ {2}e^{t x}\\;dx$

\n

rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Julie's copy of Integration 04: Exponential Functions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}], "variablesTest": {"condition": "", "maxRuns": 100}, "rulesets": {}, "preamble": {"css": "", "js": ""}, "metadata": {"description": "

5 indefinite integrals containing exponential functions

\n

rebelmaths

", "licence": "Creative Commons Attribution 4.0 International"}, "functions": {}, "tags": ["rebelmaths"], "variables": {"a2": {"description": "", "definition": "random(2..10 except a1 except 0)", "name": "a2", "group": "Ungrouped variables", "templateType": "anything"}, "a3": {"description": "", "definition": "random(-10..10 except 0 except 1 except -1)", "name": "a3", "group": "Ungrouped variables", "templateType": "anything"}, "a1": {"description": "", "definition": "random(2..10)", "name": "a1", "group": "Ungrouped variables", "templateType": "anything"}, "a5": {"description": "", "definition": "random(2..10)", "name": "a5", "group": "Ungrouped variables", "templateType": "anything"}, "a4": {"description": "", "definition": "random(-10..10 except 0 except 1 except -1)", "name": "a4", "group": "Ungrouped variables", "templateType": "anything"}}, "parts": [{"prompt": "

Integrate $f(x)=e^{\\var{a1}x}$ with respect to $x$. 

", "checkingaccuracy": 0.001, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showpreview": true, "answersimplification": "all", "showCorrectAnswer": true, "answer": "1/{a1}exp({a1}x)+c", "scripts": {}, "showFeedbackIcon": true, "vsetrange": [0, 1], "vsetrangepoints": 5, "marks": 1, "checkingtype": "absdiff", "type": "jme", "expectedvariablenames": [], "checkvariablenames": false}, {"prompt": "

Integrate $f(x)=\\var{a1}e^{\\var{a2}x}$ with respect to $x$. 

", "checkingaccuracy": 0.001, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showpreview": true, "answersimplification": "all", "showCorrectAnswer": true, "answer": "{a1}/{a2}exp({a2}x)+c", "scripts": {}, "showFeedbackIcon": true, "vsetrange": [0, 1], "vsetrangepoints": 5, "marks": 1, "checkingtype": "absdiff", "type": "jme", "expectedvariablenames": [], "checkvariablenames": false}, {"prompt": "

Integrate $f(x)=\\var{a3}\\exp(\\var{a4}x)+\\var{a1}\\exp(\\var{a5}x)$ with respect to $x$. 

", "checkingaccuracy": 0.001, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showpreview": true, "answersimplification": "all", "showCorrectAnswer": true, "answer": "{a3}/{a4}exp({a4}x)+{a1}/{a5}exp({a5}x)+c", "scripts": {}, "showFeedbackIcon": true, "vsetrange": [0, 1], "vsetrangepoints": 5, "marks": 1, "checkingtype": "absdiff", "type": "jme", "expectedvariablenames": [], "checkvariablenames": false}, {"prompt": "

Integrate $f(x)=\\dfrac{2}{\\var{a5}}\\exp(\\var{a1}x)+\\dfrac{1}{\\var{a3}}\\exp(\\var{a4}x)$ with respect to $x$. 

", "checkingaccuracy": 0.001, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showpreview": true, "answersimplification": "all", "showCorrectAnswer": true, "answer": "2/({a1}*{a5})exp({a1}x)+1/({a4}*{a3})exp({a4}x)+c", "scripts": {}, "showFeedbackIcon": true, "vsetrange": [0, 1], "vsetrangepoints": 5, "marks": 1, "checkingtype": "absdiff", "type": "jme", "expectedvariablenames": [], "checkvariablenames": false}], "variable_groups": [], "ungrouped_variables": ["a1", "a3", "a2", "a5", "a4"], "advice": "

The basic results are 

\n

$\\int(e^{x})dx=e^{x}+c$ or $\\int\\exp({x})dx=\\exp({x})+c$
     

\n

$\\int(e^{kx})dx=\\dfrac{1}{k}e^{kx}+c$ or $\\int\\exp({kx})dx=\\dfrac{1}{k}\\exp({kx})+c$

\n

Don't forget the constant!

", "statement": "

The basic results are 

\n

$\\int(e^{x})dx=e^{x}+c$ or $\\int\\exp({x})dx=\\exp({x})+c$
     

\n

$\\int(e^{kx})dx=\\dfrac{1}{k}e^{kx}+c$ or $\\int\\exp({kx})dx=\\dfrac{1}{k}\\exp({kx})+c$

\n

Don't forget the constant!

", "type": "question"}, {"name": "Question 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "TEAME UCC", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/351/"}], "functions": {}, "ungrouped_variables": ["a", "c", "b", "d", "s1", "m", "n", "r"], "tags": ["Calculus", "calculus", "constant of integration", "indefinite integration", "integrals", "integrating fractional powers", "integrating powers", "integration", "rebelmaths", "standard integrals", "Steps", "steps"], "advice": "\n\t \n\t \n\t

Using
\\[\\int \\;x^n\\;dx=\\frac{x^{n+1}}{n+1}+C\\] for any number $n \\neq -1$ we have
\\[\\begin{eqnarray*}\n\t \n\t \\simplify[std]{Int({c}*x^{m}+{d}*x ^ ({b} / {n}),x)} &=&\\simplify[std]{ ({c} / {m + 1}) * x ^ {m + 1} +{d}* x ^ ({b} / {n} + 1) / ({b} / {n} + 1) + C }\\\\\n\t \n\t &=&\\simplify[std]{ ({c} / {m + 1}) * x ^ {m + 1} + ({d*n} / {b + n}) * x ^ ({b + n} / {n}) + C}\n\t \n\t \\end{eqnarray*}\\]

\n\t \n\t \n\t \n\t", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers"], "surdf": [{"pattern": "a/sqrt(b)", "result": "(sqrt(b)*a)/b"}]}, "parts": [{"stepsPenalty": 0, "prompt": "\n\t\t\t

$\\simplify[std]{f(x) = {c}x ^ {m} + {d}*x^({b}/{n})}$

\n\t\t\t

$\\displaystyle \\int\\;f(x)\\,dx=\\;$[[0]]

\n\t\t\t

Input all numbers as integers or fractions and not decimals. Remember to include the constant of integration $C$.

\n\t\t\t

Click on Show steps to get more information. You will not lose any marks by doing so.

\n\t\t\t \n\t\t\t", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"notallowed": {"message": "

Input all numbers as integers or fractions and not decimals.

", "showStrings": false, "strings": ["."], "partialCredit": 0}, "variableReplacements": [], "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "({c}/{m+1})x ^ {m+1} + ({d*n}/{b+n})*x^({n+b}/{n})+C", "marks": 3, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [1, 2]}], "steps": [{"prompt": "

The indefinite integral of a power $x^n$ where $n\\neq -1$ is \\[\\int \\;x^n\\;dx=\\frac{x^{n+1}}{n+1}+C\\]

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "marks": 0, "scripts": {}, "showCorrectAnswer": true, "type": "gapfill"}], "statement": "\n\t

Integrate the following function $f(x)$.

\n\t


Input the constant of integration as $C$.

\n\t \n\t", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"a": {"definition": "random(1..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "s1*random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "d": {"definition": "random(2..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "s1": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s1", "description": ""}, "m": {"definition": "random(3..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "m", "description": ""}, "n": {"definition": "a*b+r", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": ""}, "r": {"definition": "random(1..b-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "r", "description": ""}}, "metadata": {"description": "

\n

indefinite integration

\n

Find $\\displaystyle \\int ax ^ m+ bx^{c/n}\\;dx$.

\n

rebel

\n

rebelmaths

\n

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Definite Integrals 3", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "TEAME UCC", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/351/"}], "functions": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Definite Integrals

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variables": {}, "tags": [], "statement": "

Find the following definite integrals

", "preamble": {"js": "", "css": ""}, "rulesets": {}, "variable_groups": [], "advice": "

Definite Integrals

", "parts": [{"checkvariablenames": false, "expectedvariablenames": [], "variableReplacements": [], "vsetrangepoints": 5, "prompt": "

$\\int_0^1\\cos(\\frac{\\pi t}{2})\\mathrm{dt}$.

\n

To write $\\pi$ in your answer simply write pi.

", "variableReplacementStrategy": "originalfirst", "checkingaccuracy": 0.001, "answer": "2/pi", "showCorrectAnswer": true, "checkingtype": "absdiff", "vsetrange": [0, 1], "marks": 1, "showFeedbackIcon": true, "type": "jme", "scripts": {}, "showpreview": true}, {"checkvariablenames": false, "expectedvariablenames": [], "variableReplacements": [], "vsetrangepoints": 5, "prompt": "

$\\int_0^1\\frac{e^z+1}{e^z+z}\\mathrm{dz}$.

\n

Express your answer using the natural log, ln().

\n

Hint: make a substition using the lower line.

", "variableReplacementStrategy": "originalfirst", "checkingaccuracy": 0.001, "answer": "ln(e+1)", "showCorrectAnswer": true, "checkingtype": "absdiff", "vsetrange": [0, 1], "marks": 1, "showFeedbackIcon": true, "type": "jme", "scripts": {}, "showpreview": true}], "type": "question"}, {"name": "Integration by substitution", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "TEAME UCC", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/351/"}], "functions": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Integration by substitution. Hint given on susbtitution

\n

rebelmaths

"}, "statement": "

Complete the following indefinite integrals using integration by substition and the letter C for any unknown constants.

", "ungrouped_variables": ["c", "a", "f", "d", "b"], "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"c": {"name": "c", "definition": "random(5..12)", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "f": {"name": "f", "definition": "random(3..5 except d)", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "b": {"name": "b", "definition": "random(1..10)", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "a": {"name": "a", "definition": "random(2..6)", "description": "", "group": "Ungrouped variables", "templateType": "anything"}, "d": {"name": "d", "definition": "random(2..9)", "description": "", "group": "Ungrouped variables", "templateType": "anything"}}, "tags": ["rebelmaths"], "preamble": {"js": "", "css": ""}, "rulesets": {}, "variable_groups": [], "advice": "

Use the substitution given

", "parts": [{"checkvariablenames": false, "variableReplacementStrategy": "originalfirst", "showpreview": true, "prompt": "

$\\int \\cos(\\var{a}x) \\mathrm{dx}$ using the substitution $u = \\var{a}x$.

", "variableReplacements": [], "checkingaccuracy": 0.001, "answer": "sin({a}x)/{a} + C", "expectedvariablenames": [], "showCorrectAnswer": true, "checkingtype": "absdiff", "vsetrange": [0, 1], "marks": 1, "showFeedbackIcon": true, "type": "jme", "scripts": {}, "vsetrangepoints": 5}, {"checkvariablenames": false, "variableReplacementStrategy": "originalfirst", "showpreview": true, "prompt": "

$\\int x(\\var{b}+x^2)^\\var{c}\\mathrm{dx}$ using the substitution $u = \\var{b} + x^2$.

", "variableReplacements": [], "checkingaccuracy": 0.001, "answer": "({b}+x^2)^({c}+1)/(2({c}+1))+C", "expectedvariablenames": [], "showCorrectAnswer": true, "checkingtype": "absdiff", "vsetrange": [0, 1], "marks": 1, "showFeedbackIcon": true, "type": "jme", "scripts": {}, "vsetrangepoints": 5}, {"checkvariablenames": false, "variableReplacementStrategy": "originalfirst", "showpreview": true, "prompt": "

$\\int\\frac{\\mathrm{dt}}{(1-\\var{d}t)^\\var{f}}$ using the substitution $u = 1-\\var{d}t$

", "variableReplacements": [], "checkingaccuracy": 0.001, "answer": "1/({d}({f}-1)(1-{d}t)^({f}-1))+C", "expectedvariablenames": [], "showCorrectAnswer": true, "checkingtype": "absdiff", "vsetrange": [0, 1], "marks": 1, "showFeedbackIcon": true, "type": "jme", "scripts": {}, "vsetrangepoints": 5}], "type": "question"}, {"name": "Integration by substitution 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "TEAME UCC", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/351/"}], "variablesTest": {"condition": "", "maxRuns": 100}, "rulesets": {}, "preamble": {"css": "", "js": ""}, "metadata": {"description": "

Integration by susbtitution, no hint given

", "licence": "Creative Commons Attribution 4.0 International"}, "functions": {}, "tags": [], "variables": {"b": {"description": "", "definition": "random(1..8 except a)", "name": "b", "templateType": "anything", "group": "Ungrouped variables"}, "a": {"description": "", "definition": "random(2..6)", "name": "a", "templateType": "anything", "group": "Ungrouped variables"}, "c": {"description": "", "definition": "random(1..9)", "name": "c", "templateType": "anything", "group": "Ungrouped variables"}}, "parts": [{"prompt": "

$\\int e^x\\sqrt{1+e^x}\\mathrm{dx}$

", "checkingaccuracy": 0.001, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showpreview": true, "type": "jme", "showCorrectAnswer": true, "answer": "2(1+e^x)^(3/2)/3+C", "scripts": {}, "vsetrange": [0, 1], "vsetrangepoints": 5, "marks": 1, "checkingtype": "absdiff", "checkvariablenames": false, "expectedvariablenames": [], "showFeedbackIcon": true}, {"prompt": "

$\\int\\frac{\\mathrm{dx}}{\\var{a}x+\\var{b}}$.

\n

Answer in terms of the natural log, represented by ln( ).

", "checkingaccuracy": 0.001, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showpreview": true, "type": "jme", "showCorrectAnswer": true, "answer": "1/{a}ln({a}x+{b})+C", "scripts": {}, "vsetrange": [0, 1], "vsetrangepoints": 5, "marks": 1, "checkingtype": "absdiff", "checkvariablenames": false, "expectedvariablenames": [], "showFeedbackIcon": true}, {"prompt": "

$\\int \\frac{x \\mathrm{dx}}{\\var{c}+x^2}$.

\n

Answer in terms of the natural log, represented by ln( ).

", "checkingaccuracy": 0.001, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showpreview": true, "type": "jme", "showCorrectAnswer": true, "answer": "ln({c}+x^2)/2+C", "scripts": {}, "vsetrange": [0, 1], "vsetrangepoints": 5, "marks": 1, "checkingtype": "absdiff", "checkvariablenames": false, "expectedvariablenames": [], "showFeedbackIcon": true}], "variable_groups": [], "ungrouped_variables": ["c", "b", "a"], "advice": "

integration by Susbtitution

", "statement": "

Evaluate the following indefinite integrals using integration by substitution. Use the letter C to represent any unknown constants.

", "type": "question"}, {"name": "Julie's copy of Definite Integration 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}], "parts": [{"prompt": "\n

\\[I=\\int_0^{\\var{b1}}\\simplify[std]{e^({a}x)}\\;dx\\]

\n

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

\n

Input your answer to 3 decimal places.

\n ", "gaps": [{"showPrecisionHint": false, "type": "numberentry", "minvalue": "ans1-tol", "maxvalue": "ans1+tol", "marks": 1.0}], "type": "gapfill", "marks": 0.0}, {"prompt": "\n

\\[I=\\int_0^{\\var{b2}}\\simplify[std]{1/({b}x+{m2})}\\;dx\\]

\n

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

\n

Input your answer to 3 decimal places.

\n ", "gaps": [{"showPrecisionHint": false, "type": "numberentry", "minvalue": "ans2-tol", "maxvalue": "ans2+tol", "marks": 1.0}], "type": "gapfill", "marks": 0.0}, {"prompt": "\n

\\[I=\\int_0^{\\pi/2}\\simplify[std]{({w} * Sin({m3} * x) + {1 -w} * Cos({m3} * x))}\\;dx\\]

\n

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

\n

Input your answer to 3 decimal places.

\n ", "gaps": [{"showPrecisionHint": false, "type": "numberentry", "minvalue": "ans3-tol", "maxvalue": "ans3+tol", "marks": 1.0}], "type": "gapfill", "marks": 0.0}], "progress": "ready", "question_groups": [{"pickQuestions": 0, "name": "", "questions": [], "pickingStrategy": "all-ordered"}], "showQuestionGroupNames": false, "variables": {"tol1": {"name": "tol1", "definition": 0.0001}, "a": {"name": "a", "definition": "random(-2..2#0.5 except 0)"}, "ans2": {"name": "ans2", "definition": "precround(1/b*(ln(1+b*b2/m2)),3)"}, "s2": {"name": "s2", "definition": "random(1,-1)"}, "b1": {"name": "b1", "definition": "random(-1..2#0.5 except 0)"}, "d1": {"name": "d1", "definition": "random(-9..9)"}, "m3": {"name": "m3", "definition": "random(2..9)"}, "tans3": {"name": "tans3", "definition": "1/m3*((1-w)*sin(m3*pi/2)-w*(cos(m3*pi/2)-1))"}, "b": {"name": "b", "definition": "random(2..5)"}, "ans3": {"name": "ans3", "definition": "precround(tans3,3)"}, "t": {"name": "t", "definition": "random(1,-1)"}, "m2": {"name": "m2", "definition": "random(1..9)"}, "b2": {"name": "b2", "definition": "random(1..20)"}, "w": {"name": "w", "definition": "random(0,1)"}, "ans1": {"name": "ans1", "definition": "precround(tans1,3)"}, "tans1": {"name": "tans1", "definition": "(1/a)*(e^(a*b1)-1)"}, "c1": {"name": "c1", "definition": "t*random(1..9)"}, "tol": {"name": "tol", "definition": 0.001}}, "type": "question", "statement": "

Evaluate the following definite integrals.

", "variable_groups": [], "advice": "\n

 

\n

b)
\\[\\begin{eqnarray*}I&=&\\int_0^{\\var{b2}}\\simplify[std]{1/(x+{m2})}\\;dx\\\\ &=&\\left[\\ln(x+\\var{m2})\\right]_0^{\\var{b2}}\\\\ &=& \\ln(\\var{b2+m2})-\\ln(\\var{m2})\\\\ &=&\\ln\\left(\\frac{\\var{b2+m2}}{\\var{m2}}\\right)\\\\ &=&\\var{ans2}\\mbox{ to 2 decimal places} \\end{eqnarray*} \\]

\n

 

\n ", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "tags": ["Calculus", "calculus", "definite integration", "integration", "integration by parts", "integration by parts twice"], "metadata": {"description": "

Evaluate $\\int_0^{\\,m}e^{ax}\\;dx$, $\\int_0^{p}\\frac{1}{bx+d}\\;dx,\\;\\int_0^{\\pi/2} \\sin(qx) \\;dx$. 

", "notes": "\n \t\t \t\t

3/07/1012:

\n \t\t \t\t

Added tags.

\n \t\t \t\t

Checked calculations.

\n \t\t \t\t

Left tolerances in, as easy to make minor errors in calculations.

\n \t\t \t\t

Improved display in Advice.

\n \t\t \t\t

Some superscripts e.g. the form a^\\var{b} in latex have to be written as a^{\\var{b}} as not displayed properly (if b has a second digit it slips down). Corrected.

\n \t\t \t\t

20/07/2012:

\n \t\t \t\t

Set new tolerace variables, tol=0.01, tol1=0.0001.

\n \t\t \t\t

Can have expressions in Advice of the form $1\\times E$ where E is an expression. This can be remedied by rewriting - but later as not crucial.

\n \t\t \t\t

Added description.

\n \t\t \t\t

\n \t\t \t\t

25/07/2012:

\n \t\t \t\t

 

\n \t\t \t\t

Added tags.

\n \t\t \t\t

A lot of work in this question - Perhaps it would be more managable broken down into two separate questions?

\n \t\t \t\t

 

\n \t\t \t\t

Question appears to be working correctly.

\n \t\t \t\t

 

\n \t\t \t\t

 

\n \t\t \n \t\t", "licence": "Creative Commons Attribution 4.0 International"}, "functions": {}}, {"name": "Julie's copy of Hannah's copy of Indefinite integral by substitution", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}], "functions": {}, "tags": ["Calculus", "Steps", "calculus", "indefinite integration", "integrals", "integration", "integration by substitution", "steps", "substitution"], "advice": "\n\t

This exercise is best solved by using substitution.
Note that if we let $u=\\simplify[std]{{a} * (x ^ 2) + {b}}$ then $du=\\simplify[std]{({2*a} * x)*dx }$
Hence we can replace $xdx$ by $\\frac{1}{\\var{2*a}}du$.

\n\t

Hence the integral becomes:

\n\t

\\[\\begin{eqnarray*} I&=&\\simplify[std]{Int((1/{2*a})u^{m},u)}\\\\ &=&\\simplify[std]{(1/{2*a})u^{m+1}/{m+1}+C}\\\\ &=& \\simplify[std]{({a} * (x ^ 2) + {b})^{m+1}/{2*a*(m+1)}+C} \\end{eqnarray*}\\]

\n\t

A Useful Result
This example can be generalised.
Suppose \\[I = \\int\\; f'(x)g(f(x))\\;dx\\]
The using the substitution $u=f(x)$ we find that $du=f'(x)\\;dx$ and so using the same method as above:
\\[I = \\int g(u)\\;du \\]
And if we can find this simpler integral in terms of $u$ we can replace $u$ by $f(x)$ and get the result in terms of $x$.

\n\t", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "parts": [{"prompt": "\n\t\t\t

\\[I=\\simplify[std]{Int( x*({a} * x ^ 2 + {b})^{m},x)}\\]

\n\t\t\t

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

\n\t\t\t

Input numbers in your answer as integers or fractions and not as decimals.

\n\t\t\t", "gaps": [{"notallowed": {"message": "

Input all numbers as integers or fractions and not as decimals.

", "showstrings": false, "strings": ["."], "partialcredit": 0.0}, "expectedvariablenames": [], "checkingaccuracy": 0.001, "vsetrange": [0.0, 1.0], "vsetrangepoints": 5.0, "checkingtype": "absdiff", "answersimplification": "std", "marks": 3.0, "answer": "({a} * (x ^ 2) + {b})^{m+1}/{2*a*(m+1)}+C", "checkvariablenames": false, "type": "jme"}], "type": "gapfill", "marks": 0.0}], "statement": "\n\t

Find the following integral.

\n\t

Input the constant of integration as $C$.

\n\t \n\t \n\t", "variable_groups": [], "progress": "ready", "type": "question", "variables": {"a": {"definition": "random(1..5)", "name": "a"}, "s1": {"definition": "random(1,-1)", "name": "s1"}, "b": {"definition": "s1*random(1..9)", "name": "b"}, "m": {"definition": "random(4..9)", "name": "m"}}, "metadata": {"notes": "\n\t\t \t\t \t\t

2/08/2012:

\n\t\t \t\t \t\t

Added tags.

\n\t\t \t\t \t\t

Added description.

\n\t\t \t\t \t\t

Checked calculation. OK.

\n\t\t \t\t \t\t

Added information about Show steps in prompt content area. 

\n\t\t \t\t \t\t

Added decimal point as forbidden string and included message in prompt about not entering decimals.

\n\t\t \t\t \t\t

Got rid of a redundant ruleset.

\n\t\t \t\t \t\t

 

\n\t\t \t\t \t\t

 

\n\t\t \t\t \n\t\t \n\t\t", "description": "

Find $\\displaystyle \\int x(a x ^ 2 + b)^{m}\\;dx$

", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Julie's copy of Indefinite integral", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}], "functions": {}, "tags": ["Calculus", "Steps", "calculus", "constant of integration", "indefinite integration", "integration", "integration by substitution", "steps", "substitution"], "advice": "\n\t

Let $y = \\simplify[std]{{a}*x+{d}}$.

\n\t

Then $\\displaystyle x=\\frac{1}{\\var{a}}\\simplify[std]{(y-{d})}$ and so we have the numerator $\\simplify[std]{{b}*x+{c}}$ becomes in terms of $y$:

\n\t

$\\displaystyle \\simplify[std]{{b}*x+{c} = {b}*1/{a}*(y-{d})+{c}= {m}y+{r}}$ and so

\n\t

\\[\\displaystyle \\simplify[std]{({b}*x+{c})/(({a}*x+{d})^{n})} = \\simplify[std]{({m}*y+{r})/(y^{n})={m}/y^{n-1}+{r}/y^{n}}\\]

\n\t

Now,
\\[\\int \\simplify[std]{({b}x+{c})/({a}*x+{d})^{n}} dx = \\int \\left(\\simplify[std]{{m}/y^{n-1}+{r}/y^{n}} \\right)\\frac{dx}{dy} dy \\]

\n\t

Since $\\displaystyle x = \\simplify[std]{(y-{d})/{a}}$ then $\\displaystyle \\frac{dx}{dy} = \\frac{1}{\\var{a}}$.

\n\t

We can now calculate the desired integral:

\n\t

\\[ \\begin{eqnarray*} \\int \\left(\\simplify[std]{{m}/y^{n-1}+{r}/y^{n}}\\right) \\frac{dx}{dy} dy &=&\\frac{1}{\\var{a}}\\left(\\int \\simplify[std]{{m}/y^{n-1}}\\;dy+\\int \\simplify[std]{{r}/y^{n}}\\;dy \\right)\\\\ &=&\\frac{1}{\\var{a}}\\left(\\simplify[std]{{-m}/({n-2}*y^{n-2})+ {-r}/({n-1}*y^{n-1})}\\right) + C \\\\ &=& \\simplify[std]{(-{m})/({a*(n-2)}*({a}*x+{d})^{n-2})+(-{r})/({a*(n-1)}*({a}*x+{d})^{n-1}) + C}\\\\ &=&\\simplify[std]{1/({a}x+{d})^{n-1}*(({-m}/{a*(n-2)})*({a}x+{d})-{r}/({a*(n-1)}))}\\\\ &=&\\simplify[std]{1/({a}x+{d})^{n-1}*(({-m}/{(n-2)})*x+{-m*d*(n-1)-r*(n-2)}/{(n-2)*(n-1)*a})} \\end{eqnarray*} \\]
Hence \\[g(x)=\\simplify[std]{({-m}/{(n-2)})*x+{-m*d*(n-1)-r*(n-2)}/{(n-2)*(n-1)*a}}\\]

\n\t \n\t", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "parts": [{"stepspenalty": 1.0, "prompt": "\n\t\t\t

$I=\\displaystyle \\int \\simplify[std]{({b}*x+{c})/(({a}*x+{d})^{n})} dx$

\n\t\t\t

You are given that \\[I=\\simplify[std]{g(x)*({a}x+{d})^{1-n}}+C\\] for a polynomial $g(x)$. You have to find $g(x)$.

\n\t\t\t

$g(x)=\\;$[[0]]

\n\t\t\t

Remember to input all numbers as integers or fractions.

\n\t\t\t

Click on Show steps to get help if you need it. You will lose 1 mark by doing so.

\n\t\t\t \n\t\t\t", "gaps": [{"notallowed": {"message": "

Do not input numbers as decimals, only as integers without the decimal point, or fractions

", "showstrings": false, "strings": ["."], "partialcredit": 0.0}, "checkingaccuracy": 0.001, "vsetrange": [0.0, 1.0], "vsetrangepoints": 5.0, "checkingtype": "absdiff", "answersimplification": "std", "marks": 3.0, "answer": "({-m}/{n-2})*x-{m*d*(n-1)+r*(n-2)}/{(n-2)*(n-1)*a}", "type": "jme"}], "steps": [{"prompt": "

One way to do this is by substitution, for example $y = \\simplify[std]{{a}*x+{d}}$.

", "type": "information", "marks": 0.0}], "marks": 0.0, "type": "gapfill"}], "statement": "\n\t

Find the following indefinite integral.

\n\t

Input all numbers as integers or fractions, not as decimals.

\n\t

Input the constant of integration as $C$.

\n\t \n\t", "variable_groups": [], "progress": "ready", "type": "question", "variables": {"a": {"definition": "random(2..5)", "name": "a"}, "c": {"definition": "m*d+r", "name": "c"}, "b": {"definition": "m*a", "name": "b"}, "d": {"definition": "random(1..5)", "name": "d"}, "s2": {"definition": "random(1,-1)", "name": "s2"}, "s1": {"definition": "random(1,-1)", "name": "s1"}, "m": {"definition": "s1*random(1..4)", "name": "m"}, "n": {"definition": "random(3..5)", "name": "n"}, "r": {"definition": "s2*random(1..5)", "name": "r"}}, "metadata": {"notes": "\n\t\t \t\t

2/08/2012:

\n\t\t \t\t

Added tags.

\n\t\t \t\t

Added description.

\n\t\t \t\t

Added a Step and message about Show steps included - losing 1 mark if used as it gives the formula for finding the integral. Increased marks to 3 for the question, so that can cope with losing a mark for using Show steps.

\n\t\t \t\t

Checked calculation. OK.

\n\t\t \t\t

Improved display in Advice.

\n\t\t \n\t\t", "description": "

Find the polynomial $g(x)$ such that $\\displaystyle \\int \\frac{ax+b}{(cx+d)^{n}} dx=\\frac{g(x)}{(cx+d)^{n-1}}+C$.

", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Julie's copy of Indefinite integral", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}], "metadata": {"notes": "\n\t\t \t\t

2/08/2012:

\n\t\t \t\t

Added tags.

\n\t\t \t\t

Added description.

\n\t\t \t\t

Corrected mistake in formula for integrating $\\sin(ax)$ in Steps and Advice.

\n\t\t \t\t

Checked calculation. OK.

\n\t\t \t\t

Added decimal point to forbidden strings along with message to user re input of numbers.

\n\t\t \t\t

Message about Show steps included. Also another message about including the constant of integration.

\n\t\t \t\t

Changed checking range from 0 to 1 to 1 to 2 as we can have negative powers of $x$.

\n\t\t \t\t

Improved display of Steps by aligning integral signs.

\n\t\t \n\t\t", "description": "

Find $\\displaystyle \\int ae ^ {bx}+ c\\sin(dx) + px ^ {q}\\;dx$.

", "licence": "Creative Commons Attribution 4.0 International"}, "question_groups": [{"questions": [], "pickingStrategy": "all-ordered", "pickQuestions": 0, "name": ""}], "parts": [{"type": "gapfill", "steps": [{"marks": 0.0, "type": "information", "prompt": "

Note that \\[\\begin{eqnarray*} &\\int& \\;x^n\\;dx&=&\\frac{x^{n+1}}{n+1}+C,\\;\\;n \\neq -1\\\\ &\\int& \\;\\sin(ax)\\;dx &=& -\\frac{1}{a}\\cos(ax)+C\\\\ &\\int& \\;e^{ax}\\;dx &=& \\frac{1}{a}e^{ax}+C\\\\ \\end{eqnarray*}\\]

"}], "stepspenalty": 0.0, "marks": 0.0, "gaps": [{"checkingtype": "absdiff", "vsetrange": [1.0, 2.0], "type": "jme", "checkingaccuracy": 0.001, "answer": "({b}/{a}) * (e ^({a}*x)) + (({(-b1)}/{a1}) * Cos({a1}*x)) + ({a2}/{c3+1}) * (x ^ {(c3 + 1)})+C", "showpreview": true, "notallowed": {"strings": ["."], "partialcredit": 0.0, "showstrings": false, "message": "

Input all numbers as integers or fractions and not decimals.

"}, "answersimplification": "std", "marks": 2.0, "vsetrangepoints": 5.0, "checkvariablenames": false, "expectedvariablenames": []}], "prompt": "\n

$\\simplify[std]{f(x) = {b} * e ^ ({a}*x) + {b1} * Sin({a1}*x) + {a2} * x ^ {c3}}$

\n

$\\displaystyle \\int\\;f(x)\\,dx=\\;$[[0]]

\n

Input all numbers as integers or fractions and not decimals. Remember to include the constant of integration $C$.

\n

Click on Show steps to get more information. You will not lose any marks by doing so.

\n \n"}], "type": "question", "progress": "ready", "variables": {"s2": {"name": "s2", "definition": "random(1,-1)"}, "a": {"name": "a", "definition": "s1*random(2..5)"}, "s5": {"name": "s5", "definition": "random(1,-1)"}, "s1": {"name": "s1", "definition": "random(1,-1)"}, "c3": {"name": "c3", "definition": "s5*random(2..8)"}, "b1": {"name": "b1", "definition": "s3*random(2..9)"}, "b": {"name": "b", "definition": "s2*random(2..9)"}, "a1": {"name": "a1", "definition": "random(2..5)"}, "a2": {"name": "a2", "definition": "s4*random(3..9)"}, "s4": {"name": "s4", "definition": "random(1,-1)"}, "s3": {"name": "s3", "definition": "random(1,-1)"}}, "tags": ["Calculus", "Steps", "calculus", "constant of integration", "exponential function", "indefinite integration", "integrals", "integrating powers", "integration", "integration of exponential function", "integration of powers", "integration of trigonometric functions", "standard integrals", "steps", "trigonometric functions"], "advice": "\n

Note that \\[\\begin{eqnarray*} &\\int& \\;x^n\\;dx&=&\\frac{x^{n+1}}{n+1}+C,\\;\\;n \\neq -1\\\\ &\\int& \\;\\sin(ax)\\;dx &=& -\\frac{1}{a}\\cos(ax)+C\\\\ &\\int& \\;e^{ax}\\;dx &=& \\frac{1}{a}e^{ax}+C\\\\ \\end{eqnarray*}\\]

\n

Splitting the integral into three parts and using the above information we have:
\\[\\begin{eqnarray*}\\simplify[std]{Int({b} * e ^ ({a}*x) + {b1} * Sin({a1}*x) + {a2} * x ^ {c3},x)}&=&\\simplify[std]{Int({b} * e ^ ({a}*x),x)+Int({b1} * Sin({a1}*x),x)+Int({a2} * x ^ {c3},x) }\\\\ &=&\\simplify[std]{({b}/{a}) * (e ^({a}*x)) + (({(-b1)}/{a1}) * Cos({a1}*x)) + ({a2}/{c3+1}) * (x ^ {(c3 + 1)})+C} \\end{eqnarray*}\\]

\n \n", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers"], "surdf": [{"pattern": "a/sqrt(b)", "result": "(sqrt(b)*a)/b"}]}, "variable_groups": [], "statement": "\n

Integrate the following function $f(x)$.

\n

 
Input the constant of integration as $C$.

\n \n", "showQuestionGroupNames": false, "functions": {}}, {"name": "Julie's copy of Indefinite integral", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}], "functions": {}, "statement": "\n\t \n\t \n\t

Find the following indefinite integral.

\n\t \n\t \n\t \n\t

Input the constant of integration as $C$.

\n\t \n\t \n\t \n\t", "progress": "ready", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Find $\\displaystyle \\int \\frac{a}{(bx+c)^n}\\;dx$

", "notes": "\n\t\t \t\t

2/08/2012:

\n\t\t \t\t

Added tags.

\n\t\t \t\t

Added description.

\n\t\t \t\t

Added decimal point to forbidden strings along with message to user re input of numbers.

\n\t\t \t\t

Added a Step and message about Show steps included - losing 1 mark if used as it gives the formula for finding the integral. Increased marks to 3 for the question, so that can cope with losing a mark for using Show steps.

\n\t\t \t\t

Changed accuracy setting to relative difference of 0.00001 as we have negative powers.

\n\t\t \t\t

Checked calculation. OK.

\n\t\t \t\t

Added message in prompt  about including the constant of integration.

\n\t\t \t\t

Noted issue with steps-answer order and the messages/marks generated.

\n\t\t \t\t

Changed numerator to the range 2..5.

\n\t\t \t\t

Improved display in Advice.

\n\t\t \t\t

 

\n\t\t \n\t\t"}, "parts": [{"stepspenalty": 1.0, "gaps": [{"answer": "(-{b})/({a*(n-1)}*({a}*x+{d})^{n-1}) + C", "vsetrangepoints": 5.0, "checkingtype": "reldiff", "vsetrange": [0.0, 1.0], "marks": 3.0, "type": "jme", "notallowed": {"message": "

Input all numbers as integers or fractions and not decimals.

", "strings": ["."], "showstrings": false, "partialcredit": 0.0}, "answersimplification": "std", "checkingaccuracy": 0.0001}], "prompt": "\n\t\t\t

$\\displaystyle \\int \\simplify[std]{{b}/(({a}*x+{d})^{n})} dx= \\phantom{{}}$[[0]]

\n\t\t\t

Input all numbers as integers or fractions and not decimals. Remember to include the constant of integration $C$.

\n\t\t\t

Click on Show steps to get help. You will lose 1 mark by doing so.

\n\t\t\t \n\t\t\t", "marks": 0.0, "type": "gapfill", "steps": [{"marks": 0.0, "type": "information", "prompt": "

 \\[\\int (ax+b)^n \\;dx = \\frac{1}{a(n+1)}(ax+b)^{n+1}+C\\]

"}]}], "variables": {"d": {"name": "d", "definition": "random(1..9)"}, "b": {"name": "b", "definition": "random(2..5)"}, "a": {"name": "a", "definition": "random(2..9)"}, "n": {"name": "n", "definition": "random(3..5)"}}, "tags": ["Calculus", "Steps", "calculus", "constant of integration", "indefinite integration", "integrals", "integration", "integration by substitution", "standard integrals", "steps", "substitution"], "question_groups": [{"pickQuestions": 0, "pickingStrategy": "all-ordered", "name": "", "questions": []}], "type": "question", "variable_groups": [], "advice": "\n\t

Let $y = \\simplify[std]{{a}*x+{d}}$. Then,
\\[\\simplify[std]{{b}/(({a}*x+{d})^{n})} = \\simplify[std]{{b}/(y^{n})}.\\]

\n\t

Now,
\\[\\int \\simplify[std]{{b}/({a}*x+{d})^{n}} dx = \\int \\simplify[std]{{b}/(y^{n})} \\frac{dx}{dy} dy.\\]

\n\t

Rearrange $y = \\simplify[std]{{a}x+{d}}$ to get $\\displaystyle x = \\simplify[std]{(y-{b})/{a}}$, and hence $\\displaystyle\\frac{dx}{dy} = \\frac{1}{\\var{a}}$.

\n\t

$\\displaystyle \\int \\frac{1}{y^n} dx = -\\frac{1}{(n-1)y^{n-1}} + C$ is a standard integral, so we can now calculate the desired integral:

\n\t

\\[\\int \\simplify[std]{{b}/(y^{n})} \\frac{dx}{dy} dy = \\simplify[std]{{b}/({n-1}*y^{n-1})} \\cdot \\frac{1}{\\var{a}} + C = \\simplify[std]{(-{b})/({a*(n-1)}*({a}*x+{d})^{n-1}) + C}.\\]

\n\t \n\t", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"], "surdf": [{"pattern": "a/sqrt(b)", "result": "(sqrt(b)*a)/b"}]}, "showQuestionGroupNames": false}, {"name": "Julie's copy of Indefinite integral by substitution", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}], "parts": [{"prompt": "\n\t\t\t

\\[I=\\simplify[std]{Int( x*({a} * x ^ 2 + {b})^{m},x)}\\]

\n\t\t\t

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

\n\t\t\t

Input numbers in your answer as integers or fractions and not as decimals.

\n\t\t\t

Click on Show steps to get further help. You will lose 1 mark if you do so.

\n\t\t\t \n\t\t\t", "marks": 0.0, "steps": [{"prompt": "

Try the substitution $u=\\simplify[std]{{a} * (x ^ 2) + {b}}$

", "type": "information", "marks": 0.0}], "stepspenalty": 1.0, "gaps": [{"checkingtype": "absdiff", "answersimplification": "std", "checkingaccuracy": 0.001, "notallowed": {"strings": ["."], "message": "

Input all numbers as integers or fractions and not as decimals.

", "partialcredit": 0.0, "showstrings": false}, "type": "jme", "vsetrange": [0.0, 1.0], "marks": 3.0, "vsetrangepoints": 5.0, "answer": "({a} * (x ^ 2) + {b})^{m+1}/{2*a*(m+1)}+C"}], "type": "gapfill"}], "progress": "ready", "question_groups": [{"pickQuestions": 0, "name": "", "questions": [], "pickingStrategy": "all-ordered"}], "metadata": {"description": "

Find $\\displaystyle \\int x(a x ^ 2 + b)^{m}\\;dx$

", "notes": "\n\t\t \t\t

2/08/2012:

\n\t\t \t\t

Added tags.

\n\t\t \t\t

Added description.

\n\t\t \t\t

Checked calculation. OK.

\n\t\t \t\t

Added information about Show steps in prompt content area. 

\n\t\t \t\t

Added decimal point as forbidden string and included message in prompt about not entering decimals.

\n\t\t \t\t

Got rid of a redundant ruleset.

\n\t\t \t\t

 

\n\t\t \t\t

 

\n\t\t \n\t\t", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "variables": {"a": {"name": "a", "definition": "random(1..5)"}, "m": {"name": "m", "definition": "random(4..9)"}, "s1": {"name": "s1", "definition": "random(1,-1)"}, "b": {"name": "b", "definition": "s1*random(1..9)"}}, "tags": ["Calculus", "Steps", "calculus", "indefinite integration", "integrals", "integration", "integration by substitution", "steps", "substitution"], "statement": "\n\t

Find the following integral.

\n\t

Input the constant of integration as $C$.

\n\t \n\t", "advice": "\n\t \n\t \n\t

This exercise is best solved by using substitution.
Note that if we let $u=\\simplify[std]{{a} * (x ^ 2) + {b}}$ then $du=\\simplify[std]{({2*a} * x)*dx }$
Hence we can replace $xdx$ by $\\frac{1}{\\var{2*a}}du$.

\n\t \n\t \n\t \n\t

Hence the integral becomes:

\n\t \n\t \n\t \n\t

\\[\\begin{eqnarray*} I&=&\\simplify[std]{Int((1/{2*a})u^{m},u)}\\\\\n\t \n\t &=&\\simplify[std]{(1/{2*a})u^{m+1}/{m+1}+C}\\\\\n\t \n\t &=& \\simplify[std]{({a} * (x ^ 2) + {b})^{m+1}/{2*a*(m+1)}+C}\n\t \n\t \\end{eqnarray*}\\]

\n\t \n\t \n\t \n\t

A Useful Result
This example can be generalised.
Suppose \\[I = \\int\\; f'(x)g(f(x))\\;dx\\]
The using the substitution $u=f(x)$ we find that $du=f'(x)\\;dx$ and so using the same method as above:
\\[I = \\int g(u)\\;du \\]
And if we can find this simpler integral in terms of $u$ we can replace $u$ by $f(x)$ and get the result in terms of $x$.

\n\t \n\t \n\t \n\t", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "type": "question", "variable_groups": [], "functions": {}}, {"name": "Julie's copy of Indefinite integral by substitution", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "variable_groups": [], "metadata": {"notes": "\n\t\t \t\t \t\t

2/08/2012:

\n\t\t \t\t \t\t

Added tags.

\n\t\t \t\t \t\t

Added description.

\n\t\t \t\t \t\t

Checked calculation. OK.

\n\t\t \t\t \t\t

Added information about Show steps in prompt content area. 

\n\t\t \t\t \t\t

Added decimal point as forbidden string and included message in prompt about not entering decimals.

\n\t\t \t\t \t\t

Got rid of a redundant ruleset. !noLeadingMinus added to std ruleset.

\n\t\t \t\t \t\t

Note that the choice of variables means that the argument of the log answer is always $\\gt 0$ so no need to use abs.

\n\t\t \t\t \t\t

 

\n\t\t \t\t \n\t\t \n\t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "

Find $\\displaystyle \\int \\frac{2ax + b}{ax ^ 2 + bx + c}\\;dx$

"}, "showQuestionGroupNames": false, "advice": "\n\t

This exercise is best solved by using substitution.

\n\t

Note that the numerator $\\simplify[std]{{2 * a} * x + {b}}$ of \\[\\simplify[std]{({2 * a} * x + {b}) / ({a} * x ^ 2 + {b} * x + {c})}\\] is the derivative of the denominator $\\simplify[std]{{a} * x ^ 2 + {b} * x + {c}}$

\n\t

So if you use as your substitution $u=\\simplify[std]{{a} * (x ^ 2) + ({b} * x) + {c}}$ you then have $\\simplify[std]{ du = ({2 * a} * x + {b}) * dx}$

\n\t

Hence we can replace $\\simplify[std]{ ({2 * a} * x + {b}) * dx}$ by $du$

\n\t

Hence the integral becomes:

\n\t

\\[\\begin{eqnarray*} I&=&\\int\\;\\frac{du}{u}\\\\ &=&\\ln(|u|)+C\\\\ &=& \\simplify[std]{ln(abs({a} * (x ^ 2) + ({b} * x) + {c}))+C} \\end{eqnarray*}\\]

\n\t

A Useful Result
This example can be generalised.
Suppose \\[I = \\int\\; \\frac{f'(x)}{f(x)}\\;dx\\]
The using the substitution $u=f(x)$ we find that $du=f'(x)\\;dx$ and so using the same method as above:
\\[I = \\int \\frac{du}{u} = \\ln(|u|)+ C = \\ln(|f(x)|)+C\\]

\n\t", "functions": {}, "progress": "ready", "tags": ["Steps", "calculus", "indefinite integration", "integration", "integration by substitution", "substitution"], "variables": {"test": {"definition": "4*a*c-b^2", "name": "test"}, "f": {"definition": "-a*(1+b1)^2", "name": "f"}, "b": {"definition": "2*a+b1", "name": "b"}, "a": {"definition": "random(1..5)", "name": "a"}, "c": {"definition": "a*b1^2+c1", "name": "c"}, "c1": {"definition": "max(-10,f+1)+random(1..5)", "name": "c1"}, "b1": {"definition": "s1*random(1..5)", "name": "b1"}, "s1": {"definition": "random(1,-1)", "name": "s1"}}, "parts": [{"prompt": "\n\t\t\t

\\[I=\\simplify[std]{Int(({2 * a} * x + {b}) / ({a} * x ^ 2 + {b} * x + {c}),x)}\\]

\n\t\t\t

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

\n\t\t\t

Input the constant of integration as $C$.

\n\t\t\t

Input all numbers as integers or fractions not as decimals.

\n\t\t\t

Click on Show steps if you need help. You will lose 1 mark if you do so.

\n\t\t\t \n\t\t\t \n\t\t\t", "stepspenalty": 1.0, "marks": 0.0, "steps": [{"prompt": "

Try the substitution $u=\\simplify[std]{{a} * (x ^ 2) + ({b} * x) + {c}}$

", "marks": 0.0, "type": "information"}], "type": "gapfill", "gaps": [{"type": "jme", "checkingaccuracy": 0.001, "showpreview": true, "answersimplification": "std", "answer": "ln(abs((({a} * (x ^ 2)) + ({b} * x) + {c})))+C", "notallowed": {"strings": ["."], "partialcredit": 0.0, "message": "

Do not input numbers as decimals, only as integers without the decimal point, or fractions

", "showstrings": false}, "vsetrange": [0.0, 1.0], "vsetrangepoints": 5.0, "marks": 3.0, "checkingtype": "absdiff", "checkvariablenames": false, "expectedvariablenames": []}]}], "question_groups": [{"pickQuestions": 0, "pickingStrategy": "all-ordered", "name": "", "questions": []}], "type": "question", "statement": "\n\t

Find the following integral.

\n\t

Input the constant of integration as $C$.

\n\t

Input all numbers as integers or fractions.

\n\t

 

\n\t \n\t \n\t"}, {"name": "Julie's copy of Indefinite integral by substitution", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "variable_groups": [], "metadata": {"notes": "\n\t\t \t\t

2/08/2012:

\n\t\t \t\t

Added tags.

\n\t\t \t\t

Added description.

\n\t\t \t\t

Checked calculation. OK.

\n\t\t \t\t

Added information about Show steps in prompt content area. 

\n\t\t \t\t

Got rid of a redundant ruleset. !noLeadingMinus added to std ruleset.

\n\t\t \n\t\t", "licence": "Creative Commons Attribution 4.0 International", "description": "

Find $\\displaystyle \\int \\sin(x)(a+ b\\cos(x))^{m}\\;dx$

"}, "showQuestionGroupNames": false, "advice": "\n\t \n\t \n\t

This exercise is best solved by using substitution.
Note that if we let $u=\\simplify[std]{{a}+{b}cos(x)}$ then $du=\\simplify[std]{({-b}*sin(x))*dx }$
Hence we can replace $\\sin(x)\\;dx$ by $\\frac{1}{\\var{-b}}\\;du$.

\n\t \n\t \n\t \n\t

Hence the integral becomes:

\n\t \n\t \n\t \n\t

\\[\\begin{eqnarray*} I&=&\\simplify[std]{Int((1/{-b})u^{m},u)}\\\\\n\t \n\t &=&\\simplify[std]{(1/{-b})u^{m+1}/{m+1}+C}\\\\\n\t \n\t &=& \\simplify[std]{({a}+{b}*cos(x))^{m+1}/{-b*(m+1)}+C}\n\t \n\t \\end{eqnarray*}\\]

\n\t \n\t \n\t \n\t", "functions": {}, "progress": "ready", "tags": ["Calculus", "Steps", "calculus", "constant of integration", "integrals", "integrating trigonometric functions", "integration", "integration by substitution", "steps", "substitution"], "variables": {"b": {"definition": "s1*random(1..9)", "name": "b"}, "m": {"definition": "random(3..9)", "name": "m"}, "s1": {"definition": "random(1,-1)", "name": "s1"}, "a": {"definition": "random(1..9)", "name": "a"}}, "parts": [{"prompt": "\n\t\t\t

\\[I=\\simplify[std]{Int( sin(x)*({a} + {b}*cos(x))^{m},x)}\\]

\n\t\t\t

Input all numbers as integers or fractions.

\n\t\t\t

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

\n\t\t\t

Input the constant of integration as $C$.

\n\t\t\t

Click on Show steps if you need help. You will lose 1 mark if you do so.

\n\t\t\t \n\t\t\t", "stepspenalty": 1.0, "marks": 0.0, "steps": [{"prompt": "

Try the substitution $u=\\simplify[std]{{a}+{b}cos(x)}$

", "marks": 0.0, "type": "information"}], "type": "gapfill", "gaps": [{"notallowed": {"strings": ["."], "partialcredit": 0.0, "message": "

Do not input numbers as decimals, only as integers without the decimal point, or fractions.

", "showstrings": false}, "answer": "({a}+{b}*cos(x))^{m+1}/{-b*(m+1)}+C", "vsetrange": [0.0, 1.0], "vsetrangepoints": 5.0, "marks": 3.0, "answersimplification": "std", "checkingtype": "absdiff", "checkingaccuracy": 0.001, "type": "jme"}]}], "question_groups": [{"pickQuestions": 0, "pickingStrategy": "all-ordered", "name": "", "questions": []}], "type": "question", "statement": "\n\t

Find the following integral.

\n\t

Input the constant of integration as $C$.

\n\t

Input all numbers as integers or fractions not as decimals.

\n\t \n\t"}, {"name": "Julie's copy of Leicester: Integration1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}], "advice": "", "parts": [{"checkingtype": "absdiff", "answer": "{a*c}/{b+c}*x^({b+c}/{c})+C", "vsetrange": [0.0, 1.0], "type": "jme", "checkingaccuracy": 0.001, "answersimplification": "std", "marks": 1.0, "vsetrangepoints": 5.0, "prompt": "\n

$\\displaystyle f(x)=\\simplify[std]{{a}*x^({b}/{c})}$

\n

Input $\\displaystyle \\int f(x)\\;dx$ here.

\n

 

\n ", "notallowed": {"strings": ["."], "partialcredit": 0.0, "showstrings": false, "message": "

Input all numbers as integers or fractions and not as decimals.

"}}, {"checkingtype": "absdiff", "answer": "(1/{b})*({-t[0]}*cos({b}x+{c})+{t[1]}*sin({b}x+{c})+{t[2]}*exp({b}x+{c}))+C", "vsetrange": [0.0, 1.0], "type": "jme", "checkingaccuracy": 0.001, "answersimplification": "std", "marks": 1.0, "vsetrangepoints": 5.0, "prompt": "\n

$f(x)=\\simplify[std]{{t[0]}*sin({b}x+{c})+{t[1]}*cos({b}x+{c})+{t[2]}*exp({b}x+{c})}$

\n

Input $\\displaystyle \\int f(x)\\;dx$ here.

\n "}, {"checkingtype": "absdiff", "answer": "{a*c}/{b}*exp({b}/{c}*x)+C", "vsetrange": [0.0, 1.0], "type": "jme", "checkingaccuracy": 0.001, "answersimplification": "std", "marks": 1.0, "vsetrangepoints": 5.0, "prompt": "\n

$f(x)=\\simplify[std]{{a}exp({b}/{c}*x)}$

\n

Input $\\displaystyle \\int f(x)\\;dx$ here.

\n ", "notallowed": {"strings": ["."], "partialcredit": 0.0, "showstrings": false, "message": "

Input all numbers as integers or fractions and not as decimals.

"}}, {"checkingtype": "absdiff", "answer": "{a1}/{b1}ln(abs({b1}x+{c1}))+C", "vsetrange": [0.0, 1.0], "type": "jme", "checkingaccuracy": 0.001, "answersimplification": "std", "marks": 1.0, "vsetrangepoints": 5.0, "prompt": "\n

$\\displaystyle f(x)=\\simplify[std]{{a1}/({b1}x+{c1})}$

\n

Input $\\displaystyle \\int f(x)\\;dx$ here.

\n

 

\n ", "notallowed": {"strings": ["."], "partialcredit": 0.0, "showstrings": false, "message": "

Input all numbers as integers or fractions and not as decimals.

"}}], "type": "question", "question_groups": [{"questions": [], "pickingStrategy": "all-ordered", "pickQuestions": 0, "name": ""}], "progress": "ready", "tags": [], "metadata": {"notes": "", "description": "

Integrating simple functions.

", "licence": "Creative Commons Attribution 4.0 International"}, "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "variables": {"c1": {"name": "c1", "definition": "chcp(b1,2)"}, "a": {"name": "a", "definition": "random(-9..9 except [-1,0,1])"}, "t": {"name": "t", "definition": "switch(u=1,[1,0,0],u=2,[0,1,0],[0,0,1])"}, "u": {"name": "u", "definition": "random(1,2,3)"}, "b": {"name": "b", "definition": "chcp(c,2)"}, "a1": {"name": "a1", "definition": "random(-9..9 except[0,a])"}, "c": {"name": "c", "definition": "random(2..9)"}, "b1": {"name": "b1", "definition": "random(2..9)"}}, "functions": {"chcp": {"language": "jme", "parameters": [["a", "number"], ["b", "number"]], "type": "number", "definition": "if(gcd(a,b)=1,b,chcp(a,random(2..9)))"}}, "statement": "\n

Integrate the following functions $f(x)$.

\n

Input all numbers as integers or fractions and not as decimals.

\n

In all examples do not forget to include the constant of integration $C$.

\n ", "showQuestionGroupNames": false, "variable_groups": []}, {"name": "Leicester: Integration 2", "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/"}], "functions": {}, "tags": ["integration substitution"], "advice": "", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "parts": [{"notallowed": {"message": "

Input all numbers as integers or fractions and not as decimals.

", "showstrings": false, "strings": ["."], "partialcredit": 0.0}, "prompt": "\n

$\\displaystyle f(x)=\\simplify[std]{({u}*x+{1-u}*(cos({c}x+{d})))*cos({u}*({a}x^2+{b})+{1-u}*(sin({c}x+{d})))}$

\n

Input $\\displaystyle \\int f(x)\\;dx$ here.

\n ", "checkingaccuracy": 0.001, "vsetrange": [0.0, 1.0], "vsetrangepoints": 5.0, "checkingtype": "absdiff", "answersimplification": "std", "marks": 1.0, "answer": "{u}/{2*a}*sin({a}x^2+{b})+{1-u}/{c}*sin(sin({c}x+{d}))+C", "type": "jme"}, {"notallowed": {"message": "

Input all numbers as integers or fractions and not as decimals.

", "showstrings": false, "strings": ["."], "partialcredit": 0.0}, "prompt": "\n

 

\n

$\\displaystyle f(x)=\\simplify[std]{({v}*x^2+{1-v}*(sin({c1}x+{d1})))*exp({v}*({a1}x^3)+{1-v}*(cos({c1}x+{d1})))}$

\n

Input $\\displaystyle \\int f(x)\\;dx$ here.

\n

 

\n ", "checkingaccuracy": 0.001, "vsetrange": [0.0, 1.0], "vsetrangepoints": 5.0, "checkingtype": "absdiff", "answersimplification": "std", "marks": 1.0, "answer": "(1/{3*a1}*{v}-{1}/{c1}*{1-v})*exp({v}*({a1}x^3)+{1-v}*(cos({c1}x+{d1})))+C", "type": "jme"}, {"notallowed": {"message": "

Input all numbers as integers or fractions and not as decimals.

", "showstrings": false, "strings": ["."], "partialcredit": 0.0}, "prompt": "\n

$\\displaystyle f(x)=\\simplify[std]{x^2*({1-u}*({a}+x^3)^({n}/2)+{u}*tan({a1}x^3+{d1}))}$

\n

Input $\\displaystyle \\int f(x)\\;dx$ here.

\n ", "checkingaccuracy": 0.001, "vsetrange": [0.0, 1.0], "vsetrangepoints": 5.0, "checkingtype": "absdiff", "answersimplification": "std", "marks": 1.0, "answer": "{1-u}*{2}/{3*(n+2)}*({a}+x^3)^({n+2}/2)+{u}/{3*a1}*ln(abs(sec({a1}x^3+{d1})))+C", "type": "jme"}], "statement": "\n

Integrate the following functions $f(x)$.

\n

Input all numbers as integers or fractions and not as decimals.

\n

Make sure you include the constant of integration $C$.

\n ", "variable_groups": [], "progress": "ready", "type": "question", "variables": {"a": {"definition": "random(2..8)", "name": "a"}, "c": {"definition": "random(2..9)", "name": "c"}, "b": {"definition": "random(-9..9 except 0)", "name": "b"}, "d": {"definition": "random(-9..9 except 0)", "name": "d"}, "n": {"definition": "random(3..11#2)", "name": "n"}, "a1": {"definition": "random(2..9)", "name": "a1"}, "u": {"definition": "random(0,1)", "name": "u"}, "v": {"definition": "random(0,1)", "name": "v"}, "c1": {"definition": "random(2..9)", "name": "c1"}, "d1": {"definition": "random(2..9)", "name": "d1"}}, "metadata": {"notes": "

Note that we insist that $\\int \\frac{1}{x} \\;dx=\\ln(|u|)+C$ and $\\int \\tan(x) \\;dx=\\ln(|\\sec(u)|)+C$, so that users must input the absolute value as shown. This is crucial in the last part if the integral $\\int x^2 \\tan(x^3+a) \\;dx$ is to be evaluated.

", "description": "

Integration using subsitution

", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Temperature diff eq", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}], "statement": "

The temperature $\\theta(t)$ $(^{\\circ} C)$ of a liquid is described by the following differential equation

\n

$\\var{a}\\frac{d\\theta}{dt}=\\var{b}-t$

\n

Solve the equation subject to the condition $\\theta(t)=\\var{c}^{\\circ}$ when $t=\\var{d}$ seconds.

", "preamble": {"css": "", "js": ""}, "functions": {}, "rulesets": {}, "parts": [{"type": "gapfill", "gaps": [{"checkingtype": "absdiff", "vsetrange": [0, 1], "checkingaccuracy": 0.001, "vsetrangepoints": 5, "scripts": {}, "marks": 1, "expectedvariablenames": [], "type": "jme", "showpreview": true, "showFeedbackIcon": true, "variableReplacements": [], "answer": "{c1}*t-1/({c2})t^2+{F}", "showCorrectAnswer": true, "checkvariablenames": false, "variableReplacementStrategy": "originalfirst"}], "showFeedbackIcon": true, "variableReplacements": [], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "prompt": "

$\\theta(t)$=[[0]]

", "variableReplacementStrategy": "originalfirst"}], "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"F": {"name": "F", "description": "", "templateType": "anything", "definition": "c-b/a*d+d^2/(2*a)", "group": "Ungrouped variables"}, "c": {"name": "c", "description": "", "templateType": "randrange", "definition": "random(10..50#5)", "group": "Ungrouped variables"}, "a": {"name": "a", "description": "", "templateType": "randrange", "definition": "random(5..15#5)", "group": "Ungrouped variables"}, "c1": {"name": "c1", "description": "

c1

", "templateType": "anything", "definition": "b/a", "group": "Ungrouped variables"}, "c2": {"name": "c2", "description": "", "templateType": "anything", "definition": "2a", "group": "Ungrouped variables"}, "b": {"name": "b", "description": "

b

", "templateType": "anything", "definition": "4a", "group": "Ungrouped variables"}, "d": {"name": "d", "description": "", "templateType": "randrange", "definition": "random(1..5#1)", "group": "Ungrouped variables"}}, "metadata": {"description": "", "licence": "None specified"}, "ungrouped_variables": ["b", "a", "c", "d", "F", "c1", "c2"], "advice": "

$\\var{a}\\frac{d\\theta}{dt}=\\var{b}-t$

\n

Divide both sides by $\\var{a}$

\n

$\\frac{d\\theta}{dt}=\\frac{\\var{b}}{\\var{a}}-\\frac{t}{\\var{a}}$

\n

Integrate to get

\n

$\\theta(t)= \\var{c1}t+\\frac{1}{\\var{c2}t^2}+C$

\n

To determine C fill in the condition $\\theta(t)=\\var{c}^{\\circ}$ when $t=\\var{d}$ seconds given.

\n

\n

$\\theta(t)= \\var{c1}t+\\frac{1}{\\var{c2}}t^2+\\var{F}$

", "tags": [], "variable_groups": [], "type": "question"}, {"name": "Integration: Area bounded by the graph of a cubic", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}], "tags": [], "metadata": {"description": "

Question is to calculate the area bounded by a cubic and the $x$-axis. Requires finding the roots by solving a cubic equation. Calculator question

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

This is a calculator question.

\n

--------------------------

", "advice": "

See 13.3, 14.1, and 14.3 for background on areas and (in)definite integration. See previous lectures for differentiation and integration.

\n

\n

\n

\n

As this is a trickier question, here is some detailed advice:

\n

1) Remember to estimate the answer, to help detect errors.

\n

\n

\n

2) To find the minimum and maximum $x$-coordinates of the regions, you need to solve to $f(x)=0$. See Maths 1 for background on this.  One of the solutions is 0 and the other roots are $\\var{xmax}$ and $\\var{xmin}$.

\n

I label these numbers $a$ and $b$ (so I don't have to keep writing them). Also, use your calculator's memory abilities so you don't have to type the numbers over and over again.

\n

\n

\n

3) I then set up the appropriate integral(s) to calculate the area:

\n

Area $ = \\displaystyle \\int_{b}^0 \\simplify{{a}x^3+{b}x^2+{c}x} \\, dx - \\int^{a}_0 \\simplify{{a}x^3+{b}x^2+{c}x} \\, dx$

\n

\n

\n

4) After doing the integration and plugging-in the numbers, you should get $\\var{area_total2}$, which is $\\var{area_total}$, to 3.s.f.

", "rulesets": {}, "variables": {"area_total": {"name": "area_total", "group": "Ungrouped variables", "definition": "siground(area1+area2,3)", "description": "", "templateType": "anything"}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-5..-1#0.1)", "description": "", "templateType": "anything"}, "test": {"name": "test", "group": "Ungrouped variables", "definition": "if(mod(xmax,1)=0,0,\n if(mod(xmin,1)=0,0,\n if(area_total>15,0,\n if(min(xmax,abs(xmin))<0.5,0,1))))", "description": "", "templateType": "anything"}, "area_total2": {"name": "area_total2", "group": "Ungrouped variables", "definition": "area1+area2", "description": "", "templateType": "anything"}, "xmax": {"name": "xmax", "group": "Ungrouped variables", "definition": "(-b + sqrt(b*b-4*a*c))/(2*a)", "description": "", "templateType": "anything"}, "area1": {"name": "area1", "group": "Ungrouped variables", "definition": "-(1/4*a*xmin^4+1/3*b*xmin^3+1/2*c*xmin^2)", "description": "", "templateType": "anything"}, "xmin": {"name": "xmin", "group": "Ungrouped variables", "definition": "(-b - sqrt(b*b-4*a*c))/(2*a)", "description": "", "templateType": "anything"}, "area2": {"name": "area2", "group": "Ungrouped variables", "definition": "-(1/4*a*xmax^4+1/3*b*xmax^3+1/2*c*xmax^2)", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "test=1", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "xmax", "xmin", "area1", "area2", "area_total", "test", "area_total2"], "variable_groups": [], "functions": {"plotgraph": {"parameters": [["q", "number"], ["x1", "number"], ["x2", "number"], ["ymin", "number"], ["ymax", "number"], ["a", "number"], ["b", "number"], ["c", "number"]], "type": "html", "language": "javascript", "definition": "// Shading under a graph! This functions plots a graph of y = a(x-r1)(x-r2)\n// It creates the board, sets it up, then returns an\n// HTML div tag containing the board.\n\n\n// Max and min x and y values for the axis.\nvar xmin = -4;\nvar xmax = 4;\n\n// First, make the JSXGraph board.\nvar div = Numbas.extensions.jsxgraph.makeBoard(\n '500px',\n '500px',\n {\n boundingBox: [xmin,ymax,xmax,ymin],\n axis: false,\n showNavigation: false,\n grid: true\n }\n);\n\n\n\n// div.board is the object created by JSXGraph, which you use to \n// manipulate elements\nvar brd = div.board; \n\n// create the x-axis.\nvar xaxis = brd.create('line',[[0,0],[1,0]], { strokeColor: 'black', fixed: true});\nvar xticks = brd.create('ticks',[xaxis,1],{\n drawLabels: true,\n label: {offset: [-4, -10]},\n minorTicks: 0\n});\n\n// create the y-axis\nvar yaxis = brd.create('line',[[0,0],[0,1]], { strokeColor: 'black', fixed: true });\nvar yticks = brd.create('ticks',[yaxis,1],{\ndrawLabels: true,\nlabel: {offset: [-20, 0.5]},\nminorTicks: 0\n});\n\n\n\n// This function shades in the area below the graph of f\n// between the x values x1 and x2\n\nvar shade = function(f,x1,x2,colour) {\n var dataX1 = [x1,x1];\n var dataY1 = [0,f(x1)];\n\n var dataX2 = [];\n var dataY2 = [];\n for (var i = x1; i <= x2; i = i+0.1) {\n dataX2.push(i);\n dataY2.push(f(i));\n }\n\n var dataX3 = [x2,x2];\n var dataY3 = [f(x2),0];\n\n dataX = dataX1.concat(dataX2).concat(dataX3);\n dataY = dataY1.concat(dataY2).concat(dataY3);\n\nvar shading = brd.create('curve', [dataX,dataY],{strokeWidth:0, fillColor:colour, fillOpacity:0.2});\n\nreturn shading;\n}\n\n\n//Define your functions\nvar f1 = function(x) {\n return a*x+b;\n}\n\nvar f2 = function(x) {\n return a*x*x + c;\n}\n\nvar f3 = function(x) {\n return 0.5*(x-a)*(x-b);\n}\n\nvar f4 = function(x) {\n return a*x*x*x+b*x*x+c*x;\n}\n\n\n//Plot the graph and do shading\nswitch(q) {\n case 1:\n brd.create('functiongraph', [f1]);\n shade(f1,x1,x2, 'red');\n break;\n case 2:\n brd.create('functiongraph', [f2]);\n shade(f2,x1,x2,'red');\n shade(f2,x2,x2+2,'green');\n break;\n case 3:\n brd.create('functiongraph', [f3]);\n shade(f3,x1,x2,'red');\n shade(f3,x2,x2+2,'green');\n break;\n case 4:\n brd.create('functiongraph', [f4]);\n shade(f4,x1,0,'red');\n shade(f4,0,x2,'green');\n break\n}\n\n\n\nreturn div;"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

{plotgraph(4,xmin,xmax,-10,10,a,b,c)}

\n

This is the graph of the function $f(x)=\\simplify{{a}x^3+{b}x^2+{c}x}$. 

\n

\n

What is the area bounded by the graph and the $x$-axis (i.e. the total area of the shaded regions)? [[0]]

\n

Hint: you need to determine the $x$-intercepts before you can do any integration.

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "4", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "{area_total}", "maxValue": "{area_total}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "sigfig", "precision": "3", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}]}, {"name": "Integration: Calculating the area under a curve", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}], "tags": [], "metadata": {"description": "

Two quadratic graphs are sketched with some area beneath them shaded. Question is to determine the area of shaded regions using integration. The first graph's area is all above the $x$-axis. The second graph has some area above and some below the $x$-axis.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "

Main advice is to carefully go through the steps given in lectures: make an estimate, establish the integral(s) required, do the calculations, check your answer.

\n

See ??

", "rulesets": {}, "variables": {"x21": {"name": "x21", "group": "b) quadratic. no neg region", "definition": "random(-4..-2)", "description": "", "templateType": "anything"}, "x31": {"name": "x31", "group": "c quadratic. neg region", "definition": "b3-random(2..3)", "description": "", "templateType": "anything"}, "c4": {"name": "c4", "group": "Ungrouped variables", "definition": "b4+2", "description": "", "templateType": "anything"}, "x32": {"name": "x32", "group": "c quadratic. neg region", "definition": "b3", "description": "", "templateType": "anything"}, "x33": {"name": "x33", "group": "c quadratic. neg region", "definition": "x32+2", "description": "", "templateType": "anything"}, "b3": {"name": "b3", "group": "c quadratic. neg region", "definition": "a3+random(3..4)", "description": "", "templateType": "anything"}, "area3": {"name": "area3", "group": "c quadratic. neg region", "definition": "(x33^3/3 - 0.5*(a3+b3)*x33^2+a3*b3*x33)-2*(x32^3/3 - 0.5*(a3+b3)*x32^2+a3*b3*x32)+(x31^3/3 - 0.5*(a3+b3)*x31^2+a3*b3*x31)", "description": "", "templateType": "anything"}, "c2": {"name": "c2", "group": "b) quadratic. no neg region", "definition": "random(1..4)", "description": "", "templateType": "anything"}, "a4": {"name": "a4", "group": "Ungrouped variables", "definition": "random(-3..-2)", "description": "", "templateType": "anything"}, "x22": {"name": "x22", "group": "b) quadratic. no neg region", "definition": "random(3..5)+x21", "description": "", "templateType": "anything"}, "b1": {"name": "b1", "group": "linear graph (not used)", "definition": "random(1..3)", "description": "", "templateType": "anything"}, "a3": {"name": "a3", "group": "c quadratic. neg region", "definition": "random(-3..-1)", "description": "", "templateType": "anything"}, "a1": {"name": "a1", "group": "linear graph (not used)", "definition": "1", "description": "", "templateType": "anything"}, "b4": {"name": "b4", "group": "Ungrouped variables", "definition": "a4+random(2..3)", "description": "", "templateType": "anything"}, "a2": {"name": "a2", "group": "b) quadratic. no neg region", "definition": "1", "description": "", "templateType": "anything"}, "x11": {"name": "x11", "group": "linear graph (not used)", "definition": "random(1..2)", "description": "", "templateType": "anything"}, "area2": {"name": "area2", "group": "b) quadratic. no neg region", "definition": "(a2*x22^3/3+c2*x22)-(a2*x21^3/3+c2*x21)", "description": "", "templateType": "anything"}, "x12": {"name": "x12", "group": "linear graph (not used)", "definition": "random(1..4) + x11", "description": "", "templateType": "anything"}, "x41": {"name": "x41", "group": "Ungrouped variables", "definition": "a4", "description": "", "templateType": "anything"}, "x42": {"name": "x42", "group": "Ungrouped variables", "definition": "b4", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a4", "b4", "c4", "x41", "x42"], "variable_groups": [{"name": "linear graph (not used)", "variables": ["x11", "x12", "a1", "b1"]}, {"name": "b) quadratic. no neg region", "variables": ["x21", "x22", "a2", "c2", "area2"]}, {"name": "c quadratic. neg region", "variables": ["a3", "b3", "x31", "x32", "x33", "area3"]}], "functions": {"plotgraph": {"parameters": [["q", "number"], ["x1", "number"], ["x2", "number"], ["ymin", "number"], ["ymax", "number"], ["a", "number"], ["b", "number"], ["c", "number"]], "type": "html", "language": "javascript", "definition": "// Shading under a graph! This functions plots a graph of y = a(x-r1)(x-r2)\n// It creates the board, sets it up, then returns an\n// HTML div tag containing the board.\n\n\n// Max and min x and y values for the axis.\nvar xmin = -7;\nvar xmax = 7;\n\n// First, make the JSXGraph board.\nvar div = Numbas.extensions.jsxgraph.makeBoard(\n '500px',\n '500px',\n {\n boundingBox: [xmin,ymax,xmax,ymin],\n axis: false,\n showNavigation: false,\n grid: true\n }\n);\n\n\n\n// div.board is the object created by JSXGraph, which you use to \n// manipulate elements\nvar brd = div.board; \n\n// create the x-axis.\nvar xaxis = brd.create('line',[[0,0],[1,0]], { strokeColor: 'black', fixed: true});\nvar xticks = brd.create('ticks',[xaxis,1],{\n drawLabels: true,\n label: {offset: [-4, -10]},\n minorTicks: 0\n});\n\n// create the y-axis\nvar yaxis = brd.create('line',[[0,0],[0,1]], { strokeColor: 'black', fixed: true });\nyticks = brd.create('ticks',[yaxis,5],{\ndrawLabels: true,\nlabel: {offset: [-20, 0]},\nminorTicks: 4\n});\n\n\n\n// This function shades in the area below the graph of f\n// between the x values x1 and x2\n\nvar shade = function(f,x1,x2,colour) {\n var dataX1 = [x1,x1];\n var dataY1 = [0,f(x1)];\n\n var dataX2 = [];\n var dataY2 = [];\n for (var i = x1; i <= x2; i = i+0.1) {\n dataX2.push(i);\n dataY2.push(f(i));\n }\n\n var dataX3 = [x2,x2];\n var dataY3 = [f(x2),0];\n\n dataX = dataX1.concat(dataX2).concat(dataX3);\n dataY = dataY1.concat(dataY2).concat(dataY3);\n\nvar shading = brd.create('curve', [dataX,dataY],{strokeWidth:0, fillColor:colour, fillOpacity:0.2});\n\nreturn shading;\n}\n\n\n//Define your functions\nvar f1 = function(x) {\n return a*x+b;\n}\n\nvar f2 = function(x) {\n return a*x*x + c;\n}\n\nvar f3 = function(x) {\n return (x-a)*(x-b);\n}\n\nvar f4 = function(x) {\n return 0.5*(x-a)*(x-b)*(x-c);\n}\n\n\n//Plot the graph and do shading\nswitch(q) {\n case 1:\n brd.create('functiongraph', [f1]);\n shade(f1,x1,x2, 'red');\n break;\n case 2:\n brd.create('functiongraph', [f2]);\n shade(f2,x1,x2,'red');\n break;\n case 3:\n brd.create('functiongraph', [f3]);\n shade(f3,x1,x2,'red');\n shade(f3,x2,x2+2,'green');\n break;\n case 4:\n brd.create('functiongraph', [f4]);\n shade(f4,x1,x2,'red');\n shade(f4,x2,x2+2,'green');\n break\n}\n\n\n\nreturn div;"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

{plotgraph(2,x21,x22,-5,25,a2,0,c2)}

\n

This is the graph of the function $f(x) = \\simplify{{a2}*x^2+{c2}}$.

\n

Use integration to calculate the area of the shaded region. Give your answer without any rounding.

\n

[[0]]

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

{plotgraph(3,x31,x32,-6,15,a3,b3,0)}

\n

This curve has equation $y = \\simplify{x^2-{a3+b3}*x + {a3*b3}}$.

\n

Calculate the total area of the shaded regions. Give your answer without any rounding.  (Remember this is a non-calculator question!)

\n

[[0]]

\n

\n

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2.5", "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minValue": "area3", "maxValue": "area3", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}]}, {"name": "Integration: Determining value of integrals given areas under a graph", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}], "metadata": {"description": "

Graphs are given with areas underneath them shaded. The area of the shaded regions are given. From this, the value of various integrals are to be deduced.

", "licence": "Creative Commons Attribution 4.0 International"}, "variablesTest": {"maxRuns": 100, "condition": ""}, "variable_groups": [], "rulesets": {}, "statement": "

This is a non-calculator question.

", "advice": "

See Lecture 12.4 and Workshop 12.5.

\n

Key fact is that when integrating $f$, you can imagine $f$ represents velocity and you're being asked for changes in position.

", "preamble": {"css": "", "js": ""}, "variables": {"ar42": {"name": "ar42", "definition": "siground(0.5*( ( 1/4*(x42)^4 - 1/3*(a4+b4+c4)*(x42)^3 + 1/2*(a4*b4+a4*c4+b4*c4)*(x42)^2 - a4*b4*c4*(x42) ) - ( 1/4*(x42+2)^4 - 1/3*(a4+b4+c4)*(x42+2)^3 + 1/2*(a4*b4+a4*c4+b4*c4)*(x42+2)^2 - a4*b4*c4*(x42+2) ) ),3)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "a3": {"name": "a3", "definition": "random(-3..-1)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "ar31": {"name": "ar31", "definition": "siground(-0.5*( (1/3*(x32)^3 - 1/2*(a3+b3)*(x32)^2 + a3*b3*(x32) ) - (1/3*(x31)^3 - 1/2*(a3+b3)*(x31)^2 + a3*b3*(x31)) ),3)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "a4": {"name": "a4", "definition": "random(-4..-1)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "x11": {"name": "x11", "definition": "0", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "b3": {"name": "b3", "definition": "a3+random(3..4)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "a1": {"name": "a1", "definition": "1", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "c2": {"name": "c2", "definition": "random(1..2)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "c4": {"name": "c4", "definition": "b4+2", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "ar21": {"name": "ar21", "definition": "siground((1/3*a2*x22^3 + c2*x22)-(1/3*a2*x21^3 + c2*x21),3)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "ar1": {"name": "ar1", "definition": "(0.5*a1*x12^2 + b1*x12) - (0.5*a1*x11^2 + b1*x11)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "b4": {"name": "b4", "definition": "a4+random(1..3)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "x42": {"name": "x42", "definition": "b4", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "x21": {"name": "x21", "definition": "random(-4..-2)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "b1": {"name": "b1", "definition": "random(1..4)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "x41": {"name": "x41", "definition": "a4", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "ar41": {"name": "ar41", "definition": "siground(0.5*( ( 1/4*(x42)^4 - 1/3*(a4+b4+c4)*(x42)^3 + 1/2*(a4*b4+a4*c4+b4*c4)*(x42)^2 - a4*b4*c4*(x42) ) - ( 1/4*(x41)^4 - 1/3*(a4+b4+c4)*(x41)^3 + 1/2*(a4*b4+a4*c4+b4*c4)*(x41)^2 - a4*b4*c4*(x41) ) ),3)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "x32": {"name": "x32", "definition": "b3", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "ar32": {"name": "ar32", "definition": "siground(0.5*( (1/3*(x32+2)^3 - 1/2*(a3+b3)*(x32+2)^2 + a3*b3*(x32+2) ) - (1/3*(x32)^3 - 1/2*(a3+b3)*(x32)^2 + a3*b3*(x32)) ),3)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "a2": {"name": "a2", "definition": "1", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "ar22": {"name": "ar22", "definition": "siground((1/3*a2*(x22+2)^3 + c2*(x22+2))-(1/3*a2*x22^3 + c2*x22),3)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "x12": {"name": "x12", "definition": "random(2..5) + x11", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "x31": {"name": "x31", "definition": "b3-random(2..3)", "description": "", "templateType": "anything", "group": "Ungrouped variables"}, "x22": {"name": "x22", "definition": "random(1..4 except 2)+x21", "description": "", "templateType": "anything", "group": "Ungrouped variables"}}, "tags": [], "functions": {"plotgraph": {"type": "html", "definition": "// Shading under a graph! This functions plots a graph of y = a(x-r1)(x-r2)\n// It creates the board, sets it up, then returns an\n// HTML div tag containing the board.\n\n\n// Max and min x and y values for the axis.\nvar xmin = -7;\nvar xmax = 7;\n\n// First, make the JSXGraph board.\nvar div = Numbas.extensions.jsxgraph.makeBoard(\n '300px',\n '250px',\n {\n boundingBox: [xmin,ymax,xmax,ymin],\n axis: false,\n showNavigation: false,\n grid: true\n }\n);\n\n\n\n// div.board is the object created by JSXGraph, which you use to \n// manipulate elements\nvar brd = div.board; \n\n// create the x-axis.\nvar xaxis = brd.create('axis',[[0,0],[1,0]],\n {name:'t', withLabel: false, label: {position:'rt', offset: [-10, 5]}}\n\t\t\t);\n/*var xticks = brd.create('ticks',[xaxis,1],{\n drawLabels: true,\n label: {offset: [-4, -10]},\n minorTicks: 0\n});\n*/\n\n// create the y-axis\nvar yaxis = brd.create('axis',[[0,0],[0,1]],\n {name:'f', withLabel: false, label: {offset: [-10, 220]}}\n );\n/*var yticks = brd.create('ticks',[yaxis,1],{\ndrawLabels: true,\nlabel: {offset: [-20, 0]},\nminorTicks: 0\n});\n*/\n\n\n// This function shades in the area below the graph of f\n// between the x values x1 and x2\n\nvar shade = function(f,x1,x2,colour) {\n var dataX1 = [x1,x1];\n var dataY1 = [0,f(x1)];\n\n var dataX2 = [];\n var dataY2 = [];\n for (var i = x1; i <= x2; i = i+0.1) {\n dataX2.push(i);\n dataY2.push(f(i));\n }\n\n var dataX3 = [x2,x2];\n var dataY3 = [f(x2),0];\n\n dataX = dataX1.concat(dataX2).concat(dataX3);\n dataY = dataY1.concat(dataY2).concat(dataY3);\n\nvar shading = brd.create('curve', [dataX,dataY],{strokeWidth:0, fillColor:colour, fillOpacity:0.2});\n\nreturn shading;\n}\n\n\n//Define your functions\nvar f1 = function(x) {\n return a*x+b;\n}\n\nvar f2 = function(x) {\n return a*x*x + c;\n}\n\nvar f3 = function(x) {\n return 0.5*(x-a)*(x-b);\n}\n\nvar f4 = function(x) {\n return 0.5*(x-a)*(x-b)*(x-c);\n}\n\n\n//Plot the graph and do shading\nswitch(q) {\n case 1:\n brd.create('functiongraph', [f1]);\n shade(f1,x1,x2, 'red');\n break;\n case 2:\n brd.create('functiongraph', [f2]);\n shade(f2,x1,x2,'red');\n shade(f2,x2,x2+2,'green');\n break;\n case 3:\n brd.create('functiongraph', [f3]);\n shade(f3,x1,x2,'red');\n shade(f3,x2,x2+2,'green');\n break;\n case 4:\n brd.create('functiongraph', [f4]);\n shade(f4,x1,x2,'red');\n shade(f4,x2,x2+2,'green');\n break\n}\n\n\n\nreturn div;", "language": "javascript", "parameters": [["q", "number"], ["x1", "number"], ["x2", "number"], ["ymin", "number"], ["ymax", "number"], ["a", "number"], ["b", "number"], ["c", "number"]]}}, "parts": [{"showCorrectAnswer": true, "scripts": {}, "variableReplacements": [], "marks": 0, "prompt": "

{plotgraph(2,x21,x22,-5,25,a2,0,c2)}

\n

\n

This is the graph of a function $f(x)$.

\n

The area of the left shaded region is $\\var{ar21}$. The area of the right shaded region is $\\var{ar22}$.

\n

What is $\\displaystyle \\int_{\\var{x22}}^{\\var{x22+2}} f(x) \\, \\textrm{d}x $ equal to? [[0]]

\n

What is $\\displaystyle \\int_{\\var{x21}}^{\\var{x22+2}} f(x) \\, \\textrm{d}x $ equal to? [[1]]

\n

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

\n

{plotgraph(3,x31,x32,-3,7,a3,b3,0)}

\n

\n

This is the graph of a function $g$.

\n

The area of the left shaded region is $\\var{ar31}$. The area of the right shaded region is $\\var{ar32}$.

\n

What is $\\displaystyle \\int_{\\var{x31}}^{\\var{x32}} g(x) \\, \\textrm{d}x $ equal to? [[0]]

\n

What is $\\displaystyle \\int_{\\var{x31}}^{\\var{x32+2}} g(x) \\, \\textrm{d}x $ equal to? [[1]]

\n

", "type": "gapfill", "variableReplacementStrategy": "originalfirst", "gaps": [{"type": "numberentry", "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "mustBeReducedPC": 0, "minValue": "{-ar31}", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "mustBeReduced": false, "variableReplacements": [], "allowFractions": false, "marks": "1", "correctAnswerStyle": "plain", "maxValue": "{-ar31}", "showFeedbackIcon": true}, {"type": "numberentry", "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "mustBeReducedPC": 0, "minValue": "{ar32-ar31}", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "mustBeReduced": false, "variableReplacements": [], "allowFractions": false, "marks": "2", "correctAnswerStyle": "plain", "maxValue": "{ar32-ar31}", "showFeedbackIcon": true}], "showFeedbackIcon": true}], "ungrouped_variables": ["a1", "b1", "x11", "x12", "ar1", "a2", "c2", "x22", "x21", "ar21", "ar22", "a3", "b3", "x31", "x32", "ar31", "ar32", "a4", "b4", "c4", "x41", "x42", "ar41", "ar42"], "type": "question"}, {"name": "Integration: Setting up the integral to calculate the area under a graph", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}], "tags": [], "metadata": {"description": "

Graphs are given with areas underneath them shaded. The student is asked to select the correct integral which calculates its area.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "", "advice": "

See Lecture 14.3 and 14.5 for background and examples.

", "rulesets": {}, "variables": {"a3": {"name": "a3", "group": "Ungrouped variables", "definition": "random(-3..-1)", "description": "", "templateType": "anything"}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "1", "description": "", "templateType": "anything"}, "b4": {"name": "b4", "group": "Ungrouped variables", "definition": "a4+random(2..3)", "description": "", "templateType": "anything"}, "x41": {"name": "x41", "group": "Ungrouped variables", "definition": "a4", "description": "", "templateType": "anything"}, "x42": {"name": "x42", "group": "Ungrouped variables", "definition": "b4", "description": "", "templateType": "anything"}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "1", "description": "", "templateType": "anything"}, "a4": {"name": "a4", "group": "Ungrouped variables", "definition": "random(-3..-2)", "description": "", "templateType": "anything"}, "x12": {"name": "x12", "group": "Ungrouped variables", "definition": "random(1..4) + x11", "description": "", "templateType": "anything"}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything"}, "x32": {"name": "x32", "group": "Ungrouped variables", "definition": "b3", "description": "", "templateType": "anything"}, "x11": {"name": "x11", "group": "Ungrouped variables", "definition": "random(1..2)", "description": "", "templateType": "anything"}, "b3": {"name": "b3", "group": "Ungrouped variables", "definition": "a3+random(3..4)", "description": "", "templateType": "anything"}, "x31": {"name": "x31", "group": "Ungrouped variables", "definition": "b3-random(2..3)", "description": "", "templateType": "anything"}, "x22": {"name": "x22", "group": "Ungrouped variables", "definition": "random(1..4 except 2)+x21", "description": "", "templateType": "anything"}, "c2": {"name": "c2", "group": "Ungrouped variables", "definition": "random(1..2)", "description": "", "templateType": "anything"}, "x21": {"name": "x21", "group": "Ungrouped variables", "definition": "random(-4..-2)", "description": "", "templateType": "anything"}, "c4": {"name": "c4", "group": "Ungrouped variables", "definition": "b4+2", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["x11", "x12", "a1", "b1", "x21", "x22", "a2", "c2", "a3", "b3", "x31", "x32", "a4", "b4", "c4", "x41", "x42"], "variable_groups": [], "functions": {"plotgraph": {"parameters": [["q", "number"], ["x1", "number"], ["x2", "number"], ["ymin", "number"], ["ymax", "number"], ["a", "number"], ["b", "number"], ["c", "number"]], "type": "html", "language": "javascript", "definition": "// Shading under a graph! This functions plots a graph of y = a(x-r1)(x-r2)\n// It creates the board, sets it up, then returns an\n// HTML div tag containing the board.\n\n\n// Max and min x and y values for the axis.\nvar xmin = -7;\nvar xmax = 7;\n\n// First, make the JSXGraph board.\nvar div = Numbas.extensions.jsxgraph.makeBoard(\n '300px',\n '250px',\n {\n boundingBox: [xmin,ymax,xmax,ymin],\n axis: false,\n showNavigation: false,\n grid: true\n }\n);\n\n\n\n// div.board is the object created by JSXGraph, which you use to \n// manipulate elements\nvar brd = div.board; \n\n// create the x-axis.\nvar xaxis = brd.create('line',[[0,0],[1,0]], { strokeColor: 'black', fixed: true});\nvar xticks = brd.create('ticks',[xaxis,1],{\n drawLabels: true,\n label: {offset: [-4, -10]},\n minorTicks: 0\n});\n\n// create the y-axis\nvar yaxis = brd.create('line',[[0,0],[0,1]], { strokeColor: 'black', fixed: true });\n/*var yticks = brd.create('ticks',[yaxis,1],{\ndrawLabels: true,\nlabel: {offset: [-20, 0]},\nminorTicks: 0\n});\n*/\n\n\n// This function shades in the area below the graph of f\n// between the x values x1 and x2\n\nvar shade = function(f,x1,x2,colour) {\n var dataX1 = [x1,x1];\n var dataY1 = [0,f(x1)];\n\n var dataX2 = [];\n var dataY2 = [];\n for (var i = x1; i <= x2; i = i+0.1) {\n dataX2.push(i);\n dataY2.push(f(i));\n }\n\n var dataX3 = [x2,x2];\n var dataY3 = [f(x2),0];\n\n dataX = dataX1.concat(dataX2).concat(dataX3);\n dataY = dataY1.concat(dataY2).concat(dataY3);\n\nvar shading = brd.create('curve', [dataX,dataY],{strokeWidth:0, fillColor:colour, fillOpacity:0.2});\n\nreturn shading;\n}\n\n\n//Define your functions\nvar f1 = function(x) {\n return a*x+b;\n}\n\nvar f2 = function(x) {\n return a*x*x + c;\n}\n\nvar f3 = function(x) {\n return 0.5*(x-a)*(x-b);\n}\n\nvar f4 = function(x) {\n return 0.5*(x-a)*(x-b)*(x-c);\n}\n\n\n//Plot the graph and do shading\nswitch(q) {\n case 1:\n brd.create('functiongraph', [f1]);\n shade(f1,x1,x2, 'red');\n break;\n case 2:\n brd.create('functiongraph', [f2]);\n shade(f2,x1,x2,'red');\n shade(f2,x2,x2+2,'green');\n break;\n case 3:\n brd.create('functiongraph', [f3]);\n shade(f3,x1,x2,'red');\n shade(f3,x2,x2+2,'green');\n break;\n case 4:\n brd.create('functiongraph', [f4]);\n shade(f4,x1,x2,'red');\n shade(f4,x2,x2+2,'green');\n break\n}\n\n\n\nreturn div;"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

(i) {plotgraph(1,x11,x12,-1,10,a1,b1,0)}

\n

This is the graph of the function $f(x) = \\simplify{{a1}*x+{b1}}$.

\n

Which integral corresponds to the area of the shaded region? [[0]]

\n

\n

(ii) {plotgraph(2,x21,x22,-5,25,a2,0,c2)}

\n

This is the graph of the function $f(x) = \\simplify{{a2}*x^2+{c2}}$.

\n

Which integral will calculate the area of the left region? [[1]]

\n

Which integral gives the total area of both shaded regions? [[2]]

\n

\n

(iii) {plotgraph(3,x31,x32,-3,7,a3,b3,0)}

\n

This curve has equation $y = \\frac{1}{2}\\simplify{(x-{a3})*(x-{b3})}$.

\n

Which integral gives the area of the left shaded region? [[3]]

\n

Which of these calculates the total area of the two shaded regions? [[4]]

\n

\n

(iv) {plotgraph(4,x41,x42,-3,7,a4,b4,c4)}

\n

This is the graph of some function $f(x)$. 

\n

Which of the following gives the total area of the shaded regions? [[5]]

\n

", "gaps": [{"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minMarks": "1", "maxMarks": "1", "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["

$\\int^{\\var{x12}}_{\\var{x11}}\\simplify{{a1}*x + {b1}} \\, \\textrm{d}x$

", "

$\\int^{\\var{x11}}_{\\var{x12}}\\simplify{{b1}*x + {a1}} \\, \\textrm{d}x$

", "

-$\\int^{\\var{x12}}_{\\var{x11}}\\simplify{{a1}*x + {b1}} \\, \\textrm{d}x$

", "

$\\int \\simplify{{a1}*x + {b1}} \\, \\textrm{d}x$

"], "matrix": ["1", 0, 0, 0], "distractors": ["", "", "", ""]}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minMarks": "1", "maxMarks": "1", "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["

$\\int^{\\var{x22}}_{\\var{x21}}\\simplify{{a2}*x^2 + {c2}} \\, \\textrm{d}x$

", "

$\\int^{\\var{x22+2}}_{\\var{x22}}\\simplify{{a2}*x^2 + {c2}} \\, \\textrm{d}x$

", "

$\\int^{\\var{x22+2}}_{\\var{x21}}\\simplify{{a2}*x^2 + {c2}} \\, \\textrm{d}x$

", "

$\\int^{\\var{x21}}_{\\var{x22}} \\simplify{{a2}*x^2 + {c2}} \\, \\textrm{d}x$

"], "matrix": ["1", 0, 0, 0], "distractors": ["", "", "", ""]}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minMarks": "1", "maxMarks": "1", "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["

$\\int^{\\var{x22}}_{\\var{x21}}\\simplify{{a2}*x^2 + {c2}} \\, \\textrm{d}x$

", "

$\\int^{\\var{x22+2}}_{\\var{x22}}\\simplify{{a2}*x^2 + {c2}} \\, \\textrm{d}x$

", "

$\\int^{\\var{x22+2}}_{\\var{x21}}\\simplify{{a2}*x^2 + {c2}} \\, \\textrm{d}x$

", "

$\\int \\simplify{{a2}*x^2 + {c2}} \\, \\textrm{d}x$

"], "matrix": ["0", "0", "1", 0], "distractors": ["", "", "", ""]}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minMarks": "1", "maxMarks": "1", "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["

$-\\int^{\\var{x32}}_{\\var{x31}}\\frac{1}{2}\\simplify{(x-{a3})*(x-{b3})} \\, \\textrm{d}x$

", "

$\\int^{\\var{x32}}_{\\var{x31}}\\frac{1}{2}\\simplify{(x-{a3})*(x-{b3})} \\, \\textrm{d}x$

", "

$-\\int^{\\var{x32+2}}_{\\var{x32}}\\frac{1}{2}\\simplify{(x-{a3})*(x-{b3})} \\, \\textrm{d}x$

", "

$\\int^{\\var{x32+2}}_{\\var{x32}}\\frac{1}{2}\\simplify{(x-{a3})*(x-{b3})} \\, \\textrm{d}x$

"], "matrix": ["1", 0, 0, "0"], "distractors": ["", "", "", ""]}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minMarks": "1", "maxMarks": "1", "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["

$\\int^{\\var{x32+2}}_{\\var{x31}}\\frac{1}{2}\\simplify{(x-{a3})*(x-{b3})} \\, \\textrm{d}x$

", "

$-\\int^{\\var{x32+2}}_{\\var{x31}}\\frac{1}{2}\\simplify{(x-{a3})*(x-{b3})} \\, \\textrm{d}x$

", "

$\\int^{\\var{x32+2}}_{\\var{x32}}\\frac{1}{2}\\simplify{(x-{a3})*(x-{b3})} \\, \\textrm{d}x -\\int^{\\var{x32}}_{\\var{x31}}\\frac{1}{2}\\simplify{(x-{a3})*(x-{b3})} \\, \\textrm{d}x$

", "

$\\int^{\\var{x32+2}}_{\\var{x32}}\\frac{1}{2}\\simplify{(x-{a3})*(x-{b3})} \\, \\textrm{d}x + \\int^{\\var{x32}}_{\\var{x31}}\\frac{1}{2}\\simplify{(x-{a3})*(x-{b3})} \\, \\textrm{d}x$

"], "matrix": ["0", 0, "1", "0"], "distractors": ["", "", "", ""]}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "minMarks": "1", "maxMarks": "1", "shuffleChoices": true, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["

$-\\int^{\\var{x42+2}}_{\\var{x42}}f(x) \\, \\textrm{d}x$

", "

$\\int^{\\var{x42}}_{\\var{x41}}f(x) \\, \\textrm{d}x$

", "

$\\int^{\\var{x42+2}}_{\\var{x41}}f(x) \\, \\textrm{d}x$

", "

$\\int^{\\var{x42}}_{\\var{x41}}f(x) \\, \\textrm{d}x - \\int^{\\var{x42+2}}_{\\var{x42}}f(x) \\, \\textrm{d}x$

"], "matrix": ["0", 0, 0, "1"], "distractors": ["", "", "", ""]}], "sortAnswers": false}]}]}], "showQuestionGroupNames": false, "type": "exam", "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Ann Smith", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2295/"}], "extensions": ["jsxgraph"], "custom_part_types": [], "resources": []}