// Numbas version: finer_feedback_settings {"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": [{"metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "
Find the solution of a first order separable differential equation of the form $(a+y)y'=b+x$.
"}, "preamble": {"css": "", "js": ""}, "advice": "The differential equation is separable, and can be immediately integrated to give
\n\\[\\simplify{{a1}*y+(1/2)*y^2}=\\simplify{{b1}*x+(1/2)*x^2+c},\\]
\nor
\n\\[\\simplify{(1/2)*(y+{a1})^2-{a1^2}/2}=\\simplify{{b1}*x+(1/2)*x^2+c},\\]
\nthen the general solution of the equation is
\n\\[y=\\var{-a1}\\pm\\simplify{sqrt(x^2+{2*b1}*x+2c+{a1^2})}\\]
\nor, upon redefining the constant $c$,
\n\\[y=\\var{-a1}\\pm\\simplify{sqrt(x^2+{2*b1}*x+c)}.\\]
\nThen we have
\n\\[\\var{d1}=y(\\var{c1})=\\var{-a1}\\pm\\simplify[std]{sqrt({c1}^2+{2*b1}*{c1}+c)}=\\var{-a1}\\pm\\simplify{sqrt({c1^2+2*b1*c1}+c)},\\]
\nso
\n\\[c=\\simplify[std]{({a1}+{d1})^2-{c1^2+2*b1*c1}}=\\simplify{{(a1+d1)^2-c1^2-2*b1*c1}}.\\]
\nThen the full solution is
\n\\[y=\\var{-a1}\\pm\\simplify{sqrt(x^2+{2*b1}*x+{(a1+d1)^2-c1^2-2*b1*c1})}.\\]
", "rulesets": {"std": ["all", "!collectNumbers", "!noLeadingMinus"]}, "extensions": [], "name": "Solve a separable first order ODE,", "ungrouped_variables": ["a1", "c1", "b1", "d1"], "functions": {}, "tags": [], "variablesTest": {"condition": "", "maxRuns": 100}, "variable_groups": [], "variables": {"c1": {"name": "c1", "group": "Ungrouped variables", "definition": "random(1..9)*sign(random(-1,1))", "description": "", "templateType": "anything"}, "d1": {"name": "d1", "group": "Ungrouped variables", "definition": "random(1..9)*sign(random(-1,1))", "description": "", "templateType": "anything"}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(1..9)*sign(random(-1,1))", "description": "", "templateType": "anything"}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "random(1..9)*sign(random(-1,1))", "description": "", "templateType": "anything"}}, "statement": "You are given the differential equation
\n\\[(\\var{a1}+y)y'=\\var{b1}+x,\\]
\nsatisfying $y(\\var{c1})=\\var{d1}$.
\nThe solution can be written in the form $y=\\alpha\\pm\\sqrt{f(x)}$, where $\\alpha$ is a constant, and $f(x)$ is some function of $x$.
", "parts": [{"customName": "", "type": "gapfill", "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "marks": 0, "showFeedbackIcon": true, "gaps": [{"customName": "", "type": "jme", "vsetRangePoints": 5, "answer": "{-a1}", "showFeedbackIcon": true, "failureRate": 1, "checkingType": "absdiff", "checkVariableNames": false, "notallowed": {"showStrings": false, "message": "Do not enter decimals in your answer.
", "partialCredit": 0, "strings": ["."]}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "answerSimplification": "all", "variableReplacementStrategy": "originalfirst", "marks": 1, "valuegenerators": [], "checkingAccuracy": 0.001, "scripts": {}, "extendBaseMarkingAlgorithm": true, "showPreview": true, "unitTests": [], "variableReplacements": [], "vsetRange": [0, 1]}, {"customName": "", "type": "jme", "vsetRangePoints": 5, "answer": "x^2+{2*b1}*x+{(a1+d1)^2-c1^2-2*b1*c1}", "showFeedbackIcon": true, "failureRate": 1, "checkingType": "absdiff", "checkVariableNames": false, "notallowed": {"showStrings": true, "message": "Do not enter decimals in your answer, and expand $f(x)$ fully, so that no parentheses appear in the expression.
", "partialCredit": 0, "strings": [".", "(", ")"]}, "showCorrectAnswer": true, "useCustomName": false, "customMarkingAlgorithm": "", "checkingAccuracy": 0.001, "marks": 1, "valuegenerators": [{"name": "x", "value": ""}], "variableReplacementStrategy": "originalfirst", "scripts": {}, "extendBaseMarkingAlgorithm": true, "showPreview": true, "unitTests": [], "variableReplacements": [], "vsetRange": [0, 1]}], "sortAnswers": false, "prompt": "Solve the equation, and enter the value of $\\alpha$ and the expression for $f(x)$ in the boxes. Do not enter decimals in your answers.
\n$\\alpha=$ [[0]].
\n$f(x)=$ [[1]]. (Expand $f(x)$ fully, so that no parentheses appear in the expression.)
", "scripts": {}, "useCustomName": false, "showCorrectAnswer": true, "unitTests": [], "variableReplacements": [], "extendBaseMarkingAlgorithm": true}], "type": "question", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}