// Numbas version: exam_results_page_options {"name": "Integration: Definite Integrals 5a - Area between 2 graphs", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Integration: Definite Integrals 5a - Area between 2 graphs", "tags": [], "metadata": {"description": "

Calculating the area enclosed between a linear function and a quadratic function by integration. The limits (points of intersection) are given in the question.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Find the area enclosed by $\\simplify{y={m}x+{c_1}}$ and $\\simplify{y=x^2+{b}x+{c_2}}$ between $x=\\var{cp1}$ and $x=\\var{cp2}$.

", "advice": "

When finding the area between two functions it can be helpful to sketch the graph of these functions to have a better understanding of the area you are trying to find. In this case, we have $\\simplify{y={m}x+{c_1}}$ and $\\simplify{y=x^2+{b}x+{c_2}}$:

\n

{geogebra_applet('https://www.geogebra.org/m/cxemr4pd',defs)}

\n

We can see that the area we are being asked to find is bounded above by the line $\\simplify{y={m}x+{c_1}}$, and bounded below by the curve $\\simplify{y=x^2+{b}x+{c_2}}$. Additionally, the $x$-values we are told to find the area between are the points of intersection between these two functions.

\n

Hence, by finding the difference between the integrals

\n

\\[\\simplify{defint({m}x+{c_1},x,{cp1},{cp2})}\\quad \\text{and} \\quad \\simplify{defint(x^2+{b}x+{c_2},x,{cp1},{cp2})} ,\\]

\n

this will give us the area we are being asked to find.

\n

So,

\n

\\[ \\begin{split}\\simplify{defint({m}x+{c_1},x,{cp1},{cp2})}-\\simplify{defint(x^2+{b}x+{c_2},x,{cp1},{cp2})} &\\,= \\simplify{defint(({m}x+{c_1})-(x^2+{b}x+{c_2}),x,{cp1},{cp2})},\\\\ &\\,=\\simplify[all,!noLeadingMinus]{defint(-x^2+{m-b}x+{c_1-c_2},x,{cp1},{cp2})}. \\end{split} \\]

\n

Hence,

\n

{advice}

\n

", "rulesets": {}, "extensions": ["geogebra"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-6..6)", "description": "", "templateType": "anything", "can_override": false}, "c_1": {"name": "c_1", "group": "Ungrouped variables", "definition": "random(-6..6 except 0)", "description": "", "templateType": "anything", "can_override": false}, "cp1": {"name": "cp1", "group": "Ungrouped variables", "definition": "(-(b-m)-sqrt(dis))/2", "description": "", "templateType": "anything", "can_override": false}, "cp2": {"name": "cp2", "group": "Ungrouped variables", "definition": "(-(b-m)+sqrt(dis))/2", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "", "templateType": "anything", "can_override": false}, "c_2": {"name": "c_2", "group": "Ungrouped variables", "definition": "random(-8..8 except [0,c_1])", "description": "", "templateType": "anything", "can_override": false}, "dis": {"name": "dis", "group": "Ungrouped variables", "definition": "(b-m)^2-4*(c_2-c_1)", "description": "", "templateType": "anything", "can_override": false}, "sol": {"name": "sol", "group": "Ungrouped variables", "definition": "-(cp2^3/3)+(m-b)cp2^2/2+(c_1-c_2)*cp2+(cp1)^3/3-(m-b)cp1^2/2-(c_1-c_2)*cp1", "description": "", "templateType": "anything", "can_override": false}, "sol2dp": {"name": "sol2dp", "group": "Ungrouped variables", "definition": "precround(sol,2)", "description": "", "templateType": "anything", "can_override": false}, "advice": {"name": "advice", "group": "Ungrouped variables", "definition": "if(sol=round(sol),'{simplified}',if(sol=sol2dp,'{simplifyy}','{simplify}'))", "description": "", "templateType": "anything", "can_override": false}, "simplified": {"name": "simplified", "group": "Ungrouped variables", "definition": "\"

\\\\[ \\\\begin{split}\\\\simplify[all, !noLeadingMinus]{defint(-x^2+{m-b}x+{c_1-c_2},x,{cp1},{cp2})} &\\\\,= \\\\left[\\\\simplify[all, !noLeadingMinus]{-x^3/3+{m-b}x^2/2+{c_1-c_2}x} \\\\right]_\\\\var{cp1}^\\\\var{cp2},\\\\\\\\ &\\\\,=\\\\left[\\\\simplify[all, !collectNumbers,fractionNumbers,!noLeadingMinus]{-{cp2^3/3}+{(m-b)*cp2^2/2}+{(c_1-c_2)*cp2}}\\\\right]-\\\\left[\\\\simplify[all, !collectNumbers,fractionNumbers,!noLeadingMinus]{-{cp1^3/3}+{(m-b)*cp1^2/2}+{(c_1-c_2)*cp1}}\\\\right]\\\\\\\\ &\\\\,= \\\\left(\\\\simplify[all, fractionNumbers]{{-(cp2^3/3)+(m-b)cp2^2/2+(c_1-c_2)*cp2}}\\\\right)-\\\\left(\\\\simplify[all, fractionNumbers]{{-(cp1)^3/3+(m-b)cp1^2/2+(c_1-c_2)*cp1}}\\\\right)\\\\\\\\ &\\\\,=\\\\simplify[all, fractionNumbers]{{-(cp2^3/3)+(m-b)cp2^2/2+(c_1-c_2)*cp2+(cp1)^3/3-(m-b)cp1^2/2-(c_1-c_2)*cp1}}. \\\\end{split} \\\\]

\"", "description": "", "templateType": "long string", "can_override": false}, "simplify": {"name": "simplify", "group": "Ungrouped variables", "definition": "safe(\"

\\\\[ \\\\begin{split}\\\\simplify[all, !noLeadingMinus]{defint(-x^2+{m-b}x+{c_1-c_2},x,{cp1},{cp2})} &\\\\,= \\\\left[\\\\simplify[all, !noLeadingMinus]{-x^3/3+{m-b}x^2/2+{c_1-c_2}x} \\\\right]_\\\\var{cp1}^\\\\var{cp2},\\\\\\\\ &\\\\,=\\\\left[\\\\simplify[all, !collectNumbers,fractionNumbers,!noLeadingMinus]{-{cp2^3/3}+{(m-b)*cp2^2/2}+{(c_1-c_2)*cp2}}\\\\right]-\\\\left[\\\\simplify[all, !collectNumbers,fractionNumbers,!noLeadingMinus]{-{cp1^3/3}+{(m-b)*cp1^2/2}+{(c_1-c_2)*cp1}}\\\\right]\\\\\\\\ &\\\\,= \\\\left(\\\\simplify[all, fractionNumbers]{{-(cp2^3/3)+(m-b)cp2^2/2+(c_1-c_2)*cp2}}\\\\right)-\\\\left(\\\\simplify[all, fractionNumbers]{{-(cp1)^3/3+(m-b)cp1^2/2+(c_1-c_2)*cp1}}\\\\right)\\\\\\\\ &\\\\,=\\\\simplify[all, fractionNumbers]{{-(cp2^3/3)+(m-b)cp2^2/2+(c_1-c_2)*cp2+(cp1)^3/3-(m-b)cp1^2/2-(c_1-c_2)*cp1}}\\\\\\\\ &\\\\,=\\\\var{sol2dp} \\\\,\\\\text{(2 d.p.)}. \\\\end{split} \\\\]

\")", "description": "", "templateType": "long string", "can_override": false}, "simplifyy": {"name": "simplifyy", "group": "Ungrouped variables", "definition": "\"

\\\\[ \\\\begin{split}\\\\simplify[all,!noLeadingMinus]{defint(-x^2+{m-b}x+{c_1-c_2},x,{cp1},{cp2})} &\\\\,= \\\\left[\\\\simplify[all,!noLeadingMinus]{-x^3/3+{m-b}x^2/2+{c_1-c_2}x} \\\\right]_\\\\var{cp1}^\\\\var{cp2},\\\\\\\\ &\\\\,=\\\\left[\\\\simplify[all, !collectNumbers,fractionNumbers,!noLeadingMinus]{-{cp2^3/3}+{(m-b)*cp2^2/2}+{(c_1-c_2)*cp2}}\\\\right]-\\\\left[\\\\simplify[all, !collectNumbers,fractionNumbers,!noLeadingMinus]{-{cp1^3/3}+{(m-b)*cp1^2/2}+{(c_1-c_2)*cp1}}\\\\right]\\\\\\\\ &\\\\,= \\\\left(\\\\simplify[all, fractionNumbers]{{-(cp2^3/3)+(m-b)cp2^2/2+(c_1-c_2)*cp2}}\\\\right)-\\\\left(\\\\simplify[all, fractionNumbers]{{-(cp1)^3/3+(m-b)cp1^2/2+(c_1-c_2)*cp1}}\\\\right)\\\\\\\\ &\\\\,=\\\\simplify[all, fractionNumbers]{{-(cp2^3/3)+(m-b)cp2^2/2+(c_1-c_2)*cp2+(cp1)^3/3-(m-b)cp1^2/2-(c_1-c_2)*cp1}}\\\\\\\\ &\\\\,=\\\\var{sol2dp} \\\\end{split} \\\\]

\"", "description": "", "templateType": "long string", "can_override": false}, "defs": {"name": "defs", "group": "Ungrouped variables", "definition": "[\n ['M',m],\n ['D',c_1],\n ['B',b],\n ['C',c_2]\n]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "cp1=round(cp1) and cp2=round(cp2) and dis>0", "maxRuns": "100"}, "ungrouped_variables": ["m", "c_1", "b", "c_2", "cp1", "cp2", "dis", "sol", "sol2dp", "advice", "simplified", "simplify", "simplifyy", "defs"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

[[0]] (Give your answers to 2 decimal places where necessary)

", "gaps": [{"type": "jme", "useCustomName": true, "customName": "Gap 0", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{sol2dp}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": "0.01", "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}]}], "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}