// Numbas version: finer_feedback_settings {"name": "Differential Equations: Separation of Variables 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Differential Equations: Separation of Variables 1", "tags": [], "metadata": {"description": "

Solving a differential equation of the form $\\frac{dy}{dx}=axy$ using separation of variables.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "

Solve the differential equation \\[ \\frac{dy}{dx}=\\var{a}xy.\\]

", "advice": "

If we have a differential equation of the form \\[ \\frac{dy}{dx} = f(x) g(y),\\] we are able to find a solution to this equation using the method Separation of Variables.

\n

We can rewrite the above equation in the form \\[ \\frac{1}{g(y)} \\frac{dy}{dx} = f(x).\\]

\n

If we then integrate with respect to $x$: 

\n

\\[ \\begin{split} &\\int \\frac{1}{g(y)} &\\frac{dy}{dx} dx = \\int f(x) dx, \\\\\\\\ \\implies &\\int \\frac{1}{g(y)} &dy = \\int f(x) dx.  \\end{split} \\]

\n

Integrating both sides, we can write $y$ as a function of $x$. 

\n

Following this method for $\\frac{dy}{dx}=\\var{a}xy$:

\n

\\[ \\begin{split} &\\frac{dy}{dx}=\\var{a}xy \\\\\\\\ \\implies  \\frac{1}{y}& \\frac{dy}{dx} = \\var{a}x. \\end{split} \\]

\n

Integrating both sides with respect to $x$:

\n

\\[ \\begin{split} & \\int  \\frac{1}{y} \\frac{dy}{dx} dx = \\int \\var{a}x \\, dx, \\\\ \\\\ \\implies &\\int \\frac{1}{y} dy = \\int \\var{a} x \\, dx.   \\end{split} \\]

\n

Taking the integral of both sides, we are able to find a solution to the differential equation:

\n

\\[ \\begin{split}&\\quad \\int &\\frac{1}{y} dy &\\,= \\int \\var{a} x \\, dx \\\\ &\\implies  &\\ln(y) &\\,= \\simplify{{a}x^2/2} + c, \\\\ &\\implies &\\quad y &\\,= e^{\\simplify{{a}x^2/2+c}}.  \\end{split} \\]

\n

\n

Note: You can also have the answer 

\n

\\[ y =Ae^{\\simplify{{a/2}x^2}}, \\]

\n

where $A=e^c$. This shows there is still a constant, but indicates it is different to the original constant of integration, $c$.

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(1..4)*2", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a"], "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": "

$y=\\,$[[0]]

", "gaps": [{"type": "jme", "useCustomName": true, "customName": "Gap 0", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "jme", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "answer": "A*e^({a/2}x^2)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "a", "value": ""}, {"name": "x", "value": ""}]}], "answer": "e^({a/2}x^2+c)", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "c", "value": ""}, {"name": "x", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}]}], "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}