// Numbas version: exam_results_page_options {"duration": 0, "question_groups": [{"pickQuestions": 1, "name": "Group", "pickingStrategy": "all-ordered", "questions": [{"name": "Definite Integration 2 (custom feedback)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "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/"}], "tags": [], "metadata": {"description": "

Evaluate $\\int_0^{\\,m}e^{ax}\\;dx$, $\\int_0^{p}\\frac{1}{bx+d}\\;dx,\\;\\int_0^{\\pi/2} \\sin(qx) \\;dx$. 

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Evaluate the following definite integrals.

", "advice": "\n

 

\n

b)
\\[\\begin{eqnarray*}I&=&\\int_0^{\\var{b2}}\\simplify[std]{1/(x+{m2})}\\;dx\\\\ &=&\\left[\\ln(x+\\var{m2})\\right]_0^{\\var{b2}}\\\\ &=& \\ln(\\var{b2+m2})-\\ln(\\var{m2})\\\\ &=&\\ln\\left(\\frac{\\var{b2+m2}}{\\var{m2}}\\right)\\\\ &=&\\var{ans2}\\mbox{ to 2 decimal places} \\end{eqnarray*} \\]

\n

 

\n ", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "variables": {"s2": {"name": "s2", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "templateType": "anything"}, "ans1": {"name": "ans1", "group": "Ungrouped variables", "definition": "precround(tans1,3)", "description": "", "templateType": "anything"}, "w": {"name": "w", "group": "Ungrouped variables", "definition": "random(0,1)", "description": "", "templateType": "anything"}, "m2": {"name": "m2", "group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything"}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "t*random(1..9)", "description": "", "templateType": "anything"}, "err1": {"name": "err1", "group": "Ungrouped variables", "definition": "a*(e^(a*b1)-1)", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything"}, "t": {"name": "t", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "templateType": "anything"}, "tans3": {"name": "tans3", "group": "Ungrouped variables", "definition": "1/m3*((1-w)*sin(m3*pi/2)-w*(cos(m3*pi/2)-1))", "description": "", "templateType": "anything"}, "b2": {"name": "b2", "group": "Ungrouped variables", "definition": "random(1..20)", "description": "", "templateType": "anything"}, "tol1": {"name": "tol1", "group": "Ungrouped variables", "definition": "0.0001", "description": "", "templateType": "anything"}, "m3": {"name": "m3", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything"}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "random(-1..2#0.5 except 0)", "description": "", "templateType": "anything"}, "d1": {"name": "d1", "group": "Ungrouped variables", "definition": "random(-9..9)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-2..2#0.5 except 0)", "description": "", "templateType": "anything"}, "tol": {"name": "tol", "group": "Ungrouped variables", "definition": "0.001", "description": "", "templateType": "anything"}, "ans2": {"name": "ans2", "group": "Ungrouped variables", "definition": "precround(1/b*(ln(1+b*b2/m2)),3)", "description": "", "templateType": "anything"}, "errans": {"name": "errans", "group": "Ungrouped variables", "definition": "precround(err1,3)", "description": "", "templateType": "anything"}, "ans3": {"name": "ans3", "group": "Ungrouped variables", "definition": "precround(tans3,3)", "description": "", "templateType": "anything"}, "tans1": {"name": "tans1", "group": "Ungrouped variables", "definition": "(1/a)*(e^(a*b1)-1)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["s2", "b", "w", "ans2", "c1", "d1", "tans3", "a", "tans1", "t", "tol1", "b1", "m2", "ans3", "m3", "ans1", "b2", "tol", "err1", "errans"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "\n

\\[I=\\int_0^{\\var{b1}}\\simplify[std]{e^({a}x)}\\;dx\\]

\n

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

\n

Input your answer to 3 decimal places.

\n ", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "malrules:\n [\n [\"{a}*(e^({a}*{b1})-1)\", \"It looks like you differentiated rather than integrated.\"]\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=\\int_0^{\\var{b2}}\\simplify[std]{1/({b}x+{m2})}\\;dx\\]

\n

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

\n

Input your answer to 3 decimal places.

\n ", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "malrules:\n [\n [\"ln(1+{b}*{b2}/{m2})\", \"Almost there. When you let $u=\\\\var{b}x+\\\\var{m2}$, check what you got when you subbed in for $dx$ i.e. did you remember to divide by the number in front of $x$?\"]\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=\\int_0^{\\pi/2}\\simplify[std]{({w} * Sin({m3} * x) + {1 -w} * Cos({m3} * x))}\\;dx\\]

\n

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

\n

Input your answer to 3 decimal places.

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "malrules:\n [\n [\"{w}*{m3}*cos({m3}*{Pi/2})-{w}*{m3}-(1-{w})*{m3}*sin({m3}*{Pi/2})\", \"It looks like you differentiated rather than integrating the function.\"],\n [\"{w}/{m3}*cos({m3}*{Pi/2})-{w}/{m3}-(1-{w})/{m3}*sin({m3}*{Pi/2})\", \"Carefully double check the rule for $\\\\simplify[std]{({w} * sin(x) + {1 -w} * cos(x))}$ on page 26 of the log tables.\"],\n [\"-{w}*cos({m3}*{Pi/2})+{w}+(1-{w})*sin({m3}*{Pi/2})\", \"Did you remember to divide by the number in front of $x$?\"]\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 )))$\\int \\cos (\\var{a}x) \\ dx$

\n

[[0]]

", "type": "gapfill", "marks": 0, "unitTests": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"showFeedbackIcon": true, "variableReplacements": [], "showCorrectAnswer": true, "checkVariableNames": false, "vsetRangePoints": 5, "expectedVariableNames": [], "vsetRange": [0, 1], "checkingType": "absdiff", "checkingAccuracy": 0.001, "type": "jme", "failureRate": 1, "marks": 1, "showPreview": true, "answer": "1/{a} sin({a}*x)+C", "unitTests": [], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "scripts": {}, "customMarkingAlgorithm": "malrules:\n [\n [\"-{a}sin({a}x)+C\", \"It looks like you differentiated rather than integrating.\"],\n [\"-1/{a}sin({a}x)+C\", \"Double check the rule for integrating $\\\\cos(x)$.\"],\n [\"sin({a}x)+C\", \"Almost there. Did you forget to divide by the number in front of $x$?\"],\n [\"1/{a}*sin({a}x)\", \"Almost there. Did you forget to include the integration constant?\"]\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 )))$\\int x \\left( \\var{b} + x^2 \\right)^{\\var{c}} \\ dx$

\n

[[0]]

", "type": "gapfill", "marks": 0, "unitTests": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"showFeedbackIcon": true, "variableReplacements": [], "showCorrectAnswer": true, "checkVariableNames": false, "vsetRangePoints": 5, "expectedVariableNames": [], "vsetRange": [0, 1], "checkingType": "absdiff", "checkingAccuracy": 0.001, "type": "jme", "failureRate": 1, "marks": "2", "showPreview": true, "answer": "({b}+x^2)^({c}+1)/(2*({c}+1))+C", "unitTests": [], "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "scripts": {}, "customMarkingAlgorithm": "malrules:\n [\n [\"{d}^({c}+1)/(2({c}+1))+C\", \"Don't forget to sub back in for $u$. Your answer must be in terms of $x$ (the original variable in the question).\"],\n [\"({b}+x^2)^({c}+1)/(2*({c}+1))\", \"Almost there! Did you forget to include the integration constant?\"],\n [\"({b}+x^2)^({c}+1)/(({c}+1))+C\", \"You're on the right track. Double check the relationship between $du$ and $dx$.\"]\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 )))Integration by substitution with feedback for some common errors.

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

Complete the following indefinite integrals using the letter $C$ for the constant of integration.

", "type": "question"}, {"name": "Integration1 (custom feedback)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "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/"}], "variable_groups": [], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers"]}, "statement": "\n

Integrate the following functions $f(x)$.

\n

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

\n

In all examples do not forget to include the constant of integration $C$.

\n ", "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"u": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,2,3)", "name": "u", "description": ""}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "switch(u=1,[1,0,0],u=2,[0,1,0],[0,0,1])", "name": "t", "description": ""}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..9)", "name": "c", "description": ""}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "chcp(c,2)", "name": "b", "description": ""}, "c1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "chcp(b1,2)", "name": "c1", "description": ""}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except [-1,0,1])", "name": "a", "description": ""}, "a1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except[0,a])", "name": "a1", "description": ""}, "b1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2..9)", "name": "b1", "description": ""}}, "ungrouped_variables": ["c1", "b", "a", "b1", "t", "u", "c", "a1"], "tags": [], "functions": {"chcp": {"parameters": [["a", "number"], ["b", "number"]], "type": "number", "definition": "if(gcd(a,b)=1,b,chcp(a,random(2..9)))", "language": "jme"}}, "parts": [{"showCorrectAnswer": true, "checkingAccuracy": 0.001, "checkingType": "absdiff", "answer": "{a*c}/{b+c}*x^({b+c}/{c})+C", "prompt": "

$\\displaystyle f(x)=\\simplify[std]{{a}*x^({b}/{c})}$

\n

Input $\\displaystyle \\int f(x)\\;dx$ here.

\n

 

", "customMarkingAlgorithm": "malrules:\n [\n [\"{a*c}/{b+c}*x^({b+c}/{c})\", \"Almost there! Did you forget to include the integration constant?\"],\n [\"{a}*x^({b+c}/{c})+C\", \"Did you remember to divide by the new power?\"],\n [\"{a}*x^({b+c}/{c})\", \"Did you remember to divide by the new power?\"],\n [\"{a*b}/{c}*x^({b-c}/{c})\", \"It looks like you differentiated rather than integrating.\"],\n [\"{a*b}/{c}*x^({b-c}/{c})+C\", \"It looks like you differentiated rather than integrating.\"]\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 )))Input all numbers as integers or fractions and not as decimals.

", "strings": ["."], "showStrings": false}, "variableReplacementStrategy": "originalfirst", "vsetRange": [0, 1], "marks": 1, "expectedVariableNames": [], "showPreview": true, "variableReplacements": [], "scripts": {}, "answerSimplification": "std"}, {"failureRate": 1, "answerSimplification": "std", "showCorrectAnswer": true, "unitTests": [], "checkVariableNames": false, "variableReplacementStrategy": "originalfirst", "prompt": "

$f(x)=\\simplify[std]{{t[0]}*sin({b}x+{c})+{t[1]}*cos({b}x+{c})+{t[2]}*exp({b}x+{c})}$

\n

Input $\\displaystyle \\int f(x)\\;dx$ here.

", "checkingAccuracy": 0.001, "checkingType": "absdiff", "answer": "(1/{b})*({-t[0]}*cos({b}x+{c})+{t[1]}*sin({b}x+{c})+{t[2]}*exp({b}x+{c}))+C", "marks": 1, "expectedVariableNames": [], "showPreview": true, "customMarkingAlgorithm": "malrules:\n [\n [\"(1/{b})*({-t[0]}*cos({b}x+{c})+{t[1]}*sin({b}x+{c})+{t[2]}*exp({b}x+{c}))\", \"Almost there! Did you forget to include the integration constant?\"],\n [\"{b}*({t[0]}*cos({b}x+{c})-{t[1]}*sin({b}x+{c})+{t[2]}*exp({b}x+{c}))\", \"It looks like you differentiated rather than integrating.\"],\n [\"{b}*({t[0]}*cos({b}x+{c})-{t[1]}*sin({b}x+{c})+{t[2]}*exp({b}x+{c}))+C\", \"It looks like you differentiated rather than integrating.\"],\n [\"{b}*({t[0]}*cos({b}x+{c})-{t[1]}*sin({b}x+{c}))+({t[2]}/{b})*exp({b}x+{c})+C\", \"Are you sure you have integrated each term rather than differentiating?\"],\n [\"{b}*({t[0]}*cos({b}x+{c})-{t[1]}*sin({b}x+{c}))+({t[2]}/{b})*exp({b}x+{c})\", \"Are you sure you have integrated each term rather than differentiating?\"],\n [\"(1/{b})*({t[0]}*cos({b}x+{c})-{t[1]}*sin({b}x+{c}))\", \"Double check the rules for integrating $\\\\simplify[std]{{t[0]}*sin(x)+{t[1]}*cos(x)}$.\"],\n [\"(1/{b})*({t[0]}*cos({b}x+{c})-{t[1]}*sin({b}x+{c}))+C\", \"Double check the rules for integrating $\\\\simplify[std]{{t[0]}*sin(x)+{t[1]}*cos(x)}$.\"],\n [\"({t[0]}*cos({b}x+{c})-{t[1]}*sin({b}x+{c})+{t[2]}*exp({b}x+{c}))+C\", \"Double check the rules for integrating $\\\\simplify[std]{{t[0]}*sin(x)+{t[1]}*cos(x)+{t[2]}*exp({b}x+{c})}$.\"],\n [\"({t[0]}*cos({b}x+{c})-{t[1]}*sin({b}x+{c})+{t[2]}*exp({b}x+{c}))\", \"Double check the rules for integrating $\\\\simplify[std]{{t[0]}*sin(x)+{t[1]}*cos(x)+{t[2]}*exp({b}x+{c})}$.\"],\n [\"{-t[0]}*cos({b}x+{c})+{t[1]}*sin({b}x+{c})+{t[2]}*exp({b}x+{c})\",\"Did you forget to divide by the number in front of $x$?\"],\n [\"{-t[0]}*cos({b}x+{c})+{t[1]}*sin({b}x+{c})+{t[2]}*exp({b}x+{c})+C\",\"Did you forget to divide by the number in front of $x$?\"]\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 )))

\n

$f(x)=\\simplify[std]{{a}exp({b}/{c}*x)}$

\n

Input $\\displaystyle \\int f(x)\\;dx$ here.

", "customMarkingAlgorithm": "malrules:\n [\n [\"{a*c}/{b}*exp({b}/{c}*x)\", \"Almost there! Did you forget to include the integration constant?\"],\n [\"{a*b}/{c}*exp({b}/{c}*x)\", \"It looks like you differentiated rather than integrating.\"],\n [\"{a*b}/{c}*exp({b}/{c}*x)+C\", \"It looks like you differentiated rather than integrating.\"],\n [\"{a}*exp({b}/{c}*x)+C\", \"Double check the rule for integrating $e^{ax}$.\"],\n [\"{a}*exp({b}/{c}*x)\", \"Double check the rule for integrating $e^{ax}$.\"],\n [\"{a*c}/({b}*x+{c})*e^(({b}*x+{c})/{c})\", \"You cannot use the power rule if there is a variable in the power. What is the rule for integrating the exponential function?\"],\n [\"{a*c}/({b}*x+{c})*e^(({b}*x+{c})/{c})+C\", \"You cannot use the power rule if there is a variable in the power. What is the rule for integrating the exponential function?\"]\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 )))Input all numbers as integers or fractions and not as decimals.

", "strings": ["."], "showStrings": false}, "variableReplacementStrategy": "originalfirst", "vsetRange": [0, 1], "marks": 1, "expectedVariableNames": [], "showPreview": true, "variableReplacements": [], "scripts": {}, "answerSimplification": "std"}, {"showCorrectAnswer": true, "checkingAccuracy": 0.001, "checkingType": "absdiff", "answer": "{a1}/{b1}ln(abs({b1}x+{c1}))+C", "prompt": "\n

$\\displaystyle f(x)=\\simplify[std]{{a1}/({b1}x+{c1})}$

\n

Input $\\displaystyle \\int f(x)\\;dx$ here.

\n

 

\n ", "customMarkingAlgorithm": "malrules:\n [\n [\"{a1}/{b1}ln(abs({b1}x+{c1}))\", \"Almost there! Did you forget to include the integration constant?\"],\n [\"{a1}*ln(abs({b1}x+{c1}))\", \"Did you remember to divide by the number in front of $x$? If you used substitution, double check the relationship between $du$ and $dx$.\"],\n [\"{a1}*ln(abs({b1}x+{c1}))+C\", \"Did you remember to divide by the number in front of $x$? If you used substitution, double check the relationship between $du$ and $dx$.\"],\n [\"-{a1}*{b1}/({b1}*x+{c1})^2+C\", \"It looks like you have differentiated rather than integrating.\"],\n [\"-{a1}*{b1}/({b1}*x+{c1})^2\", \"It looks like you have differentiated rather than integrating.\"],\n [\"{a1}*x/({b1}*x^2/2+{c1}x)\", \"You cannot integrate each term in a fraction individually. You need to look at the fraction as a whole. Hint: There is a number on top and a linear term on the bottom. Therefore this is a more general form of $\\\\frac{1}{x}$.\"],\n [\"{a1}*x/({b1}*x^2/2+{c1}x)+C\", \"You cannot integrate each term in a fraction individually. You need to look at the fraction as a whole. Hint: There is a number on top and a linear term on the bottom. Therefore this is a more general form of $\\\\frac{1}{x}$.\"],\n [\"{a1}/({b1}*x^2/2+{c1})+C\", \"You cannot just integrate one single part of a fraction individually. You need to look at the fraction as a whole. Hint: There is a number on top and a linear term on the bottom. Therefore this is a more general form of $\\\\frac{1}{x}$.\"],\n [\"{a1}/({b1}*x^2/2+{c1})\", \"You cannot just integrate one single part of a fraction individually. You need to look at the fraction as a whole. Hint: There is a number on top and a linear term on the bottom. Therefore this is a more general form of $\\\\frac{1}{x}$.\"]\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 )))Input all numbers as integers or fractions and not as decimals.

", "strings": ["."], "showStrings": false}, "variableReplacementStrategy": "originalfirst", "vsetRange": [0, 1], "marks": 1, "expectedVariableNames": [], "showPreview": true, "variableReplacements": [], "scripts": {}, "answerSimplification": "std"}], "advice": "", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Integrating simple functions.

"}, "preamble": {"css": "", "js": ""}, "type": "question"}, {"name": "Integration by substitution 2 (custom feedback)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "TEAME UCC", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/351/"}, {"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}], "ungrouped_variables": ["c", "b", "a"], "functions": {}, "tags": [], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Integration by susbtitution, no hint given

"}, "preamble": {"css": "", "js": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "parts": [{"type": "jme", "checkingAccuracy": 0.001, "marks": 1, "vsetRangePoints": 5, "answer": "2(1+e^x)^(3/2)/3+C", "unitTests": [], "showFeedbackIcon": true, "expectedVariableNames": [], "prompt": "

$\\int e^x \\sqrt{1+e^x} \\ dx$

", "customMarkingAlgorithm": "malrules:\n [\n [\"2/3*(1+e^x)^(3/2)\", \"Almost there! Did you forget to include the integration constant?\"],\n [\"e^x+2/3*e^(3x/2)\", \"$\\\\sqrt{1+e^x} \\\\neq \\\\sqrt{1}+\\\\sqrt{e^x}$. Hint: Try substitution.\"],\n [\"e^x+2/3*e^(3x/2)+C\", \"$\\\\sqrt{1+e^x} \\\\neq \\\\sqrt{1}+\\\\sqrt{e^x}$. Hint: Try substitution.\"],\n [\"2/3*(u)^(3/2)\", \"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 [\"2/3*(u)^(3/2)+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 [\"3/2*(1+e^x)^(3/2)\", \"You have multiplied by the new power rather than dividing by it.\"],\n [\"3/2*(1+e^x)^(3/2)+C\", \"You have multiplied by the new power rather than dividing by it.\"],\n [\"3/2*u^(3/2)+C\", \"You have multiplied by the new power rather than dividing by it.\"],\n [\"3/2*u^(3/2)\", \"You have multiplied by the new power rather than dividing by it.\"],\n [\"e^x*sqrt(x+e^x)+C\",\"You cannot simply integrate individual terms that are multiplied together. Hint: Try substitution.\"],\n [\"e^x*sqrt(x+e^x)\",\"You cannot simply integrate individual terms that are multiplied together. Hint: Try substitution.\"],\n [\"u^(1/2)+C\",\"You have not actually integrated anything. You simply substituted for $1+e^x$.\"],\n [\"u^(1/2)\",\"You have not actually integrated anything. You simply substituted for $1+e^x$.\"],\n [\"(1+e^x)^(1/2)+C\",\"You have not actually integrated anything. You simply substituted for $1+e^x$ and then subbed back in again.\"],\n [\"(1+e^x)^(1/2)\",\"You have not actually integrated anything. You simply substituted for $1+e^x$ 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 )))$\\int\\frac{dx}{\\var{a}x+\\var{b}}$.

\n

Answer in terms of the natural log, represented by ln( ).

", "customMarkingAlgorithm": "malrules:\n [\n [\"1/{a}ln({a}x+{b})\", \"Almost there! Did you forget to include the integration constant?\"],\n [\"ln({a}x+{b})\", \"Did you remember to divide by the number in front of $x$? If you used substitution, double check the relationship between $du$ and $dx$.\"],\n [\"ln({a}x+{b})+C\", \"Did you remember to divide by the number in front of $x$? If you used substitution, double check the relationship between $du$ and $dx$.\"],\n [\"{a}*ln({a}x+{b})\", \"You have multiplied by the number in front of $x$ rather than dividing by it. If you used substitution, double check the relationship between $du$ and $dx$.\"],\n [\"{a}*ln({a}x+{b})+C\", \"You have multiplied by the number in front of $x$ rather than dividing by it. If you used substitution, double check the relationship between $du$ and $dx$.\"]\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 )))$\\int \\frac{x \\ dx}{\\var{c}+x^2}$.

\n

Answer in terms of the natural log, represented by ln( ).

", "customMarkingAlgorithm": "malrules:\n [\n [\"ln({c}+x^2)/2\", \"Almost there! Did you forget to include the integration constant?\"],\n [\"1/2*ln(u)\", \"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/2*ln(u)+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 [\"ln(u)+C\", \"Double check the relationship between $du$ and $dx$. Did you sub in correctly here?\"],\n [\"ln(u)\", \"Double check the relationship between $du$ and $dx$. Did you sub in correctly here?\"],\n [\"ln({c}+x^2)+C\", \"Double check the relationship between $du$ and $dx$. Did you sub in correctly here?\"],\n [\"ln({c}+x^2)\", \"Double check the relationship between $du$ and $dx$. Did you sub in correctly here?\"],\n [\"1/(2({c}+x^2))\",\"You have not actually integrated anything. You simply substituted for ${c}+x^2$ and then subbed back in again.\"],\n [\"1/(2({c}+x^2))+C\",\"You have not actually integrated anything. You simply substituted for ${c}+x^2$ and then subbed back in again.\"],\n [\"1/(2u)\",\"You have not actually integrated anything. You simply substituted for ${c}+x^2$.\"],\n [\"1/(2u)+C\",\"You have not actually integrated anything. You simply substituted for ${c}+x^2$.\"]\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 )))integration by Susbtitution

", "rulesets": {}, "statement": "

Evaluate the following indefinite integrals using integration by substitution. Use the letter C to represent any unknown constants.

", "variable_groups": [], "variables": {"c": {"description": "", "templateType": "anything", "name": "c", "definition": "random(1..9)", "group": "Ungrouped variables"}, "a": {"description": "", "templateType": "anything", "name": "a", "definition": "random(2..6)", "group": "Ungrouped variables"}, "b": {"description": "", "templateType": "anything", "name": "b", "definition": "random(1..8 except a)", "group": "Ungrouped variables"}}, "type": "question"}, {"name": "Indefinite integral by substitution (custom feedback)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "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/"}], "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", "variablesTest": {"condition": "", "maxRuns": 100}, "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "tags": []}, {"name": "Indefinite integral (custom feedback)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "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/"}], "variablesTest": {"maxRuns": 100, "condition": ""}, "functions": {}, "tags": [], "parts": [{"variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "showFeedbackIcon": true, "variableReplacements": [], "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "gaps": [{"variableReplacementStrategy": "originalfirst", "failureRate": 1, "showPreview": true, "customMarkingAlgorithm": "malrules:\n [\n [\"({b}/{a})*(e^({a}*x))-(({b1}/{a1})*cos({a1}*x))+({a2}/{c3+1})*(x^{(c3+1)})\", \"Almost there! Did you forget to include the integration constant?\"],\n [\"{a*b}*(e^({a}*x))+{a1*b1}*cos({a1}*x)+{a2}*{c3}*x^{(c3-1)}\", \"It looks like you have differentiated rather than integrating.\"],\n [\"{a*b}*(e^({a}*x))+{a1*b1}*cos({a1}*x)+{a2}*{c3}*x^{(c3-1)}+C\", \"It looks like you have differentiated rather than integrating.\"],\n [\"{a*b}*(e^({a}*x))+{a1*b1}*cos({a1}*x)+({a2}/{c3+1})*x^{(c3+1)}+C\", \"Are you sure that you have integrated each term rather than differentiating?\"],\n [\"{a*b}*(e^({a}*x))+{a1*b1}*cos({a1}*x)+({a2}/{c3+1})*x^{(c3+1)}\", \"Are you sure that you have integrated each term rather than differentiating?\"],\n [\"({b}/{a})*(e^({a}*x))+{a1*b1}*cos({a1}*x)+({a2}/{c3+1})*x^{(c3+1)}+C\", \"Are you sure that you have integrated each term rather than differentiating?\"],\n [\"({b}/{a})*(e^({a}*x))+{a1*b1}*cos({a1}*x)+({a2}/{c3+1})*x^{(c3+1)}\", \"Are you sure that you have integrated each term rather than differentiating?\"],\n [\"{a*b}*(e^({a}*x))-({b1}/{a1})*cos({a1}*x)+({a2}/{c3+1})*x^{(c3+1)}\", \"Are you sure that you have integrated each term rather than differentiating?\"],\n [\"{a*b}*(e^({a}*x))-({b1}/{a1})*cos({a1}*x)+({a2}/{c3+1})*x^{(c3+1)}+C\", \"Are you sure that you have integrated each term rather than differentiating?\"],\n [\"({b}/{a})*(e^({a}*x))+({(b1)}/{a1})*cos({a1}*x)+({a2}/{c3+1})*(x^{(c3+1)})+C\", \"Double check the rule for integrating $\\\\sin x $.\"],\n [\"({b}/{a})*(e^({a}*x))+({(b1)}/{a1})*cos({a1}*x)+({a2}/{c3+1})*(x^{(c3+1)})\", \"Double check the rule for integrating $\\\\sin x $.\"],\n [\"{b}*(e^({a}*x))-{b1}*cos({a1}*x)+({a2}/{c3+1})*(x^{(c3+1)})+C\", \"Have another look at how you integrated $\\\\var{b} e^{\\\\var{a}x}$ and $\\\\sin (\\\\var{a1}x)$. Did you remember to divide by the number in front of $x$ in each case?\"],\n [\"{b}*(e^({a}*x))-{b1}*cos({a1}*x)+({a2}/{c3+1})*(x^{(c3+1)})\", \"Have another look at how you integrated $\\\\var{b} e^{\\\\var{a}x}$ and $\\\\sin (\\\\var{a1}x)$. Did you remember to divide by the number in front of $x$ in each case?\"],\n [\"{b}*(e^({a}*x))+{b1}*cos({a1}*x)+({a2}/{c3+1})*(x^{(c3+1)})+C\", \"Have another look at how you integrated $\\\\var{b} e^{\\\\var{a}x}$ and $\\\\sin (\\\\var{a1}x)$. Did you remember to divide by the number in front of $x$ in each case? Also, double check the rule for integrating $\\\\sin(x)$.\"],\n [\"{b}*(e^({a}*x))+{b1}*cos({a1}*x)+({a2}/{c3+1})*(x^{(c3+1)})\", \"Have another look at how you integrated $\\\\var{b} e^{\\\\var{a}x}$ and $\\\\sin (\\\\var{a1}x)$. Did you remember to divide by the number in front of $x$ in each case? Also, double check the rule for integrating $\\\\sin(x)$.\"],\n [\"({b}/{a})*(e^({a}*x))-{b1}*cos({a1}*x)+({a2}/{c3+1})*(x^{(c3+1)})\", \"Have another look at how you integrated $\\\\sin (\\\\var{a1}x)$. Did you remember to divide by the number in front of $x$?\"],\n [\"({b}/{a})*(e^({a}*x))-{b1}*cos({a1}*x)+({a2}/{c3+1})*(x^{(c3+1)})+C\", \"Have another look at how you integrated $\\\\sin (\\\\var{a1}x)$. Did you remember to divide by the number in front of $x$?\"],\n [\"({b}/{a})*(e^({a}*x))+{b1}*cos({a1}*x)+({a2}/{c3+1})*(x^{(c3+1)})\", \"Have another look at how you integrated $\\\\sin (\\\\var{a1}x)$. Did you remember to divide by the number in front of $x$? Also, double check the rule for integrating $\\\\sin(x)$.\"],\n [\"({b}/{a})*(e^({a}*x))+{b1}*cos({a1}*x)+({a2}/{c3+1})*(x^{(c3+1)})+C\", \"Have another look at how you integrated $\\\\sin (\\\\var{a1}x)$. Did you remember to divide by the number in front of $x$? Also, double check the rule for integrating $\\\\sin(x)$.\"],\n [\"{b}*(e^({a}*x))-({b1}/{a1})*cos({a1}*x)+({a2}/{c3+1})*(x^{(c3+1)})\", \"Have another look at how you integrated $\\\\var{b} e^{\\\\var{a}x}$. Did you remember to divide by the number in front of $x$?\"],\n [\"{b}*(e^({a}*x))-({b1}/{a1})*cos({a1}*x)+({a2}/{c3+1})*(x^{(c3+1)})+C\", \"Have another look at how you integrated $\\\\var{b} e^{\\\\var{a}x}$. Did you remember to divide by the number in front of $x$?\"],\n [\"{b}*(e^({a}*x))+({b1}/{a1})*cos({a1}*x)+({a2}/{c3+1})*(x^{(c3+1)})\", \"Have another look at how you integrated $\\\\var{b} e^{\\\\var{a}x}$. Did you remember to divide by the number in front of $x$? Also, double check the rule for integrating $\\\\sin(x)$.\"],\n [\"{b}*(e^({a}*x))+({b1}/{a1})*cos({a1}*x)+({a2}/{c3+1})*(x^{(c3+1)})+C\", \"Have another look at how you integrated $\\\\var{b} e^{\\\\var{a}x}$. Did you remember to divide by the number in front of $x$? Also, double check the rule for integrating $\\\\sin(x)$.\"] \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 )))Input all numbers as integers or fractions and not decimals.

", "partialCredit": 0, "strings": ["."], "showStrings": false}, "unitTests": [], "answer": "({b}/{a}) * (e ^({a}*x)) + (({(-b1)}/{a1}) * Cos({a1}*x)) + ({a2}/{c3+1}) * (x ^ {(c3 + 1)})+C", "vsetRangePoints": 5}], "prompt": "

$\\simplify[std]{f(x) = {b}*e^({a}*x)+{b1}*Sin({a1}*x)+{a2}*x^{c3}}$

\n

$\\displaystyle \\int\\;f(x)\\,dx=\\;$[[0]]

\n

Input all numbers as integers or fractions and not decimals. Remember to include the constant of integration $C$.

\n

Click on Show steps to get more information. You will not lose any marks by doing so.

", "type": "gapfill", "sortAnswers": false, "scripts": {}, "marks": 0, "steps": [{"variableReplacementStrategy": "originalfirst", "scripts": {}, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "marks": 0, "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "unitTests": [], "prompt": "

Note that \\[\\begin{eqnarray*} &\\int& \\;x^n\\;dx&=&\\frac{x^{n+1}}{n+1}+C,\\;\\;n \\neq -1\\\\ &\\int& \\;\\sin(ax)\\;dx &=& -\\frac{1}{a}\\cos(ax)+C\\\\ &\\int& \\;e^{ax}\\;dx &=& \\frac{1}{a}e^{ax}+C\\\\ \\end{eqnarray*}\\]

", "type": "information"}], "unitTests": [], "stepsPenalty": 0}], "rulesets": {"surdf": [{"pattern": "a/sqrt(b)", "result": "(sqrt(b)*a)/b"}], "std": ["all", "!collectNumbers", "fractionNumbers"]}, "variable_groups": [], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Find $\\displaystyle \\int ae ^ {bx}+ c\\sin(dx) + px ^ {q}\\;dx$.

"}, "advice": "\n

Note that \\[\\begin{eqnarray*} &\\int& \\;x^n\\;dx&=&\\frac{x^{n+1}}{n+1}+C,\\;\\;n \\neq -1\\\\ &\\int& \\;\\sin(ax)\\;dx &=& -\\frac{1}{a}\\cos(ax)+C\\\\ &\\int& \\;e^{ax}\\;dx &=& \\frac{1}{a}e^{ax}+C\\\\ \\end{eqnarray*}\\]

\n

Splitting the integral into three parts and using the above information we have:
\\[\\begin{eqnarray*}\\simplify[std]{Int({b} * e ^ ({a}*x) + {b1} * Sin({a1}*x) + {a2} * x ^ {c3},x)}&=&\\simplify[std]{Int({b} * e ^ ({a}*x),x)+Int({b1} * Sin({a1}*x),x)+Int({a2} * x ^ {c3},x) }\\\\ &=&\\simplify[std]{({b}/{a}) * (e ^({a}*x)) + (({(-b1)}/{a1}) * Cos({a1}*x)) + ({a2}/{c3+1}) * (x ^ {(c3 + 1)})+C} \\end{eqnarray*}\\]

\n \n", "preamble": {"css": "", "js": ""}, "ungrouped_variables": ["s3", "a", "a2", "b1", "s2", "s4", "c3", "s1", "a1", "s5", "b"], "variables": {"s4": {"group": "Ungrouped variables", "description": "", "name": "s4", "templateType": "anything", "definition": "random(1,-1)"}, "s1": {"group": "Ungrouped variables", "description": "", "name": "s1", "templateType": "anything", "definition": "random(1,-1)"}, "a2": {"group": "Ungrouped variables", "description": "", "name": "a2", "templateType": "anything", "definition": "s4*random(3..9)"}, "b": {"group": "Ungrouped variables", "description": "", "name": "b", "templateType": "anything", "definition": "s2*random(2..9)"}, "s5": {"group": "Ungrouped variables", "description": "", "name": "s5", "templateType": "anything", "definition": "random(1,-1)"}, "s3": {"group": "Ungrouped variables", "description": "", "name": "s3", "templateType": "anything", "definition": "random(1,-1)"}, "c3": {"group": "Ungrouped variables", "description": "", "name": "c3", "templateType": "anything", "definition": "s5*random(2..8)"}, "a1": {"group": "Ungrouped variables", "description": "", "name": "a1", "templateType": "anything", "definition": "random(2..5)"}, "s2": {"group": "Ungrouped variables", "description": "", "name": "s2", "templateType": "anything", "definition": "random(1,-1)"}, "b1": {"group": "Ungrouped variables", "description": "", "name": "b1", "templateType": "anything", "definition": "s3*random(2..9)"}, "a": {"group": "Ungrouped variables", "description": "", "name": "a", "templateType": "anything", "definition": "s1*random(2..5)"}}, "statement": "\n

Integrate the following function $f(x)$.

\n

 
Input the constant of integration as $C$.

\n \n", "type": "question"}, {"name": "Indefinite integral 2 (custom feedback)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "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/"}], "tags": [], "metadata": {"description": "

Find $\\displaystyle \\int \\frac{a}{(bx+c)^n}\\;dx$

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Find the following indefinite integral.

\n

Input the constant of integration as $C$.

", "advice": "\n\t

Let $y = \\simplify[std]{{a}*x+{d}}$. Then,
\\[\\simplify[std]{{b}/(({a}*x+{d})^{n})} = \\simplify[std]{{b}/(y^{n})}.\\]

\n\t

Now,
\\[\\int \\simplify[std]{{b}/({a}*x+{d})^{n}} dx = \\int \\simplify[std]{{b}/(y^{n})} \\frac{dx}{dy} dy.\\]

\n\t

Rearrange $y = \\simplify[std]{{a}x+{d}}$ to get $\\displaystyle x = \\simplify[std]{(y-{b})/{a}}$, and hence $\\displaystyle\\frac{dx}{dy} = \\frac{1}{\\var{a}}$.

\n\t

$\\displaystyle \\int \\frac{1}{y^n} dx = -\\frac{1}{(n-1)y^{n-1}} + C$ is a standard integral, so we can now calculate the desired integral:

\n\t

\\[\\int \\simplify[std]{{b}/(y^{n})} \\frac{dx}{dy} dy = \\simplify[std]{{b}/({n-1}*y^{n-1})} \\cdot \\frac{1}{\\var{a}} + C = \\simplify[std]{(-{b})/({a*(n-1)}*({a}*x+{d})^{n-1}) + C}.\\]

\n\t \n\t", "rulesets": {"surdf": [{"pattern": "a/sqrt(b)", "result": "(sqrt(b)*a)/b"}], "std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "variables": {"b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..5)", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "", "templateType": "anything"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(3..5)", "description": "", "templateType": "anything"}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["n", "b", "a", "d"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "\n\t\t\t

$\\displaystyle \\int \\simplify[std]{{b}/(({a}*x+{d})^{n})} dx= \\phantom{{}}$[[0]]

\n\t\t\t

Input all numbers as integers or fractions and not decimals. Remember to include the constant of integration $C$.

\n\t\t\t

Click on Show steps to get help. You will lose 1 mark by doing so.

\n\t\t\t \n\t\t\t", "stepsPenalty": 1, "steps": [{"type": "information", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "

 \\[\\int (ax+b)^n \\;dx = \\frac{1}{a(n+1)}(ax+b)^{n+1}+C\\]

"}], "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 3, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "malrules:\n [\n [\"{-b}/({a*(n-1)}*({a}*x+{d})^{n-1})\", \"Almost there! Did you forget to include the integration constant?\"],\n [\"{-b}/({n-1}*({a}*x+{d})^{n-1})+C\", \"You are on the right track but it looks like you forgot to divide by the number in front of $x$. If you used substitution, double check the relationship between $du$ and $dx$.\"],\n [\"{-b}/({n-1}*({a}*x+{d})^{n-1})\", \"You are on the right track but it looks like you forgot to divide by the number in front of $x$. If you used substitution, double check the relationship between $du$ and $dx$.\"],\n [\"{b}/{a}*ln(({a}*x+{d})^{n})+C\", \"$\\\\int \\\\frac{1}{x} dx = \\\\ln x$. However, you can only use the $\\\\ln$ rule if there is a linear term (without a power) below the line i.e. $ax+b$ but not $ax^n+b$ or $(ax+b)^n$ for $n \\\\neq 1$ etc.\"],\n [\"{b}/{a}*ln(({a}*x+{d})^{n})\", \"$\\\\int \\\\frac{1}{x} dx = \\\\ln x$. However, you can only use the $\\\\ln$ rule if there is a linear term (without a power) below the line i.e. $ax+b$ but not $ax^n+b$ or $(ax+b)^n$ for $n \\\\neq 1$ etc.\"],\n [\"{b}*ln(({a}*x+{d})^{n})+C\", \"$\\\\int \\\\frac{1}{x} dx = \\\\ln x$. However, you can only use the $\\\\ln$ rule if there is a linear term (without a power) below the line i.e. $ax+b$ but not $ax^n+b$ or $(ax+b)^n$ for $n \\\\neq 1$ etc.\"],\n [\"{b}*ln(({a}*x+{d})^{n})\", \"$\\\\int \\\\frac{1}{x} dx = \\\\ln x$. However, you can only use the $\\\\ln$ rule if there is a linear term (without a power) below the line i.e. $ax+b$ but not $ax^n+b$ or $(ax+b)^n$ for $n \\\\neq 1$ etc.\"],\n [\"-1/({a*(n-1)}*({a}*x+{d})^{n-1})+C\", \"Don't forget about the number that was above the line!\"],\n [\"-1/({a*(n-1)}*({a}*x+{d})^{n-1})\", \"Don't forget about the number that was above the line!\"]\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 )))Input all numbers as integers or fractions and not decimals.

"}, "valuegenerators": [{"name": "c", "value": ""}, {"name": "x", "value": ""}]}], "sortAnswers": false}]}, {"name": "Indefinite integral by substitution 2 (custom feedback)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "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/"}], "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", "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}, "preamble": {"css": "", "js": ""}, "functions": {}, "ungrouped_variables": ["m", "a", "b", "s1"]}, {"name": "Indefinite integral by substitution 3 (custom feedback)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "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/"}], "variablesTest": {"maxRuns": 100, "condition": ""}, "functions": {}, "tags": [], "parts": [{"variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "showFeedbackIcon": true, "variableReplacements": [], "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "gaps": [{"variableReplacementStrategy": "originalfirst", "failureRate": 1, "showPreview": true, "customMarkingAlgorithm": "malrules:\n [\n [\"ln(abs({a}*x^2+{b}*x+{c}))\", \"Almost there! Did you forget to include the integration constant?\"],\n [\"ln(u)+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 [\"ln(u)\",\"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/({a}*x^2+{b}*x+{c})+C\",\"You haven't actually integrated here. You simply subbed in for $\\\\simplify[std]{{a}*x^2+{b}*x+{c}}$ and then subbed back again.\"],\n [\"1/({a}*x^2+{b}*x+{c})\",\"You haven't actually integrated here. You simply subbed in for $\\\\simplify[std]{{a}*x^2+{b}*x+{c}}$ and then subbed back again.\"],\n [\"1/u+C\",\"You haven't actually integrated here. You simply subbed in for $\\\\simplify[std]{{a}*x^2+{b}*x+{c}}$. 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/u\",\"You haven't actually integrated here. You simply subbed in for $\\\\simplify[std]{{a}*x^2+{b}*x+{c}}$. 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 [\"({a}*x^2+{b}*x)/({a}*x^3/3+{b}*x^2/2+{c}*x)+C\",\"You cannot simply integrate each part of a quotient 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}*x^2+{b}*x)/({a}*x^3/3+{b}*x^2/2+{c}*x)\",\"You cannot simply integrate each part of a quotient 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 [\"(2*{a}*({a}*x^2+{b}*x+{c})-(2*{a}*x+{b})^2)/(({a}*x^2+{b}*x+{c})^2)+C\", \"It looks like you have differentiated rather than integrating. Remember, there is no quotient rule for integration. If you have a quotient, check if the derivative of the bottom is what's on top of the line (or a multiple of what's on top of the line). If so, try substitution.\"],\n [\"(2*{a}*({a}*x^2+{b}*x+{c})-(2*{a}*x+{b})^2)/(({a}*x^2+{b}*x+{c})^2)\", \"It looks like you have differentiated rather than integrating. Remember, there is no quotient rule for integration. If you have a quotient, check if the derivative of the bottom is what's on top of the line (or a multiple of what's on top of the line). If so, try substitution.\"]\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

", "partialCredit": 0, "strings": ["."], "showStrings": false}, "unitTests": [], "answer": "ln(abs((({a} * (x ^ 2)) + ({b} * x) + {c})))+C", "vsetRangePoints": 5}], "prompt": "

\\[I=\\simplify[std]{Int(({2 * a} * x + {b}) / ({a} * x ^ 2 + {b} * x + {c}),x)}\\]

\n

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

\n

Input the constant of integration as $C$.

\n

Input all numbers as integers or fractions not as decimals.

\n

Click on Show steps if you need help. You will lose 1 mark if you do so.

", "type": "gapfill", "sortAnswers": false, "scripts": {}, "marks": 0, "steps": [{"variableReplacementStrategy": "originalfirst", "scripts": {}, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "marks": 0, "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "variableReplacements": [], "unitTests": [], "prompt": "

Try the substitution $u=\\simplify[std]{{a} * (x ^ 2) + ({b} * x) + {c}}$

", "type": "information"}], "unitTests": [], "stepsPenalty": 1}], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "variable_groups": [], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Find $\\displaystyle \\int \\frac{2ax + b}{ax ^ 2 + bx + c}\\;dx$

"}, "advice": "\n\t

This exercise is best solved by using substitution.

\n\t

Note that the numerator $\\simplify[std]{{2 * a} * x + {b}}$ of \\[\\simplify[std]{({2 * a} * x + {b}) / ({a} * x ^ 2 + {b} * x + {c})}\\] is the derivative of the denominator $\\simplify[std]{{a} * x ^ 2 + {b} * x + {c}}$

\n\t

So if you use as your substitution $u=\\simplify[std]{{a} * (x ^ 2) + ({b} * x) + {c}}$ you then have $\\simplify[std]{ du = ({2 * a} * x + {b}) * dx}$

\n\t

Hence we can replace $\\simplify[std]{ ({2 * a} * x + {b}) * dx}$ by $du$

\n\t

Hence the integral becomes:

\n\t

\\[\\begin{eqnarray*} I&=&\\int\\;\\frac{du}{u}\\\\ &=&\\ln(|u|)+C\\\\ &=& \\simplify[std]{ln(abs({a} * (x ^ 2) + ({b} * x) + {c}))+C} \\end{eqnarray*}\\]

\n\t

A Useful Result
This example can be generalised.
Suppose \\[I = \\int\\; \\frac{f'(x)}{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 \\frac{du}{u} = \\ln(|u|)+ C = \\ln(|f(x)|)+C\\]

\n\t", "preamble": {"css": "", "js": ""}, "ungrouped_variables": ["b1", "b", "a", "test", "f", "s1", "c1", "c"], "variables": {"s1": {"group": "Ungrouped variables", "description": "", "name": "s1", "templateType": "anything", "definition": "random(1,-1)"}, "c": {"group": "Ungrouped variables", "description": "", "name": "c", "templateType": "anything", "definition": "a*b1^2+c1"}, "test": {"group": "Ungrouped variables", "description": "", "name": "test", "templateType": "anything", "definition": "4*a*c-b^2"}, "b": {"group": "Ungrouped variables", "description": "", "name": "b", "templateType": "anything", "definition": "2*a+b1"}, "a": {"group": "Ungrouped variables", "description": "", "name": "a", "templateType": "anything", "definition": "random(1..5)"}, "c1": {"group": "Ungrouped variables", "description": "", "name": "c1", "templateType": "anything", "definition": "max(-10,f+1)+random(1..5)"}, "b1": {"group": "Ungrouped variables", "description": "", "name": "b1", "templateType": "anything", "definition": "s1*random(1..5)"}, "f": {"group": "Ungrouped variables", "description": "", "name": "f", "templateType": "anything", "definition": "-a*(1+b1)^2"}}, "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.

\n\t

 

\n\t \n\t \n\t", "type": "question"}, {"name": "Definite Integrals (a) (custom feedback)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "cormac breen", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/306/"}, {"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}], "preamble": {"js": "", "css": ""}, "variable_groups": [], "advice": "

Definite Integrals

", "rulesets": {}, "functions": {}, "tags": [], "parts": [{"prompt": "

$\\int_0^1\\cos(\\frac{\\pi t}{2})\\mathrm{dt}$.

\n

To write $\\pi$ in your answer simply write pi.

", "vsetRange": [0, 1], "showFeedbackIcon": true, "vsetRangePoints": 5, "extendBaseMarkingAlgorithm": true, "checkVariableNames": false, "unitTests": [], "customMarkingAlgorithm": "malrules:\n [\n [\"-2/pi\", \"Check the following two things: (1) Double check that you used the correct rule for integrating $\\\\cos x$. (2) Make sure you filled in the top limit of integration first and subtracted what you got when you filled in the bottom limit - not the other way around.\"],\n [\"-pi/2\",\"It looks like you differentiated $\\\\cos \\\\left( \\\\frac{\\\\pi t}{2} \\\\right)$ instead of integrating.\"],\n [\"pi/2\",\"It looks like you multiplied by the number in front of $t$ rather than dividing by it.\"]\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 )))Find the following definite integral

", "metadata": {"description": "

Definite Integrals

", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question"}, {"name": "Definite Integrals (b) (custom feedback)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "cormac breen", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/306/"}, {"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}], "ungrouped_variables": [], "functions": {}, "tags": [], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Definite Integrals

"}, "preamble": {"css": "", "js": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "parts": [{"type": "jme", "checkingAccuracy": 0.001, "marks": 1, "vsetRangePoints": 5, "answer": "ln(e+1)", "unitTests": [], "showFeedbackIcon": true, "expectedVariableNames": [], "prompt": "

$\\int_0^1\\frac{e^z+1}{e^z+z}\\mathrm{dz}$.

\n

Express your answer using the natural log, ln().

\n

Hint: make a substition using the lower line.

", "customMarkingAlgorithm": "malrules:\n [\n [\"ln(1)-ln(0)\", \"You must sub back in for $u$ before filling in your limits of integration. Also, note that $\\\\ln(0)$ does not exist. $\\\\ln(x)$ is only defined for positive values of $x$. Try entering $\\\\ln(0)$ into your calculator.\"],\n [\"1/(e+1)-1\",\"You didn't actually integrate before subbing back in for $u$.\"],\n [\"1-1/0\",\"You didn't actually integrate. You simply subbed in for $e^z+z$. Also, note that $\\\\frac{1}{0}$ is not defined so that should highlight that something is wrong!\"]\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 )))Definite Integrals

", "rulesets": {}, "statement": "

Find the following definite integral

", "variable_groups": [], "variables": {}, "type": "question"}]}], "name": "Integration by Substitution_2019 (custom feedback)", "timing": {"timeout": {"message": "", "action": "none"}, "timedwarning": {"message": "", "action": "none"}, "allowPause": true}, "feedback": {"showanswerstate": true, "showactualmark": true, "allowrevealanswer": true, "feedbackmessages": [], "advicethreshold": 0, "showtotalmark": true, "intro": ""}, "showQuestionGroupNames": false, "navigation": {"allowregen": true, "preventleave": true, "browse": true, "reverse": true, "showresultspage": "oncompletion", "showfrontpage": true, "onleave": {"message": "", "action": "none"}}, "showstudentname": true, "metadata": {"description": "

Integration by Substitution

\n

rebelmaths

\n

rebel

", "licence": "Creative Commons Attribution 4.0 International"}, "percentPass": 0, "type": "exam", "contributors": [{"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/"}], "extensions": [], "custom_part_types": [], "resources": []}