// Numbas version: exam_results_page_options {"name": "Differential Equations: Separation of Variables 7", "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 7", "tags": [], "metadata": {"description": "
Solving a differential equation of the form $\\frac{dy}{dx}=a \\cos(x) e^{-y}$ using separation of variables.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Solve the differential equation \\[ \\frac{dy}{dx}=\\var{a}\\cos(x) e^{-y}.\\]
", "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.
\nWe can rewrite the above equation in the form \\[ \\frac{1}{g(y)} \\frac{dy}{dx} = f(x).\\]
\nIf 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} \\]
\nIntegrating both sides, we can write $y$ as a function of $x$.
\nFollowing this method for $\\frac{dy}{dx}=\\var{a}\\cos(x) e^{-y}$:
\n\\[ \\begin{split} &\\frac{dy}{dx}=\\var{a}\\cos(x) e^{-y}, \\\\\\\\ \\implies \\frac{1}{e^{-y}}& \\frac{dy}{dx} = \\var{a}\\cos(x), \\\\\\\\ \\implies e^{y}& \\frac{dy}{dx} = \\var{a}\\cos(x). \\end{split} \\]
\nIntegrating both sides with respect to $x$:
\n\\[ \\begin{split} & \\int e^y \\frac{dy}{dx} dx = \\int \\var{a}\\cos(x) \\, dx, \\\\ \\\\ \\implies &\\int e^y dy = \\int \\var{a} \\cos(x) \\, dx. \\end{split} \\]
\nTaking the integral of both sides, we are able to find a solution to the differential equation:
\n\\[ \\begin{split} \\int e^y dy &\\,= \\int \\var{a} \\cos(x) \\, dx, \\\\ e^y &\\,= \\simplify{{a}sin(x) +c}, \\\\ y&\\,=\\ln\\left(\\simplify{{a}sin(x) +c}\\right). \\end{split} \\]
", "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, "answer": "ln({a}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": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}]}], "contributors": [{"name": "Ruth Hand", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3228/"}, {"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}]}