// Numbas version: exam_results_page_options {"name": "Indefinite integral by substitution 3 (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 [\"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$

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