// Numbas version: exam_results_page_options {"name": "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": [{"variable_groups": [], "variables": {"b1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9 except d1^2)*sign(random(-1,1))", "name": "b1", "description": ""}, "c1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..4)^(a1/2)", "name": "c1", "description": ""}, "a1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "2*random(1..4)", "name": "a1", "description": ""}, "d1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)*sign(random(-1,1))", "name": "d1", "description": ""}}, "ungrouped_variables": ["a1", "c1", "b1", "d1"], "name": "Solve a separable first order ODE, ", "functions": {}, "parts": [{"showCorrectAnswer": true, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "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": [], "showFeedbackIcon": true, "scripts": {}, "gaps": [{"answer": "{d1^2+b1}/{c1^(2/a1)}*x^(2/{a1})-{b1}", "extendBaseMarkingAlgorithm": true, "customMarkingAlgorithm": "", "checkingType": "absdiff", "vsetRangePoints": 5, "expectedVariableNames": [], "showPreview": true, "checkVariableNames": false, "unitTests": [], "notallowed": {"message": "

Do not enter decimals in your answer.

", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "vsetRange": [0, 1], "failureRate": 1, "scripts": {}, "answerSimplification": "all", "type": "jme", "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "showCorrectAnswer": true, "variableReplacements": [], "marks": 1, "showFeedbackIcon": true}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "sortAnswers": false}], "variablesTest": {"condition": "", "maxRuns": 100}, "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$.

", "tags": ["checked2015"], "rulesets": {"std": ["all", "!collectNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "extensions": [], "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$.

"}, "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}}}.\\]

", "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/"}]}]}], "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/"}]}