// Numbas version: exam_results_page_options {"name": "Integration by parts 2 - cos and sin with limits", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a", "c", "b", "d", "s2", "s1", "i1", "i0"], "name": "Integration by parts 2 - cos and sin with limits", "tags": ["Calculus", "calculus", "constant of integration", "indefinite integration", "integrals", "integrating", "integrating trigonometric functions", "integration by parts", "steps", "Steps", "twice"], "advice": "

The formula for integrating by parts is

\n

\\[ \\int u\\frac{dv}{dx} dx = uv - \\int v \\frac{du}{dx} dx. \\]

\n

We choose $u = \\simplify[std]{({a}x+{b})}$ and $\\displaystyle \\frac{dv}{dx} = \\simplify[std]{cos({c}*x+{d})}$.

\n

So $\\displaystyle \\frac{du}{dx} = \\simplify[std]{{a}}$ and $\\displaystyle v = \\simplify[std]{(1/{c})*sin({c}*x+{d})}$.

\n

Hence,
\\[ \\begin{eqnarray} \\int^\\simplify{{i1}/2}_\\simplify{{i0}/2} \\simplify[std]{({a}*x+{b})*cos({c}*x+{d})} dx &=& [uv]^\\simplify{{i1}/2}_\\simplify{{i0}/2} - \\int^\\simplify{{i1}/2}_\\simplify{{i0}/2} v \\frac{du}{dx} dx \\\\ &=& [\\simplify[std]{(({a}*x+{b})/{c})*sin({c}*x+{d})}]^\\simplify{{i1}/2}_\\simplify{{i0}/2} - \\simplify{({a}/{c})}\\int^\\simplify{{i1}/2}_\\simplify{{i0}/2} \\sin({c}*x+{d}) \\mathrm{d}x \\\\ &=& [\\simplify[std]{(({a}x+{b})/{c})*sin({c}*x+{d}) +({a}/{c^2})*cos({c}*x+{d})}]^\\simplify{{i1}/2}_\\simplify{{i0}/2}\\end{eqnarray} \\]

\n

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

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

\n

The formula for integration by parts is

\n

\\[ \\int u\\frac{dv}{dx} dx = uv - \\int v \\frac{du}{dx} dx. \\]

\n

What is the most suitable choice for $u$ and $\\frac{dv}{dx}$?

\n

$u =\\;$[[0]]

\n

$\\frac{dv}{dx} =\\;$[[1]]

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "{a}x+{b}", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all", "scripts": {}, "answer": "cos({c}x+{d})", "marks": 1, "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "

Hence find $\\frac{du}{dx} =\\;$[[0]]

\n

$v =\\;$[[1]]

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

Hence find $uv =\\;$[[0]]

\n

$\\int v\\frac{du}{dx}\\mathrm{d}x = \\;$[[1]]$+C$

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

Use the results from above to find:

\n

$I=\\displaystyle \\int^\\simplify{{i1}/2}_\\simplify{{i0}/2} \\simplify[std]{({a}x+{b})*cos({c}x+{d})} dx = \\int^\\simplify{{i1}/2}_\\simplify{{i0}/2} u\\frac{dv}{dx} dx = [uv]^\\simplify{{i1}/2}_\\simplify{{i0}/2}- \\int^\\simplify{{i1}/2}_\\simplify{{i0}/2} v \\frac{du}{dx} dx = \\;$[[0]]

\n

Input all numbers as fractions or integers and not decimals.

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

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

", "showStrings": false, "strings": ["."], "partialCredit": 0}, "variableReplacements": [], "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "all,fractionnumbers", "scripts": {}, "answer": "({a}{i1}/2+{b})/{c}sin({c}{i1}/2+{d})+{a}/{c}^2cos({c}{i1}/2+{d})-({a}{i0}/2+{b})/{c}sin({c}{i0}/2+{d})-{a}/{c}^2cos({c}{i0}/2+{d})", "marks": "2", "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "statement": "

Find the following indefinite integral.

\n

Input all numbers as fractions or integers and not decimals.

\n

Input the constant of integration as $C$.

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": "i1>i0"}, "preamble": {"css": "", "js": ""}, "variables": {"a": {"definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "0", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "d": {"definition": "0", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "i1": {"definition": "random(0,pi,2pi,3pi)", "templateType": "anything", "group": "Ungrouped variables", "name": "i1", "description": ""}, "s2": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s2", "description": ""}, "s1": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s1", "description": ""}, "i0": {"definition": "random(0,pi,2pi,3pi)", "templateType": "anything", "group": "Ungrouped variables", "name": "i0", "description": ""}}, "metadata": {"notes": "\n \t\t \t\t

3/08/2012:

\n \t\t \t\t

Added tags.

\n \t\t \t\t

Added description.

\n \t\t \t\t

Got rid of redundant ruleset, added !noLeadingMinus to std ruleset as we need to keep the standard order for integrating by parts.

\n \t\t \t\t

Checked calculation. OK.

\n \t\t \t\t

Penalised use of steps in first part, 1 mark. Added message to that effect in first part.

\n \t\t \t\t

Added message about not inputting decimals in appropriate places.

\n \t\t \t\t

Changed marks reflecting the use of steps and degree of difficulty in second part.

\n \t\t \t\t

Improved Advice display.

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

Find $\\displaystyle \\int (ax+b)\\cos(cx+d)\\; dx $

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "joshua boddy", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/557/"}]}]}], "contributors": [{"name": "joshua boddy", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/557/"}]}