// Numbas version: exam_results_page_options {"name": "CD2 - Integration - trig identities", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "CD2 - Integration - trig identities", "tags": [], "metadata": {"description": "

Using the various versions of $\\cos{2x}$ identity to integrate $\\sin^2{x}$ and $\\cos^2{x}$.

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

Integrate $f(x)=\\var{Func}$.

", "advice": "
\n

We can't integrate $\\var{Coeff}\\sin^2(x)$ directly so first we have to use the double angle formula $\\cos(2x)=1-2\\sin^2(x)$. We re-arrange using the double angle formula to give us,

\n

\\[\\var{Coeff}\\sin^2(x)=\\frac{\\var{Coeff}}2-\\frac{\\var{Coeff}}2\\cos(2x).\\]

\n

From the Table of Integrals we see that a function of the form \\[ f(x)= \\cos(nx) \\] has the integral \\[ \\int \\cos(nx) dx  = \\frac{1}{n}\\sin(nx)+c\\]

\n

\n

So, for the function

\n

\\[f(x)=\\simplify[unitFactor,fractionNumbers]{{-Coeff/2}cos(2x)},\\]

\n

the integral is

\n

\\[ \\begin{split} \\int\\simplify[unitFactor,fractionNumbers]{{-Coeff/2}cos(2x)} dx \\,= \\simplify[unitFactor,fractionNumbers]{{-Coeff/2}int(cos(2x),x)} &\\,=\\simplify[unitFactor,fractionNumbers]{{-Coeff/2}(1/2 sin({2}x))} +c, \\\\ &\\,=\\simplify[unitFactor,fractionNumbers]{{-Coeff/4} sin(2x)+c}. \\end{split}  \\]

\n

The integral of $\\frac{\\var{Coeff}}2$ is

\n

\\[\\int\\frac{\\var{Coeff}}2dx=\\frac{\\var{Coeff}}2x+c,\\]

\n

so combining these our final answer is

\n

\\[\\int\\frac{\\var{Coeff}}2-\\frac{\\var{Coeff}}2\\cos(2x)dx=\\simplify[unitFactor,fractionNumbers]{{Coeff/2}x-{Coeff/4} sin(2x)+c}\\]

\n
\n

We can't integrate $\\var{Coeff}\\cos^2(x)$ directly so first we have to use the double angle formula $\\cos(2x)=2\\cos^2(x)-1$. We re-arrange using the double angle formula to give us,

\n

\\[\\var{Coeff}\\cos^2(x)=\\frac{\\var{Coeff}}2+\\frac{\\var{Coeff}}2\\cos(2x).\\]

\n

From the Table of Integrals we see that a function of the form \\[ f(x)= \\cos(nx) \\] has the integral \\[ \\int \\cos(nx) dx  = \\frac{1}{n}\\sin(nx)+c\\]

\n

So, for the function

\n

\\[f(x)=\\simplify[unitFactor,fractionNumbers]{{Coeff/2}cos(2x)},\\]

\n

the integral is

\n

\\[ \\begin{split} \\int\\simplify[unitFactor,fractionNumbers]{{Coeff/2}cos(2x)} dx \\,= \\simplify[unitFactor,fractionNumbers]{{Coeff/2}int(cos(2x),x)} &\\,=\\simplify[unitFactor,fractionNumbers]{{Coeff/2}(1/2 sin({2}x))} +c, \\\\ &\\,=\\simplify[unitFactor,fractionNumbers]{{Coeff/4} sin(2x)+c}. \\end{split}  \\]

\n

The integral of $\\frac{\\var{Coeff}}2$ is

\n

\\[\\int\\frac{\\var{Coeff}}2dx=\\frac{\\var{Coeff}}2x+c,\\]

\n

so combining these our final answer is

\n

\\[\\int\\frac{\\var{Coeff}}2+\\frac{\\var{Coeff}}2\\cos(2x)dx=\\simplify[unitFactor,fractionNumbers]{{Coeff/2}x+{Coeff/4} sin(2x)+c}\\]


Use this link to find some resources which will help you revise this topic.

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"SorC": {"name": "SorC", "group": "Ungrouped variables", "definition": "random('sin(x)^2','cos(x)^2')", "description": "", "templateType": "anything", "can_override": false}, "Coeff": {"name": "Coeff", "group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything", "can_override": false}, "Func": {"name": "Func", "group": "Ungrouped variables", "definition": "simplify((expression(Coeff+\"*\"+SorC)),[\"unitFactor\",\"trig\"])", "description": "", "templateType": "anything", "can_override": false}, "OneIfCosMinusOneIfSine": {"name": "OneIfCosMinusOneIfSine", "group": "Ungrouped variables", "definition": "1 if(SorC='sin(x)^2',-1,1)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["SorC", "Coeff", "Func", "OneIfCosMinusOneIfSine"], "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, "alternatives": [{"type": "jme", "useCustomName": true, "customName": "+k instead of +c", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "answer": "1/2{Coeff}*(x+{OneIfCosMinusOneIfSine}/2*sin(2x))+k", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "k", "value": ""}, {"name": "x", "value": ""}]}, {"type": "jme", "useCustomName": true, "customName": "Forgotten constant", "marks": "0.5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "

It looks like you forgot to include the integration constant. You should always remember the \"+C\" when doing an indefinite integral.

", "useAlternativeFeedback": false, "answer": "1/2{Coeff}*(x+{OneIfCosMinusOneIfSine}/2*sin(2x))", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "x", "value": ""}]}], "answer": "1/2{Coeff}*(x+{OneIfCosMinusOneIfSine}/2*sin(2x))+c", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "c", "value": ""}, {"name": "x", "value": ""}]}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Andrew Neate", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21832/"}, {"name": "Will Morgan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21933/"}]}]}], "contributors": [{"name": "Andrew Neate", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21832/"}, {"name": "Will Morgan", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/21933/"}]}