// Numbas version: exam_results_page_options {"name": "Indefinite integral 2 (custom feedback)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "preventleave": false, "showfrontpage": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "variable_groups": [], "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", "tags": [], "parts": [{"marks": 0, "showCorrectAnswer": true, "customMarkingAlgorithm": "", "steps": [{"marks": 0, "prompt": "

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

", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "unitTests": [], "variableReplacementStrategy": "originalfirst", "scripts": {}, "showFeedbackIcon": true, "type": "information"}], "extendBaseMarkingAlgorithm": true, "scripts": {}, "prompt": "\n\t\t\t

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

\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", "variableReplacements": [], "showFeedbackIcon": true, "unitTests": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"checkingType": "reldiff", "marks": 3, "notallowed": {"strings": ["."], "showStrings": false, "partialCredit": 0, "message": "

Input all numbers as integers or fractions and not decimals.

"}, "showCorrectAnswer": true, "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),\"feedback\":x],\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 $\\displaystyle \\int \\frac{a}{(bx+c)^n}\\;dx$

", "licence": "Creative Commons Attribution 4.0 International"}, "extensions": [], "contributors": [{"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/", "name": "Julie Crowley"}, {"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/", "name": "Clodagh Carroll"}], "type": "question", "rulesets": {"surdf": [{"result": "(sqrt(b)*a)/b", "pattern": "a/sqrt(b)"}], "std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "statement": "

Find the following indefinite integral.

\n

Input the constant of integration as $C$.

", "name": "Indefinite integral 2 (custom feedback)", "ungrouped_variables": ["n", "b", "a", "d"], "variables": {"b": {"group": "Ungrouped variables", "description": "", "definition": "random(2..5)", "templateType": "anything", "name": "b"}, "d": {"group": "Ungrouped variables", "description": "", "definition": "random(1..9)", "templateType": "anything", "name": "d"}, "n": {"group": "Ungrouped variables", "description": "", "definition": "random(3..5)", "templateType": "anything", "name": "n"}, "a": {"group": "Ungrouped variables", "description": "", "definition": "random(2..9)", "templateType": "anything", "name": "a"}}, "preamble": {"js": "", "css": ""}}]}], "contributors": [{"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/", "name": "Julie Crowley"}, {"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/", "name": "Clodagh Carroll"}]}