// Numbas version: exam_results_page_options {"name": "Indefinite integral (custom feedback)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"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$.

"}, "name": "Indefinite integral (custom feedback)", "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": ""}, "extensions": [], "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", "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/"}]}