// Numbas version: exam_results_page_options {"name": "Indefinite integral by substitution (custom feedback)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"description": "

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

", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "variables": {"m": {"definition": "random(4..9)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "m"}, "a": {"definition": "random(1..5)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "a"}, "b": {"definition": "s1*random(1..9)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "b"}, "s1": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "description": "", "name": "s1"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "adaptiveMarkingPenalty": 0, "scripts": {}, "gaps": [{"checkVariableNames": false, "checkingType": "absdiff", "useCustomName": false, "valuegenerators": [{"value": "", "name": "c"}, {"value": "", "name": "x"}], "variableReplacements": [], "showCorrectAnswer": true, "answerSimplification": "std", "unitTests": [], "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "marks": 3, "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "notallowed": {"message": "

Input all numbers as integers or fractions and not as decimals.

", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "type": "jme", "adaptiveMarkingPenalty": 0, "scripts": {}, "failureRate": 1, "customMarkingAlgorithm": "malrules:\n [\n [\"({a}*(x^2)+{b})^{m+1}/{2a*(m+1)}\", \"Almost there! Did you forget to include the integration constant?\"],\n [\"({a}*(x^2)+{b})/{2a*(m+1)}\", \"Look carefully at where you subbed back in for $u$. Did you do this correctly?\"],\n [\"({a}*(x^2)+{b})/{2a*(m+1)}+C\", \"Look carefully at where you subbed back in for $u$. Did you do this correctly?\"],\n [\"u^{m+1}/(2*{a}*{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}/(2*{a}*{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}/(2*{m+1})\", \"Double check the relationship between $du$ and $dx$. Did you sub in correctly here?\"],\n [\"u^{m+1}/(2*{m+1})+C\", \"Double check the relationship between $du$ and $dx$. Did you sub in correctly here?\"],\n [\"u^{m+1}/({a}*{m+1})\", \"Double check the relationship between $du$ and $dx$. Did you sub in correctly here?\"],\n [\"u^{m+1}/({a}*{m+1})+C\", \"Double check the relationship between $du$ and $dx$. Did you sub in correctly here?\"],\n [\"u^{m+1}/({m+1})\", \"Double check the relationship between $du$ and $dx$. Did you sub in correctly here?\"],\n [\"u^{m+1}/({m+1})+C\", \"Double check the relationship between $du$ and $dx$. Did you sub in correctly here?\"],\n [\"({a}x^2+{b})^{m+1}/(2*{m+1})\", \"Double check the relationship between $du$ and $dx$. Did you sub in correctly here?\"],\n [\"({a}x^2+{b})^{m+1}/(2*{m+1})+C\", \"Double check the relationship between $du$ and $dx$. Did you sub in correctly here?\"],\n [\"({a}x^2+{b})^{m+1}/({a}*{m+1})\", \"Double check the relationship between $du$ and $dx$. Did you sub in correctly here?\"],\n [\"({a}x^2+{b})^{m+1}/({a}*{m+1})+C\", \"Double check the relationship between $du$ and $dx$. Did you sub in correctly here?\"],\n [\"({a}x^2+{b})^{m+1}/({m+1})\", \"Double check the relationship between $du$ and $dx$. Did you sub in correctly here?\"],\n [\"({a}x^2+{b})^{m+1}/({m+1})+C\", \"Double check the relationship between $du$ and $dx$. Did you sub in correctly here?\"],\n [\"1/{2a}*u^{m}\",\"You have not actually integrated anything. You simply substituted for ${a}x^2+{b}$.\"],\n [\"1/{2a}*({a}*x^2+{b})^{m}\",\"You have not actually integrated anything. You simply substituted for ${a}x^2+{b}$ and then subbed back in again.\"]\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 )))\\[I=\\simplify[std]{Int( x*({a} * x ^ 2 + {b})^{m},x)}\\]

\n\t\t\t

$I=\\;$[[0]]

\n\t\t\t

Input numbers in your answer as integers or fractions and not as decimals.

\n\t\t\t", "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "marks": 0, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "customName": ""}], "functions": {}, "ungrouped_variables": ["s1", "b", "m", "a"], "advice": "\n\t

This exercise is best solved by using substitution.
Note that if we let $u=\\simplify[std]{{a} * (x ^ 2) + {b}}$ then $du=\\simplify[std]{({2*a} * x)*dx }$
Hence we can replace $xdx$ by $\\frac{1}{\\var{2*a}}du$.

\n\t

Hence the integral becomes:

\n\t

\\[\\begin{eqnarray*} I&=&\\simplify[std]{Int((1/{2*a})u^{m},u)}\\\\ &=&\\simplify[std]{(1/{2*a})u^{m+1}/{m+1}+C}\\\\ &=& \\simplify[std]{({a} * (x ^ 2) + {b})^{m+1}/{2*a*(m+1)}+C} \\end{eqnarray*}\\]

\n\t

A Useful Result
This example can be generalised.
Suppose \\[I = \\int\\; f'(x)g(f(x))\\;dx\\]
The using the substitution $u=f(x)$ we find that $du=f'(x)\\;dx$ and so using the same method as above:
\\[I = \\int g(u)\\;du \\]
And if we can find this simpler integral in terms of $u$ we can replace $u$ by $f(x)$ and get the result in terms of $x$.

\n\t", "variable_groups": [], "statement": "\n\t

Find the following integral.

\n\t

Input the constant of integration as $C$.

\n\t \n\t \n\t", "name": "Indefinite integral by substitution (custom feedback)", "extensions": [], "variablesTest": {"condition": "", "maxRuns": 100}, "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "tags": [], "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/"}, {"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}]}]}], "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/"}, {"name": "Violeta CIT", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1030/"}]}