// Numbas version: finer_feedback_settings {"name": "Simon's copy of Julie's copy of First order differential equations 5", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"parts": [{"type": "gapfill", "prompt": "
Solution is:
\n$y=\\;\\;$[[0]]
\nInput all numbers as integers or fractions – not as decimals.
", "scripts": {}, "sortAnswers": false, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "unitTests": [], "showCorrectAnswer": true, "variableReplacements": [], "gaps": [{"type": "jme", "showPreview": true, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "notallowed": {"strings": ["."], "partialCredit": 0, "showStrings": false, "message": "Input all numbers as integers or fractions.
"}, "scripts": {}, "vsetRange": [0.5, 1], "customMarkingAlgorithm": "", "checkingAccuracy": 0.001, "vsetRangePoints": 5, "showFeedbackIcon": true, "checkVariableNames": false, "unitTests": [], "showCorrectAnswer": true, "answerSimplification": "std", "checkingType": "absdiff", "answer": "({b} / {(a + n)}) * (x ^ {n} + ({c} * (x ^ { - a})))", "variableReplacements": [], "marks": 3, "failureRate": 1, "variableReplacementStrategy": "originalfirst"}], "extendBaseMarkingAlgorithm": true, "marks": 0, "variableReplacementStrategy": "originalfirst"}], "metadata": {"description": "Find the solution of $\\displaystyle x\\frac{dy}{dx}+ay=bx^n,\\;\\;y(1)=c$
\nrebelmaths
", "licence": "Creative Commons Attribution 4.0 International"}, "preamble": {"css": "", "js": ""}, "ungrouped_variables": ["a", "c", "b", "n"], "variable_groups": [], "advice": "$\\displaystyle{x\\frac{dy}{dx}+\\var{a}y=\\simplify[std]{{b}x^{n}}}$ can be solved by the integrating factor method.
\nFirst we divide both sides by $x$ to obtain $\\displaystyle{\\frac{dy}{dx}+\\frac{\\var{a}}{x}y=\\simplify[std]{{b}x^{n-1}}}$
\nThis is now in the standard form $\\displaystyle{\\frac{dy}{dx}+a(x)y=b(x)}$ which we can solve by multiplying through by the integrating factor $e^{\\int a(x)dx}$
\n\nIn our example, $a(x) = \\frac{\\var{a}}{x}$ so $e^{\\int a(x)dx}=e^{\\int{\\frac{\\var{a}}{x}dx}}=e^{\\var{a}\\ln(x)}=x^\\var{a}$
\n\nHence multiplying both sides of $\\displaystyle{\\frac{dy}{dx}+\\frac{\\var{a}}{x}y=\\simplify[std]{{b}x^{n-1}}}$ by $x^\\var{a}$ gives
\n$\\displaystyle{x^\\var{a}\\frac{dy}{dx}+\\var{a}x^{\\var{a-1}}y=\\simplify[std]{{b}x^{n-1+a}}}$
\nWe note that we can rewrite the left hand side as $\\frac{d(x^{\\var{a}}y)}{dx}$ (product rule) and hence:
\n\\[\\frac{d(x^{\\var{a}}y)}{dx}=\\simplify[std]{{b}x^{a+n-1}}\\]
We can integrate both sides to get:
\\[x^{\\var{a}}y=\\simplify[std]{{b}/{a+n}x^{a+n}+A}\\]
to determine $A$ we use the condition $\\displaystyle{y(1)=\\simplify[std]{{b*(c+1)}/{a+n}}}$ and we see that:
\\[\\simplify[std]{{b*(c+1)}/{a+n}}=\\simplify[std]{{b}/{a+n}+A}\\]
\\[A = \\simplify[std]{{b*(c+1)}/{a+n}} - \\simplify[std]{{b}/{a+n} = {b*c}/{a+n}}\\]
and so the solution is:
\\[x^{\\var{a}}y=\\simplify[std]{{b}/{a+n}x^{a+n}+{b*c}/{a+n}} \\Rightarrow y=\\simplify[std]{{b}/{a+n}*(x^{n}+{c}*x^{-a})}\\]
Integrating Factor Method:
\nFind the solution of:
\\[x\\frac{dy}{dx}+\\var{a}y=\\simplify[std]{{b}x^{n}}\\]
which satisfies $\\displaystyle{y(1)=\\simplify[std]{{b*(c+1)}/{a+n}}}$
", "name": "Simon's copy of Julie's copy of First order differential equations 5", "tags": [], "extensions": [], "functions": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question", "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}