// Numbas version: exam_results_page_options {"name": "Simon's copy of Julie's copy of First order differential equations 4", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"description": "
Find the solution of $\\displaystyle \\frac{dy}{dx}=\\frac{1+y^2}{a+bx}$ which satisfies $y(1)=c$
\nrebelmaths
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "Separation of variables
\nUse separation of variables to solve the following differential equation:
\n\\[\\frac{dy}{dx}=\\simplify[std]{(1+y^2)/({a}+{b}x)}\\]
which satisfies $y(1)=\\var{u}$
Note that if $\\pi$ is in your expression you enter it as pi.
", "variable_groups": [], "extensions": [], "parts": [{"scripts": {}, "variableReplacements": [], "marks": 0, "type": "gapfill", "gaps": [{"answerSimplification": "std", "checkVariableNames": false, "answer": "tan(({((t * (t -1)) / 2)} * (pi / 3)) + ({((t -1) * (t -2)) / 2} * (pi / 4)) + ((1 / {b}) * ln(abs(({a} + ({b} * x)) / {a + b}))))", "scripts": {}, "variableReplacements": [], "marks": 3, "checkingAccuracy": 1e-06, "notallowed": {"strings": ["."], "message": "Input all numbers as integers or fractions.
", "partialCredit": 0, "showStrings": false}, "type": "jme", "failureRate": 1, "expectedVariableNames": [], "vsetRange": [0, 1], "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "vsetRangePoints": 5, "variableReplacementStrategy": "originalfirst", "unitTests": [], "showCorrectAnswer": true, "showPreview": true, "customMarkingAlgorithm": "", "showFeedbackIcon": true}], "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "unitTests": [], "showCorrectAnswer": true, "sortAnswers": false, "prompt": "\nSolution is:
\n
$y=\\;\\;$[[0]]
Input all numbers as integers or fractions – not as decimals.
\n ", "showFeedbackIcon": true}], "tags": [], "name": "Simon's copy of Julie's copy of First order differential equations 4", "ungrouped_variables": ["a", "b", "u", "t", "v"], "functions": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "preamble": {"js": "", "css": ""}, "variables": {"t": {"description": "", "templateType": "anything", "name": "t", "definition": "random(0,1,2)", "group": "Ungrouped variables"}, "v": {"description": "", "templateType": "anything", "name": "v", "definition": "switch(t=0,'$\\\\pi/4$',t=1,0,'$\\\\pi/3$')", "group": "Ungrouped variables"}, "u": {"description": "", "templateType": "anything", "name": "u", "definition": "switch(t=0,1,t=1,0,'$\\\\sqrt{3}$')", "group": "Ungrouped variables"}, "b": {"description": "", "templateType": "anything", "name": "b", "definition": "random(2..9)", "group": "Ungrouped variables"}, "a": {"description": "", "templateType": "anything", "name": "a", "definition": "random(1..9)", "group": "Ungrouped variables"}}, "advice": "\nWe can separate the variables to get
\n\\[\\frac{dy}{dx}= \\simplify[std]{(1+y^2)/({a}+{b}x)} \\Rightarrow \\frac{1}{1+y^2}\\frac{dy}{dx}=\\simplify[std]{{a}+{b}x}\\]
\nOn integrating we get:
\\[\\arctan(y)=\\frac{1}{\\var{b}}\\ln\\left(\\left|\\var{a}+\\var{b}x\\right|\\right)+A \\Rightarrow y=\\tan\\left(\\frac{1}{\\var{b}}\\ln\\left(\\left|\\var{a}+\\var{b}x\\right|\\right)+A\\right)\\]
To fix the arbitrary constant of integration we use the condition $y(1)=\\var{u}$.
As $\\arctan(\\var{u})=\\var{v}$ we see that $\\displaystyle{A = \\var{v}-\\frac{1}{\\var{b}}\\ln(|\\var{a+b}|)}$.
\nHence the solution is
\n\\[y=\\simplify[std]{tan(({((t * (t -1)) / 2)} * (pi / 3)) + ({((t -1) * (t -2)) / 2} * (pi / 4)) + ((1 / {b}) * ln(abs(({a} + ({b} * x)) / {a + b}))))}\\]
\n ", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "type": "question", "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}