// Numbas version: finer_feedback_settings {"name": "Integrating Factor 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Integrating Factor 2", "tags": [], "metadata": {"description": "

Find the solution of $\\displaystyle x\\frac{dy}{dx}+ay=bx^n,\\;\\;y(1)=c$

\n

\n
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Integrating Factor Method:

\n

Find the solution of:
\\[x\\frac{dy}{dx}+\\var{a}y=\\simplify[std]{{b}x^{n}}\\]

\n

which satisfies $\\displaystyle{y(1)=\\simplify[std]{{b*(c+1)}/{a+n}}}$

\n
\n
\n
\n
\n
\n
\n
", "advice": "

$\\displaystyle{x\\frac{dy}{dx}+\\var{a}y=\\simplify[std]{{b}x^{n}}}$ can be solved by the integrating factor method.

\n

Firstly divide both sides by $x$ to obtain $\\displaystyle{\\frac{dy}{dx}+\\frac{\\var{a}}{x}y=\\simplify[std]{{b}x^{n-1}}}$

\n

This is now in the standard form $\\displaystyle{\\frac{dy}{dx}+f(x)y=r(x)}$ which can be solved using the integrating factor $I = e^{\\int f(x)dx}$

\n

\n

In this example, $f(x) = \\frac{\\var{a}}{x}$ so $I=e^{\\int f(x)dx}=e^{\\int{\\frac{\\var{a}}{x}dx}}=e^{\\var{a}\\ln(x)}=x^\\var{a}$

\n

Using the integrating factor formula \\( y = \\frac{1}{I} \\int r(x) I dx\\) with \\(r(x) =\\simplify[std]{{b}x^{n-1}}\\) gives a solution:
\\[y=x^{\\var{-a}} \\left[ \\simplify[std]{{b}/{a+n}x^{a+n}+c}\\right] \\]
to determine $c$ use the condition $\\displaystyle{y(1)=\\simplify[std]{{b*(c+1)}/{a+n}}}$ to obtain:

\n

\\[\\simplify[std]{{b*(c+1)}/{a+n}}=\\simplify[std]{{b}/{a+n}+c}\\]
\\[c = \\simplify[std]{{b*(c+1)}/{a+n}} - \\simplify[std]{{b}/{a+n} = {b*c}/{a+n}}\\]
and so the solution is:
\\[y=x^{\\var{-a}}\\left[\\simplify[std]{{b}/{a+n}x^{a+n}+{b*c}/{a+n}}\\right] \\Rightarrow y=\\simplify[std]{{b}/{a+n}*(x^{n}+{c}*x^{-a})}\\]

\n
\n
\n
", "rulesets": {"std": ["all", "!noLeadingMinus", "!collectNumbers", "fractionNumbers"]}, "extensions": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..4)", "description": "", "templateType": "anything"}, "D": {"name": "D", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "templateType": "anything"}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(1..5)", "description": "

\n
", "templateType": "anything"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(2..4)", "description": "", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "D*(a+n)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["D", "a", "c", "b", "n"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Solution is:

\n

$y=\\;\\;$[[0]]

\n

Input all numbers as integers or fractions – not as decimals.

\n
\n
\n
", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "({b} / {(a + n)}) * (x ^ {n} + ({c} * (x ^ { - a})))", "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0.5, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "notallowed": {"strings": ["."], "showStrings": false, "partialCredit": 0, "message": "

Input all numbers as integers or fractions.

"}, "valuegenerators": [{"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Nick McCullen", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/953/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}], "resources": []}]}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Nick McCullen", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/953/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}, {"name": "Maria Aneiros", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3388/"}]}