// Numbas version: exam_results_page_options {"name": "Integration: Definite Integrals 6 - 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 6 - Area between 2 graphs", "tags": [], "metadata": {"description": "

Calculating the area enclosed between a cosine 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=cos(pi*x/{a})}$ and $\\simplify{y=x^2-{a^2+1}}$, between $x=\\var{-a}$ and $x=\\var{a}$.

", "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=cos(pi x/{a})}$ and $\\simplify{y=x^2-{a^2+1}}$:

\n

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

\n

We can see that the lower bound of the area is the curve $\\simplify{y=x^2-{a^2+1}}$ and the upper bound is the curve $\\simplify{y=cos(pi x/{a})}$, and the $x$-values we are evaluating between are where the curves intersect. 

\n

Therefore, by finding the difference between the integrals

\n

\\[\\simplify{defint(cos(pi x/{a}),x,{-a},{a})}\\quad \\text{and} \\quad \\simplify{defint(x^2-{a^2+1},x,{-a},{a})} ,\\]

\n

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

\n

So,

\n

\\[ \\begin{split}\\simplify{defint(cos(pi x/{a}),x,{-a},{a})}-\\simplify{defint(x^2-{a^2+1},x,{-a},{a})} &\\,= \\simplify{defint((cos(pi x/{a}))-(x^2-{a^2+1}),x,{-a},{a})},\\\\ &\\,=\\simplify{defint(cos(pi x/{a})-x^2+{a^2+1},x,{-a},{a})}. \\end{split} \\]

\n

Hence,

\n

\n

{advice}

", "rulesets": {}, "extensions": ["geogebra"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything", "can_override": false}, "simplified": {"name": "simplified", "group": "Ungrouped variables", "definition": "\"

\\\\[ \\\\begin{split} \\\\simplify{defint(cos(pi x/{a})-x^2+{a^2+1},x,{-a},{a})} &\\\\,= \\\\left[\\\\simplify{{a}/pi sin(pi x/{a})-x^3/3+{a^2+1}x}\\\\right]_\\\\var{-a}^\\\\var{a}\\\\\\\\ &\\\\,= \\\\left[\\\\simplify[all,fractionNumbers,!zeroTerm,!collectNumbers]{0-{a^3/3}+{(a^2+1)(a)}}\\\\right]-\\\\left[\\\\simplify[all,fractionNumbers,!zeroTerm,!collectNumbers]{0-{(-a)^3/3}+{(a^2+1)(-a)}}\\\\right] \\\\\\\\ &\\\\,=\\\\simplify[all,fractionNumbers]{{2((a^2+1)(a)-(a)^3/3)}}\\\\end{split} \\\\]

\\n

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

\\\\[ \\\\begin{split} \\\\simplify{defint(cos(pi x/{a})-x^2+{a^2+1},x,{-a},{a})} &\\\\,= \\\\left[\\\\simplify{{a}/pi sin(pi x/{a})-x^3/3+{a^2+1}x}\\\\right]_\\\\var{-a}^\\\\var{a}\\\\\\\\ &\\\\,= \\\\left[\\\\simplify[all,fractionNumbers,!zeroTerm,!collectNumbers]{0-{a^3/3}+{(a^2+1)(a)}}\\\\right]-\\\\left[\\\\simplify[all,fractionNumbers,!zeroTerm,!collectNumbers]{0-{(-a)^3/3}+{(a^2+1)(-a)}}\\\\right] \\\\\\\\ &\\\\,=\\\\simplify[all,fractionNumbers]{{2((a^2+1)(a)-(a)^3/3)}}\\\\\\\\&\\\\,=\\\\var{soldp}\\\\,\\\\text{(2dp)}\\\\end{split} \\\\]

\\n

\"", "description": "", "templateType": "long string", "can_override": false}, "advice": {"name": "advice", "group": "Ungrouped variables", "definition": "if(a=3,'{simplified}','{simplify}')", "description": "", "templateType": "anything", "can_override": false}, "sol": {"name": "sol", "group": "Ungrouped variables", "definition": "2((a^2+1)(a)-(a)^3/3)", "description": "", "templateType": "anything", "can_override": false}, "soldp": {"name": "soldp", "group": "Ungrouped variables", "definition": "precround(sol,2)", "description": "", "templateType": "anything", "can_override": false}, "defs": {"name": "defs", "group": "Ungrouped variables", "definition": "[\n ['a',a]\n]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": "100"}, "ungrouped_variables": ["a", "simplified", "simplify", "advice", "sol", "soldp", "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": "{soldp}", "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": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}]}], "contributors": [{"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}