// Numbas version: exam_results_page_options {"name": "Indefinite integral by substitution 2 (custom feedback)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variables": {"m": {"group": "Ungrouped variables", "name": "m", "templateType": "anything", "definition": "random(3..9)", "description": ""}, "a": {"group": "Ungrouped variables", "name": "a", "templateType": "anything", "definition": "random(1..9)", "description": ""}, "b": {"group": "Ungrouped variables", "name": "b", "templateType": "anything", "definition": "s1*random(1..9)", "description": ""}, "s1": {"group": "Ungrouped variables", "name": "s1", "templateType": "anything", "definition": "random(1,-1)", "description": ""}}, "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", "name": "Indefinite integral by substitution 2 (custom feedback)", "variable_groups": [], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "tags": [], "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", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

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

"}, "parts": [{"stepsPenalty": 1, "type": "gapfill", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 0, "showFeedbackIcon": true, "sortAnswers": false, "useCustomName": false, "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "gaps": [{"type": "jme", "showPreview": true, "marks": 3, "valuegenerators": [{"value": "", "name": "c"}, {"value": "", "name": "x"}], "unitTests": [], "answer": "-({a}+{b}*cos(x))^{m+1}/{b*(m+1)}+C", "customMarkingAlgorithm": "malrules:\n [\n [\"-({a}+{b}*cos(x))^{m+1}/{b*(m+1)}\", \"Almost there! Did you forget to include the integration constant?\"],\n [\"u^{m+1}/{b*(m+1)}+C\",\"Don't forget to fill back in for $u$. You must give your answer in terms of the original variable i.e. in terms of $x$.\"],\n [\"u^{m+1}/{b*(m+1)}\",\"Don't forget to fill back in for $u$. You must give your answer in terms of the original variable i.e. in terms of $x$.\"],\n [\"-u^{m+1}/{b*(m+1)}+C\",\"Don't forget to fill back in for $u$. You must give your answer in terms of the original variable i.e. in terms of $x$.\"],\n [\"-u^{m+1}/{b*(m+1)}\",\"Don't forget to fill back in for $u$. You must give your answer in terms of the original variable i.e. in terms of $x$.\"],\n [\"-1/{b}*({a}+{b}*cos(x))^{m}+C\",\"You haven't actually integrated here. You simply subbed in for $\\\\var{a} + \\\\var{b} \\\\cos x$ and then subbed back again.\"],\n [\"-1/{b}*({a}+{b}*cos(x))^{m}\",\"You haven't actually integrated here. You simply subbed in for $\\\\var{a} + \\\\var{b} \\\\cos x$ and then subbed back again.\"],\n [\"-1/{b}*u^{m}+C\",\"You haven't actually integrated here. You simply subbed in for $\\\\var{a} + \\\\var{b} \\\\cos x$. Also, once you have integrated, make sure you sub back in for $u$ - give your answer in terms of the original variable (i.e. in terms of $x$).\"],\n [\"-1/{b}*u^{m}\",\"You haven't actually integrated here. You simply subbed in for $\\\\var{a} + \\\\var{b} \\\\cos x$. Also, once you have integrated, make sure you sub back in for $u$ - give your answer in terms of the original variable (i.e. in terms of $x$).\"],\n [\"-cos(x)*({a}*x+{b}*sin(x))^{m}+C\",\"You cannot simply integrate each part of a product individually. Look closely at the integrand (what you were asked to integrate). Is one part of the integrand equal to the derivative (or a multiple of the derivative) of another part? If so, try substitution.\"], \n [\"-cos(x)*({a}*x+{b}*sin(x))^{m}\",\"You cannot simply integrate each part of a product individually. Look closely at the integrand (what you were asked to integrate). Is one part of the integrand equal to the derivative (or a multiple of the derivative) of another part? If so, try substitution.\"], \n [\"({a}+{b}*cos(x))^{m+1}/{b*(m+1)}+C\",\"Almost there. Look closely at what you let $u=$ and how you differentiated that. Double check the relevant differentiation rule.\"],\n [\"({a}+{b}*cos(x))^{m+1}/{b*(m+1)}\",\"Almost there. Look closely at what you let $u=$ and how you differentiated that. Double check the relevant differentiation rule.\"],\n [\"-({a}+{b}*cos(x))/{b*(m+1)}+C\", \"Be careful when subbing back in for $u$. Did you do this correctly? Did you include the power on the bracket?\"],\n [\"-({a}+{b}*cos(x))/{b*(m+1)}\", \"Be careful when subbing back in for $u$. Did you do this correctly? Did you include the power on the bracket?\"],\n [\"-({a}+{b}*cos(x))^{m+1}/{m+1}+C\", \"Double check the relationship between $du$ and $dx$. Did you sub in correctly here?\"],\n [\"-({a}+{b}*cos(x))^{m+1}/{m+1}\", \"Double check the relationship between $du$ and $dx$. Did you sub in correctly here?\"]\n]\n\n\nparsed_malrules: \n map(\n [\"expr\":parse(x[0]),\"feedback\":x[1]],\n x,\n malrules\n )\n\nagree_malrules (Do the student's answer and the expected answer agree on each of the sets of variable values?):\n map(\n len(filter(not x ,x,map(\n try(\n resultsEqual(unset(question_definitions,eval(studentexpr,vars)),unset(question_definitions,eval(malrule[\"expr\"],vars)),settings[\"checkingType\"],settings[\"checkingAccuracy\"]),\n message,\n false\n ),\n vars,\n vset\n )))Do not input numbers as decimals, only as integers without the decimal point, or fractions.

"}, "answerSimplification": "std", "variableReplacementStrategy": "originalfirst", "vsetRange": [0, 1], "checkingType": "absdiff", "showFeedbackIcon": true, "failureRate": 1, "customName": "", "useCustomName": false, "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": true, "checkVariableNames": false, "scripts": {}}], "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", "steps": [{"type": "information", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "marks": 0, "showFeedbackIcon": true, "useCustomName": false, "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "prompt": "

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

", "customMarkingAlgorithm": "", "customName": "", "scripts": {}, "adaptiveMarkingPenalty": 0}], "customMarkingAlgorithm": "", "customName": "", "scripts": {}, "adaptiveMarkingPenalty": 0}], "variablesTest": {"condition": "", "maxRuns": 100}, "extensions": [], "preamble": {"css": "", "js": ""}, "functions": {}, "ungrouped_variables": ["m", "a", "b", "s1"], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}]}]}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}]}