// Numbas version: finer_feedback_settings {"name": "Simon's copy of Integration by parts", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variables": {"s1": {"name": "s1", "group": "Ungrouped variables", "definition": "random(1,-1)", "templateType": "anything", "description": ""}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "s1*random(1..9)", "templateType": "anything", "description": ""}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "s2*random(1..9)", "templateType": "anything", "description": ""}, "s3": {"name": "s3", "group": "Ungrouped variables", "definition": "random(1,-1)", "templateType": "anything", "description": ""}, "s2": {"name": "s2", "group": "Ungrouped variables", "definition": "random(1,-1)", "templateType": "anything", "description": ""}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "s1*random(1..9)", "templateType": "anything", "description": ""}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..5)", "templateType": "anything", "description": ""}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "s3*random(2..5)", "templateType": "anything", "description": ""}}, "parts": [{"gaps": [{"checkingaccuracy": 0.001, "answer": "({a}/{c})*x+{c*b-a}/{c^2}", "answersimplification": "all", "marks": 2, "showCorrectAnswer": true, "vsetrangepoints": 5, "scripts": {}, "checkvariablenames": false, "notallowed": {"message": "
Do not input numbers as decimals, only as integers without the decimal point, or fractions
", "showStrings": false, "strings": ["."], "partialCredit": 0}, "expectedvariablenames": [], "vsetrange": [0, 1], "checkingtype": "absdiff", "type": "jme", "showpreview": true}], "steps": [{"type": "information", "showCorrectAnswer": true, "scripts": {}, "prompt": "\n \n \nThe formula for integrating by parts is
\\[ \\int u\\frac{dv}{dx} dx = uv - \\int v \\frac{du}{dx} dx. \\]
$I=\\displaystyle \\int \\simplify[std]{({a}x+{b})*e^({c}x)} dx $
You are given that the answer is of the form \\[I=g(x)e^{\\var{c}x}+C\\] for a polynomial $g(x)$. You have to find $g(x)$.
$g(x)=\\;$[[0]]
\nInput all numbers as fractions or integers and not decimals.
\nYou can get help by clicking on Show steps. You will lose 1 mark if you do.
\n ", "marks": 0, "showCorrectAnswer": true, "scripts": {}, "stepsPenalty": 1}, {"gaps": [{"checkingaccuracy": 0.001, "answer": "{a^2}/{c}*x^2+{2*a*b*c-2*a^2}/{c^2}*x+{b^2*c^2-2*a*b*c+2*a^2}/{c^3}", "answersimplification": "all", "marks": 3, "showCorrectAnswer": true, "vsetrangepoints": 5, "scripts": {}, "checkvariablenames": false, "notallowed": {"message": "Do not input numbers as decimals, only as integers without the decimal point, or fractions
", "showStrings": false, "strings": ["."], "partialCredit": 0}, "expectedvariablenames": [], "vsetrange": [0, 1], "checkingtype": "absdiff", "type": "jme", "showpreview": true}], "type": "gapfill", "prompt": "\nUse the result from the first part to find:
\n$\\displaystyle I=\\int \\simplify[std]{({a}x+{b})^2*e^({c}x)} dx $
\nYou are given that the answer is of the form \\[I=h(x)e^{\\var{c}x}+C\\] for a polynomial $h(x)$. You have to find $h(x)$.
\n$h(x)=\\;$[[0]]
\nInput all numbers as fractions or integers and not decimals.
\n ", "marks": 0, "showCorrectAnswer": true, "scripts": {}}], "functions": {}, "ungrouped_variables": ["a", "c", "b", "s3", "s2", "s1", "a1", "a2"], "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "name": "Simon's copy of Integration by parts", "preamble": {"css": "", "js": ""}, "metadata": {"notes": "\n \t\t3/08/2012:
\n \t\tAdded tags.
\n \t\tAdded description.
\n \t\tChecked calculation. OK.
\n \t\tGot rid of redundant instructions about inputting constant of integration.
\n \t\tPenalised use of steps in first part, 1 mark. Added message to that effect in first part.
\n \t\tAdded message about not inputting decimals in appropriate places.
\n \t\tChanged marks reflecting the use of steps and degree of difficulty in second part.
\n \t\tImproved Advice display.
\n \t\t", "description": "Given $\\displaystyle \\int (ax+b)e^{cx}\\;dx =g(x)e^{cx}+C$, find $g(x)$. Find $h(x)$, $\\displaystyle \\int (ax+b)^2e^{cx}\\;dx =h(x)e^{cx}+C$.
", "licence": "Creative Commons Attribution 4.0 International"}, "advice": "The formula for integrating by parts is
\\[ \\int u\\frac{dv}{dx} dx = uv - \\int v \\frac{du}{dx} dx. \\]
We choose $u = \\simplify[std]{{a}x+{b}}$ and $\\displaystyle\\frac{dv}{dx} = \\simplify[std]{e^({c}x)}$.
\nSo $\\displaystyle \\frac{du}{dx} = \\var{a}$ and $\\displaystyle v = \\simplify[std]{(1/{c})*e^({c}*x)}$.
\nHence,
\\[ \\begin{eqnarray} \\int \\simplify[std]{({a}*x+{b})*e^({c}*x)} dx &=& uv - \\int v \\frac{du}{dx} dx \\\\ &=& \\simplify[std]{({1}/{c})*({a}x+{b})*e^({c}x) - (1/{c})*Int(({a})*e^({c}x),x)} \\\\ &=& \\simplify[std]{(1/{c})*({a}x+{b})*e^({c}x) -({a}/{c^2})*e^({c}x) + C}\\\\ &=& \\simplify[std]{(({a}x+{b})/{c}-{a}/{c^2})*e^({c}*x) + C}\\\\ &=& \\simplify[std]{(({a}/{c})x+{b*c-a}/{c^2})*e^({c}*x) + C} \\end{eqnarray} \\]
Hence $\\displaystyle \\simplify[std]{g(x)=({a}/{c})*x+{c*b-a}/{c^2}}$
\nFor this part we choose $u = \\simplify[std]{({a}x+{b})^2}$ and $\\displaystyle \\frac{dv}{dx} = \\simplify[std]{e^({c}x)}$.
\nSo $\\displaystyle \\frac{du}{dx}$ = $\\simplify[std]{{2*a}*({a}*(x)+{b})}$ and $\\displaystyle v = \\simplify[std]{(1/{c})*e^({c}*x)}$.
\nHence,
\\[ \\begin{eqnarray*}I= \\int \\simplify[std]{({a}*x+{b})^2*e^({c}*x)} dx &=& uv - \\int v \\frac{du}{dx} dx \\\\ &=& \\simplify[std]{({1}/{c})*({a}x+{b})^2*e^({c}x) - (1/{c})*Int({2*a}*({a}x+{b})*e^({c}x),x)} \\\\ &=& \\simplify[std]{(1/{c})*({a}x+{b})^2*e^({c}x) -({2*a}/{c})*Int(({a}x+{b})*e^({c}x),x)}\\dots (*) \\end{eqnarray*}\\]
But in Part a we have aready worked out $\\displaystyle \\simplify[std]{Int(({a}x+{b})*e^({c}*x),x)=(({a}/{c})*x+({c*b-a}/{c^2}))*e^({c}*x)+C}$
\nSo on substituting this in equation (*) we find:
\\[ \\begin{eqnarray*}I&=& \\simplify[std]{(1/{c})*({a}x+{b})^2*e^({c}x) -({2*a}/{c})*(({a}/{c})*x+({c*b-a}/{c^2}))*e^({c}*x)+C}\\\\ &=& \\simplify[std]{({a^2}/{c}*x^2+{2*a*b*c-2*a^2}/{c^2}*x+{b^2*c^2-2*a*b*c+2*a^2}/{c^3})*e^({c}x) +C} \\end{eqnarray*}\\]
Hence $\\displaystyle \\simplify[std]{h(x)={a^2}/{c}*x^2+{2*a*b*c-2*a^2}/{c^2}*x+{b^2*c^2-2*a*b*c+2*a^2}/{c^3}}$
", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "variable_groups": [], "type": "question", "tags": ["Calculus", "Steps", "algebraic manipulation", "calculus", "exponential function", "integrals", "integration", "integration by parts", "integration of exponential function", "steps"], "variablesTest": {"maxRuns": 100, "condition": ""}, "statement": "\nFind the following indefinite integrals.
\nInput all numbers as fractions or integers and not decimals.
\n ", "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}], "resources": []}]}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}