// Numbas version: exam_results_page_options {"name": "Simon's copy of Solve a separable first order ODE,", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Find the solution of a first order separable differential equation of the form $(a+x)y'=b+y$.

"}, "statement": "

Find the solution of the differential equation

\n

\\[(\\var{a1}+x)y'=\\var{b1}+y,\\]

\n

satisfying $y(\\var{c1})=\\var{d1}$.

", "advice": "

The differential equation is separable, meaning it can be rearranged to give all the terms in $x$ on one side, and all the terms in $y$ on the other.

\n

So we can write

\n

\\[\\int{\\!\\frac{1}{\\var{b1}+y}\\,\\mathrm{d}y} = \\int{\\!\\frac{1}{\\var{a1}+x}\\,\\mathrm{d}x},\\]

\n

then

\n

\\[\\ln\\lvert\\var{b1}+y\\rvert=\\ln\\lvert\\var{a1}+x\\rvert+c,\\]

\n

Exponentiating each side gives:

\n

\\[e^{\\ln\\lvert\\var{b1}+y\\rvert}=e^{\\ln\\lvert\\var{a1}+x\\rvert+c},\\]

\n

so

\n

\\[y=\\simplify{A({a1}+x)-{b1}},\\]

\n

which is the general solution of the equation.

\n

Now,

\n

\\[\\var{d1}=y(\\var{c1})=\\simplify[std]{A({a1}+{c1})-{b1}},\\]

\n

so

\n

\\[A=\\simplify[std]{({d1}+{b1})/({a1}+{c1})}=\\simplify{{d1+b1}/{a1+c1}},\\]

\n

and then the full solution is

\n

\\[y=\\simplify[std]{{d1+b1}/{a1+c1}({a1}+x)-{b1}}=\\simplify{{(d1*a1-b1*c1)}/{a1+c1}+{(d1+b1)}*x/{a1+c1}}.\\]

", "parts": [{"showCorrectAnswer": true, "variableReplacements": [], "unitTests": [], "scripts": {}, "gaps": [{"showCorrectAnswer": true, "variableReplacements": [], "unitTests": [], "checkingAccuracy": 0.001, "scripts": {}, "variableReplacementStrategy": "originalfirst", "notallowed": {"message": "

Do not enter decimals in your answer.

", "partialCredit": 0, "strings": ["."], "showStrings": false}, "expectedVariableNames": [], "answer": "{(d1*a1-b1*c1)}/{a1+c1}+{(d1+b1)}*x/{a1+c1}", "marks": 1, "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "type": "jme", "checkingType": "absdiff", "vsetRange": [0, 1], "vsetRangePoints": 5, "checkVariableNames": false, "answerSimplification": "all", "failureRate": 1, "showPreview": true}], "sortAnswers": false, "variableReplacementStrategy": "originalfirst", "marks": 0, "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "type": "gapfill", "prompt": "

$y=$ [[0]] (Do not enter decimals in your answer.)

"}], "variable_groups": [], "name": "Simon's copy of Solve a separable first order ODE,", "preamble": {"js": "", "css": ""}, "rulesets": {"std": ["all", "!collectNumbers", "!noLeadingMinus"]}, "functions": {}, "variablesTest": {"condition": "sgn(a1+c1)=sgn(b1+d1)", "maxRuns": 100}, "tags": [], "variables": {"a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(1..9)*sign(random(-1,1))", "templateType": "anything", "description": ""}, "d1": {"name": "d1", "group": "Ungrouped variables", "definition": "random(1..9 except abs(b1))*sign(random(-1,1))", "templateType": "anything", "description": ""}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "random(1..9)*sign(random(-1,1))", "templateType": "anything", "description": ""}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "random(1..9 except abs(a1))*sign(random(-1,1))", "templateType": "anything", "description": ""}}, "ungrouped_variables": ["a1", "c1", "b1", "d1"], "extensions": [], "type": "question", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}