// Numbas version: exam_results_page_options {"name": "Solve a separable first order ODE with trig functions,", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"tags": [], "statement": "

You are given the differential equation

\n

\\[\\simplify{{a1}*sin(x)*y'}=\\simplify{{b1}*y*cos(x)},\\]

\n

satisfying $y\\left(\\simplify{{c1}*pi/2}\\right)=\\var{d1}$.

\n

The solution can be written in the form $y=\\alpha f(x)^\\beta$, where $\\alpha$ and $\\beta$ are constants, with $\\beta>0$, and $f(x)$ is some function of $x$.

", "variable_groups": [], "ungrouped_variables": ["a1", "c1", "b1", "d1", "beta", "is_cosec"], "variables": {"is_cosec": {"group": "Ungrouped variables", "description": "", "definition": "if(b1*a1<0,true,false)", "name": "is_cosec", "templateType": "anything"}, "d1": {"group": "Ungrouped variables", "description": "", "definition": "random(1..9)*sign(random(-1,1))", "name": "d1", "templateType": "anything"}, "c1": {"group": "Ungrouped variables", "description": "", "definition": "random(-11,-7,-3,1,5,9)", "name": "c1", "templateType": "anything"}, "a1": {"group": "Ungrouped variables", "description": "", "definition": "random(1..9)*sign(random(-1,1))", "name": "a1", "templateType": "anything"}, "beta": {"group": "Ungrouped variables", "description": "", "definition": "abs({b1}/{a1})", "name": "beta", "templateType": "anything"}, "b1": {"group": "Ungrouped variables", "description": "", "definition": "random(-9..9 except [0,a1])", "name": "b1", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "preamble": {"css": "", "js": ""}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Find the solution of a first order separable differential equation of the form $a\\sin(x)y'=by\\cos(x)$.

"}, "parts": [{"variableReplacementStrategy": "originalfirst", "unitTests": [], "marks": 0, "customMarkingAlgorithm": "", "customName": "", "prompt": "

Solve the equation, and enter the values of $\\alpha$ and $\\beta$, and the expression for $f(x)$ in the boxes.  Do not enter decimals in your answers.

\n

$\\alpha=$ [[0]]

\n

$\\beta=$ [[1]]

\n

$f(x)=$ [[2]]

", "showCorrectAnswer": true, "sortAnswers": false, "gaps": [{"variableReplacementStrategy": "originalfirst", "vsetRange": [0, 1], "notallowed": {"partialCredit": 0, "showStrings": false, "message": "

Do not enter decimals in your answer.

", "strings": ["."]}, "checkingType": "absdiff", "type": "jme", "showFeedbackIcon": true, "useCustomName": false, "customMarkingAlgorithm": "", "valuegenerators": [], "variableReplacements": [], "scripts": {}, "checkVariableNames": false, "failureRate": 1, "marks": 1, "unitTests": [], "customName": "", "answer": "{d1}", "showCorrectAnswer": true, "vsetRangePoints": 5, "checkingAccuracy": 0.001, "extendBaseMarkingAlgorithm": true, "showPreview": true}, {"variableReplacementStrategy": "originalfirst", "vsetRange": [0, 1], "answerSimplification": "fractionnumbers", "notallowed": {"partialCredit": 0, "showStrings": false, "message": "

Do not enter decimals in your answer.

", "strings": ["."]}, "checkingType": "absdiff", "type": "jme", "showFeedbackIcon": true, "useCustomName": false, "customMarkingAlgorithm": "", "valuegenerators": [], "variableReplacements": [], "scripts": {}, "checkVariableNames": false, "failureRate": 1, "marks": 1, "unitTests": [], "customName": "", "answer": "{beta}", "showCorrectAnswer": true, "vsetRangePoints": 5, "checkingAccuracy": 0.001, "extendBaseMarkingAlgorithm": true, "showPreview": true}, {"variableReplacementStrategy": "originalfirst", "vsetRange": [0, 1], "notallowed": {"partialCredit": 0, "showStrings": false, "message": "

Do not enter decimals in your answer.

", "strings": ["."]}, "checkingType": "absdiff", "type": "jme", "showFeedbackIcon": true, "useCustomName": false, "customMarkingAlgorithm": "", "valuegenerators": [{"value": "", "name": "x"}], "variableReplacements": [], "scripts": {}, "checkVariableNames": false, "failureRate": 1, "marks": 1, "unitTests": [], "customName": "", "answer": "{if(is_cosec,1,0)}*cosec(x)+{if(is_cosec,0,1)}*sin(x)", "showCorrectAnswer": true, "vsetRangePoints": 5, "checkingAccuracy": 0.001, "extendBaseMarkingAlgorithm": true, "showPreview": true}], "extendBaseMarkingAlgorithm": true, "type": "gapfill", "useCustomName": false, "showFeedbackIcon": true, "variableReplacements": [], "scripts": {}}], "advice": "

The differential equation is separable, and we can therefore write

\n

\\[\\int{\\!\\frac{1}{y}\\,\\mathrm{d}y}=\\simplify{{b1}/{a1}*int(cos(x)/sin(x),x)},\\]

\n

which can be integrated to give

\n

\\[\\ln\\lvert y\\rvert=\\simplify{{b1}/{a1}*ln(abs(sin(x)))}+c,\\]

\n

so

\n

\\[y=\\simplify[all,fractionnumbers]{A*({if(is_cosec,1,0)}*cosec(x)+{if(is_cosec,0,1)}*sin(x))^({beta})},\\]

\n

which is the general solution of the equation.

\n

Then we have

\n

\\[\\var{d1}=y\\left(\\simplify{{c1}*pi/2}\\right)=\\simplify[all,fractionnumbers]{A*({if(is_cosec,1,0)}*cosec({c1}*pi/2)^({beta})+{if(is_cosec,0,1)}*sin({c1}*pi/2)^({beta}))},\\]

\n

so $A=\\var{d1}$.

\n

Then the full solution is

\n

\\[y=\\simplify[all,fractionnumbers]{{d1}*({if(is_cosec,1,0)}*cosec(x)+{if(is_cosec,0,1)}*sin(x))^({beta})}.\\]

", "functions": {}, "rulesets": {"std": ["all", "!collectNumbers", "!noLeadingMinus"]}, "extensions": [], "name": "Solve a separable first order ODE with trig functions,", "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/"}]}