// Numbas version: exam_results_page_options {"name": "Grainne'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": [{"ungrouped_variables": ["a1", "c1", "b1", "d1"], "variables": {"b1": {"definition": "random(1..9 except d1^2)*sign(random(-1,1))", "templateType": "anything", "description": "", "group": "Ungrouped variables", "name": "b1"}, "c1": {"definition": "random(1..4)^(a1/2)", "templateType": "anything", "description": "", "group": "Ungrouped variables", "name": "c1"}, "a1": {"definition": "2*random(1..4)", "templateType": "anything", "description": "", "group": "Ungrouped variables", "name": "a1"}, "d1": {"definition": "random(1..9)*sign(random(-1,1))", "templateType": "anything", "description": "", "group": "Ungrouped variables", "name": "d1"}}, "tags": [], "extensions": [], "parts": [{"showFeedbackIcon": true, "useCustomName": false, "gaps": [{"failureRate": 1, "type": "jme", "variableReplacements": [], "extendBaseMarkingAlgorithm": true, "vsetRange": [0, 1], "checkingAccuracy": 0.001, "showPreview": true, "valuegenerators": [{"value": "", "name": "x"}], "showCorrectAnswer": true, "scripts": {}, "checkVariableNames": false, "vsetRangePoints": 5, "checkingType": "absdiff", "showFeedbackIcon": true, "useCustomName": false, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "answerSimplification": "all", "unitTests": [], "customName": "", "answer": "{d1^2+b1}/{c1^(2/a1)}*x^(2/{a1})-{b1}", "notallowed": {"message": "

Do not enter decimals in your answer.

", "showStrings": false, "strings": ["."], "partialCredit": 0}, "marks": 1}], "type": "gapfill", "variableReplacements": [], "customMarkingAlgorithm": "", "prompt": "

Solve the equation, and enter the expression for $f(x)$ in the box.  Do not enter decimals in your answer.

\n

$f(x)=$ [[0]].

", "unitTests": [], "sortAnswers": false, "customName": "", "showCorrectAnswer": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "marks": 0, "variableReplacementStrategy": "originalfirst"}], "variablesTest": {"maxRuns": 100, "condition": ""}, "rulesets": {"std": ["all", "!collectNumbers", "!noLeadingMinus"]}, "name": "Grainne's copy of Solve a separable first order ODE,", "functions": {}, "preamble": {"js": "", "css": ""}, "statement": "

You are given the differential equation

\n

\\[\\simplify{{a1}*x*y*y'}=\\var{b1}+y^2,\\]

\n

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

\n

The solution can be written in the form $y=\\pm\\sqrt{f(x)}$, where $f(x)$ is some function of $x$.

", "advice": "

The differential equation is separable, and we can therefore write

\n

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

\n

which can be integrated to give

\n

\\[\\frac{1}{2}\\ln\\lvert\\var{b1}+y^2\\rvert=\\frac{1}{\\var{a1}}\\ln\\lvert x\\rvert+c.\\]

\n

Exponentiating both sides leads to

\n

\\[\\sqrt{\\var{b1}+y^2}=\\simplify{Ax^(1/{a1})}\\]

\n

and, on rearranging for $y$ (and redefining $A$), we have

\n

\\[y=\\pm\\sqrt{\\simplify{A*x^(2/{a1})-{b1}}}.\\]

\n

Then we have

\n

\\[\\var{d1}=y(\\var{c1})=\\pm\\sqrt{\\simplify{A*{c1}^(2/{a1})-{b1}}},\\]

\n

so

\n

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

\n

Then the full solution is

\n

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

", "variable_groups": [], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Find the solution of a first order separable differential equation of the form $axyy'=b+y^2$.

"}, "type": "question", "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Grainne Read", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1801/"}]}]}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Grainne Read", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1801/"}]}