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

Solving a differential equation of the form $\\frac{dy}{dx}=\\frac{a \\cos(x)}{y}$ using separation of variables.

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

Solve the differential equation \$\\frac{dy}{dx}=\\frac{\\var{a}\\cos(x)}{y}.\$

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}=\\frac{\\var{a}\\cos(x)}{y}$:

\n

\$\\begin{split} &\\frac{dy}{dx}=\\frac{\\var{a}\\cos(x)}{y} \\\\ \\implies y\\,& \\frac{dy}{dx} = \\simplify{{a}cos(x)}. \\end{split} \$

\n

Integrating both sides with respect to $x$:

\n

\$\\begin{split} \\int y \\, \\frac{dy}{dx}\\, dx &= \\int \\simplify{{a}cos(x)} \\, dx, \\\\ \\\\ \\implies \\int y \\,dy &= \\int\\simplify{{a}cos(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} \\int y \\,&dy &=\\simplify{{a}cos(x)} \\, dx, \\\\ &\\frac{y^2}{2}&\\,= \\simplify{{a} sin(x) +c}, \\\\ &y^2 &\\, = \\simplify{{2a} sin(x)+2c}, \\\\ &y &\\,= \\pm\\sqrt{\\simplify{{2a} sin(x)+2c}}. \\end{split} \$

\n

\n

Note: You can also have the answer

\n

\$y = \\pm \\sqrt{\\simplify{{2a} sin(x)+D}}, \$

\n

where $D=2c$. 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(2..5)", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(2..4)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "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": "

$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": "sqrt({2a}sin(x)+c)", "answerSimplification": "basic", "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": ""}]}], "answer": "sqrt({2a}sin(x)+2c)", "answerSimplification": "basic", "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", "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/"}]}