// Numbas version: exam_results_page_options {"variable_groups": [], "type": "question", "name": "Methods for solving differential equations", "metadata": {"description": "Questions used in a university course titled \"Methods for solving differential equations\"", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": [{"name": "Solve a constant coefficient second order ODE ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "tags": ["checked2015"], "metadata": {"description": "
Find the solution of a constant coefficient second order ordinary differential equation of the form $ay''+by=0$. Complex roots.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "The general solution of the differential equation
\n\\[\\simplify{{a1}*y''+{b1}*y}=0\\]
\ncan be written in the form
\n\\[y(x)=A\\cos(\\lvert\\lambda_1\\rvert x)+B\\sin(\\lvert\\lambda_2\\rvert x),\\]
\nwhere $A,B\\in\\mathbb{R}$, and $\\lambda_1,\\lambda_2\\in\\mathbb{C}$.
", "advice": "We can solve the differential equation by making the assumption that $y=\\mathrm{e}^{\\lambda x}$.
\nBy substituting this expression for $y$ into the equation, and cancelling terms in $\\mathrm{e}^{\\lambda x}$ (which we can do, because $\\mathrm{e}^{\\lambda x}\\ne 0$), we obtain
\n\\[\\simplify{{a1}*lambda^2+{b1}}=0,\\]
\nwhich has solutions
\n\\[\\lambda_{1,2}=\\pm\\simplify{sqrt({b1}/{a1})}i.\\]
\nThe general solution to the differential equation, therefore, is
\n\\[y(x)=A\\cos\\left(\\simplify{sqrt({b1})/sqrt({a1})*x}\\right)+B\\sin\\left(\\simplify{sqrt({b1})/sqrt({a1})*x}\\right).\\]
\nThis is the only form of the solution accepted in this question, but note that the general solution could also be written as
\n\\[y(x)=A\\cos\\left(\\simplify{sqrt({b1})/sqrt({a1})*x}\\right)+B\\sin\\left(\\simplify{-sqrt({b1})/sqrt({a1})*x}\\right),\\]
\nor
\n\\[y(x)=A\\cos\\left(\\simplify{-sqrt({b1})/sqrt({a1})*x}\\right)+B\\sin\\left(\\simplify{sqrt({b1})/sqrt({a1})*x}\\right).\\]
\nThese forms just redefine what is meant by the constants $A$ and $B$, however, since
\n\\[\\cos(-x)=\\cos(x)\\quad\\text{and}\\quad\\sin(-x)=-\\sin(x).\\]
\nApplying the conditions $y(0)=\\var{c1}$ and $y'(0)=\\var{d1}$ gives
\n\\[\\var{c1}=y(0)=A\\]
\nand
\n\\[\\var{d1}=y'(0)=\\simplify{B*(sqrt({b1})/sqrt({a1}))}.\\]
\nSo $A=\\var{c1}$, and $B=\\simplify{{d1}*sqrt({a1}/{b1})}$.
", "rulesets": {}, "variables": {"b1": {"name": "b1", "group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything"}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "random(1..9)*sign(random(-1,1))", "description": "", "templateType": "anything"}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything"}, "d1": {"name": "d1", "group": "Ungrouped variables", "definition": "random(1..9)*sign(random(-1,1))", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a1", "c1", "b1", "d1"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "Solve the differential equation, and enter the values of $\\lvert\\lambda_1\\rvert$ and $\\lvert\\lambda_2\\rvert$ in the boxes.
\nDo not enter decimals in your answers. If you need to enter a square root, e.g. $\\sqrt{x}$, enter this as sqrt(x)
.
$\\lvert\\lambda_1\\rvert=$ [[0]]
\n$\\lvert\\lambda_2\\rvert=$ [[1]]
", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "sqrt({b1})/sqrt({a1})", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "notallowed": {"strings": ["."], "showStrings": false, "partialCredit": 0, "message": "Do not enter decimals in your answer.
"}, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "sqrt({b1})/sqrt({a1})", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "notallowed": {"strings": ["."], "showStrings": false, "partialCredit": 0, "message": "Do not enter decimals in your answer.
"}, "valuegenerators": []}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "prompt": "Now, using the general form of solution as shown above, with $\\lvert\\lambda_1\\rvert$ and $\\lvert\\lambda_2\\rvert$, find the exact solution that satisfies the conditions $y(0)=\\var{c1}$ and $y'(0)=\\var{d1}$, by calculating the values of the constants $A$ and $B$, and entering them in the boxes.
\nDo not enter decimals in your answers. If you need to enter a square root, e.g. $\\sqrt{x}$, enter this as sqrt(x)
.
$A=$ [[0]]
\n$B=$ [[1]]
", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{c1}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "notallowed": {"strings": ["."], "showStrings": false, "partialCredit": 0, "message": "Do not enter decimals in your answer.
"}, "valuegenerators": []}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "showCorrectAnswer": true, "showFeedbackIcon": true, "scripts": {}, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "answer": "{d1}*sqrt({a1})/sqrt({b1})", "answerSimplification": "all", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "notallowed": {"strings": ["."], "showStrings": false, "partialCredit": 0, "message": "Do not enter decimals in your answer.
"}, "valuegenerators": []}], "sortAnswers": false}]}, {"name": "Solve a constant coefficient second order ODE, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"tol": {"group": "Ungrouped variables", "templateType": "anything", "definition": "0.001", "name": "tol", "description": ""}, "c1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)*sign(random(-1,1))", "name": "c1", "description": ""}, "a": {"group": "Ungrouped variables", "templateType": "anything", "definition": "precround(1/2*(c1+d1*(sqrt(a1/b1))),3)", "name": "a", "description": ""}, "b1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)", "name": "b1", "description": ""}, "b": {"group": "Ungrouped variables", "templateType": "anything", "definition": "precround(1/2*(c1-d1*(sqrt(a1/b1))),3)", "name": "b", "description": ""}, "a1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)", "name": "a1", "description": ""}, "d1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)*sign(random(-1,1))", "name": "d1", "description": ""}}, "ungrouped_variables": ["a", "b", "a1", "b1", "tol", "c1", "d1"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "showQuestionGroupNames": false, "functions": {}, "parts": [{"variableReplacementStrategy": "originalfirst", "scripts": {}, "gaps": [{"answer": "sqrt({b1})/sqrt({a1})", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"showStrings": false, "message": "Do not enter decimals in your answer.
", "strings": ["."], "partialCredit": 0}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "answersimplification": "all", "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}, {"answer": "-sqrt({b1})/sqrt({a1})", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"showStrings": false, "message": "Do not enter decimals in your answer.
", "strings": ["."], "partialCredit": 0}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "answersimplification": "all", "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "Solve the differential equation, and enter the values of $\\lambda_1$ and $\\lambda_2$ in the boxes.
\nDo not enter decimals in your answers. If you need to enter a square root, e.g. $\\sqrt{x}$, enter this as sqrt(x)
.
$\\lambda_1=$ [[0]]
\n$\\lambda_2=$ [[1]]
", "variableReplacements": [], "marks": 0}, {"variableReplacementStrategy": "originalfirst", "scripts": {}, "gaps": [{"showPrecisionHint": false, "variableReplacementStrategy": "originalfirst", "scripts": {}, "allowFractions": false, "type": "numberentry", "correctAnswerFraction": false, "minValue": "A-tol", "showCorrectAnswer": true, "variableReplacements": [], "marks": 1, "maxValue": "A+tol"}, {"showPrecisionHint": false, "variableReplacementStrategy": "originalfirst", "scripts": {}, "allowFractions": false, "type": "numberentry", "correctAnswerFraction": false, "minValue": "B-tol", "showCorrectAnswer": true, "variableReplacements": [], "marks": 1, "maxValue": "B+tol"}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "Now find the solution that satisfies the conditions $y(0)=\\var{c1}$ and $y'(0)=\\var{d1}$, by calculating the values of the constants $A$ and $B$, and entering them in the boxes.
\nEnter your answers to 3d.p.
\n$A=$ [[0]]
\n$B=$ [[1]]
", "variableReplacements": [], "marks": 0}], "statement": "The general solution of the differential equation
\n\\[\\simplify{{a1}*y''-{b1}*y}=0\\]
\ncan be written in the form
\n\\[y(x)=A\\mathrm{e}^{\\lambda_1 x}+B\\mathrm{e}^{\\lambda_2 x},\\]
\nwhere $A,B,\\lambda_1,\\lambda_2\\in\\mathbb{R}$ and $\\lambda_1>\\lambda_2$.
", "tags": ["checked2015", "MAS1603", "MAS2105"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "Find the solution of a constant coefficient second order ordinary differential equation of the form $ay''-by=0$. Distinct roots.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "We can solve the differential equation by making the assumption that $y=\\mathrm{e}^{\\lambda x}$.
\nBy substituting this expression for $y$ into the equation, and cancelling terms in $\\mathrm{e}^{\\lambda x}$ (which we can do, because $\\mathrm{e}^{\\lambda x}\\ne 0$), we obtain
\n\\[\\simplify{{a1}*lambda^2-{b1}}=0,\\]
\nwhich has solutions
\n\\[\\lambda_{1,2}=\\pm\\simplify{sqrt({b1}/{a1})}.\\]
\nThe general solution to the differential equation, therefore, is
\n\\[y(x)=A\\exp\\left(\\simplify{sqrt({b1})/sqrt({a1})*x}\\right)+B\\exp\\left(\\simplify{-sqrt({b1})/sqrt({a1})*x}\\right).\\]
\nApplying the conditions $y(0)=\\var{c1}$ and $y'(0)=\\var{d1}$ gives
\n\\[\\var{c1}=y(0)=A+B\\]
\nand
\n\\[\\var{d1}=y'(0)=\\simplify{A*(sqrt({b1})/sqrt({a1}))-B*(sqrt({b1})/sqrt({a1}))}.\\]
\nSome rearrangement then gives
\n\\[A=\\simplify{1/2*({c1}+{d1}*(sqrt({a1})/sqrt({b1})))}=\\var{A}\\;\\text{to 3 d.p.,}\\]
\nand
\n\\[B=\\simplify{1/2*({c1}-{d1}*(sqrt({a1})/sqrt({b1})))}=\\var{B}\\;\\text{to 3 d.p.}\\]
"}, {"name": "Solve a constant coefficient second order ODE, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "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/"}], "variable_groups": [], "variables": {"correctform": {"group": "Ungrouped variables", "templateType": "anything", "definition": "switch (\n disc>0, forms[0],\n disc=0, forms[1],\n disc<0, forms[2]\n )", "description": "", "name": "correctform"}, "ltgteq": {"group": "Ungrouped variables", "templateType": "anything", "definition": "switch (\n disc>0, \"greater than\",\n disc=0, \"equal to\",\n disc<0, \"less than\"\n )", "description": "", "name": "ltgteq"}, "c1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-9..9 except 0)", "description": "", "name": "c1"}, "disc": {"group": "Ungrouped variables", "templateType": "anything", "definition": "b1^2-4*a1*c1", "description": "", "name": "disc"}, "incorrectform": {"group": "Ungrouped variables", "templateType": "anything", "definition": "switch (\n disc>0, [forms[1],forms[2]],\n disc=0, [forms[0],forms[2]],\n disc<0, [forms[0],forms[1]]\n )", "description": "", "name": "incorrectform"}, "b1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-9..9 except 0)", "description": "", "name": "b1"}, "lambda2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "precround((-b1-sqrt(disc))/(2*a1),3)", "description": "", "name": "lambda2"}, "a1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)", "description": "", "name": "a1"}, "lambda1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "precround((-b1+sqrt(disc))/(2*a1),3)", "description": "", "name": "lambda1"}, "forms": {"group": "Ungrouped variables", "templateType": "anything", "definition": "[\"$A\\\\mathrm{e}^{\\\\lambda_1 x}+B\\\\mathrm{e}^{\\\\lambda_2 x}$\",\"$(A+Bx)\\\\mathrm{e}^{\\\\lambda x}$\",\"$\\\\mathrm{e}^{\\\\alpha x}\\\\biggl(A\\\\cos(\\\\beta x)+B\\\\sin(\\\\beta x)\\\\biggr)$\"]", "description": "", "name": "forms"}}, "ungrouped_variables": ["a1", "correctform", "incorrectform", "forms", "disc", "b1", "c1", "lambda1", "lambda2", "ltgteq"], "functions": {}, "preamble": {"css": "", "js": ""}, "parts": [{"displayType": "radiogroup", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "showCellAnswerState": true, "choices": ["{correctform}
", "{incorrectform[0]}
", "{incorrectform[1]}
"], "prompt": "Which of the following choices defines the form of the general solution of the differential equation?
\nIn each case $A$ and $B$ are arbitrary constants, and $\\lambda_1$, $\\lambda_2$, $\\lambda$, $\\alpha$, and $\\beta$ are other constants arising from the solution of the auxiliary equation (their actual values are not important for this part of the question).
", "distractors": ["", "", ""], "matrix": [1, 0, 0], "unitTests": [], "shuffleChoices": true, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "scripts": {}, "minMarks": 0, "type": "1_n_2", "maxMarks": 0, "displayColumns": 1, "showCorrectAnswer": true, "variableReplacements": [], "marks": 0}, {"showCorrectAnswer": true, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "prompt": "Find the general solution of the differential equation, by setting up an appropriate auxiliary equation, solving it, and entering the solutions $\\lambda_1$ and $\\lambda_2$ of the auxiliary equation in the boxes. If the solutions are real and distinct, enter the greatest solution as $\\lambda_1$; if the solutions are repeated, enter the same values for $\\lambda_1$ and $\\lambda_2$; if the solutions are complex, enter the solution with the greatest imaginary part as $\\lambda_1$.
\nEnter your answers to 3 d.p.
\n$\\lambda_1=$ [[0]]
\n$\\lambda_2=$ [[1]]
", "unitTests": [], "sortAnswers": false, "scripts": {}, "gaps": [{"answer": "{lambda1}", "showCorrectAnswer": true, "failureRate": 1, "customMarkingAlgorithm": "", "vsetRangePoints": 5, "showPreview": true, "checkVariableNames": false, "checkingType": "absdiff", "vsetRange": [0, 1], "type": "jme", "showFeedbackIcon": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "unitTests": [], "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1}, {"answer": "{lambda2}", "showCorrectAnswer": true, "failureRate": 1, "customMarkingAlgorithm": "", "vsetRangePoints": 5, "showPreview": true, "checkVariableNames": false, "checkingType": "absdiff", "vsetRange": [0, 1], "type": "jme", "showFeedbackIcon": true, "scripts": {}, "extendBaseMarkingAlgorithm": true, "expectedVariableNames": [], "unitTests": [], "checkingAccuracy": 0.001, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0, "showFeedbackIcon": true}], "statement": "You are given the differential equation
\n\\[\\simplify{{a1}*y''+{b1}*y'+{c1}*y=0}.\\]
", "tags": ["checked2015"], "rulesets": {}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Find the solution of a constant coefficient second order ordinary differential equation of the form $ay''+by'+cy=0$.
"}, "type": "question", "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "To determine the form of the general solution of the equation
\n\\[ay''+by'+c=0,\\]
\nfirst set $y=\\mathrm{e}^{\\lambda x}$, and substitute to obtain
\n\\[a\\lambda^2+b\\lambda+c=0,\\]
\nfor which the solutions are
\n\\[\\lambda_{1,2}=\\frac{-b\\pm\\sqrt{b^2-4ac}}{2a}.\\]
\nIf $b^2-4ac>0$, then the roots are real and distinct, and the solution takes the form
\n\\[y(x)=\\var{forms[0]}.\\]
\nIf $b^2-4ac=0$, then the roots are real and repeated, and the solution takes the form
\n\\[y(x)=\\var{forms[1]}.\\]
\nIf $b^2-4ac<0$, then the roots are complex, and the solution takes the form
\n\\[y(x)=\\var{forms[2]},\\]
\nwhere $\\lambda_1=\\alpha+i\\beta$ and $\\lambda_2=\\alpha-i\\beta$.
\nIn this question we have $\\simplify{{a1}*y''+{b1}*y'+{c1}*y=0}$, and then
\n\\[b^2-4ac=\\var{b1^2}-4\\times(\\var{a1*c1})=\\var{disc},\\]
\nwhich is {ltgteq} zero, so the general solution takes the form
\n\\[y(x)=\\var{correctform}.\\]
\nMaking the substitution $y=\\mathrm{e}^{\\lambda x}$, then gives
\n\\[\\simplify{{a1}*lambda^2+{b1}*lambda+{c1}=0},\\]
\nwhich has solutions
\n\\[\\lambda_1=\\frac{\\var{-b1}+\\sqrt{\\var{disc}}}{\\var{2*a1}}=\\var{lambda1} \\text{ to 3 d.p.,}\\]
\nand
\n\\[\\lambda_2=\\frac{\\var{-b1}-\\sqrt{\\var{disc}}}{\\var{2*a1}}=\\var{lambda2} \\text{ to 3 d.p.}\\]
"}, {"name": "Solve a separable first order ODE, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variablesTest": {"condition": "", "maxRuns": 100}, "variables": {"b1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9)*sign(random(-1,1))", "description": "", "name": "b1"}, "c1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9 except abs(a1))*sign(random(-1,1))", "description": "", "name": "c1"}, "a1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9)*sign(random(-1,1))", "description": "", "name": "a1"}, "d1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9 except abs(b1))*sign(random(-1,1))", "description": "", "name": "d1"}}, "ungrouped_variables": ["a1", "c1", "b1", "d1"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "variable_groups": [], "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"answer": "{(d1*a1-b1*c1)}/{a1+c1}+{(d1+b1)}*x/{a1+c1}", "vsetrange": [0, 1], "scripts": {}, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"message": "Do not enter decimals in your answer.
", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "answersimplification": "all", "type": "jme", "showCorrectAnswer": true, "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "prompt": "$y=$ [[0]] (Do not enter decimals in your answer.)
", "showCorrectAnswer": true, "marks": 0}], "statement": "Find the solution of the differential equation
\n\\[(\\var{a1}+x)y'=\\var{b1}+y,\\]
\nsatisfying $y(\\var{c1})=\\var{d1}$.
", "tags": ["checked2015", "MAS1603", "MAS2105"], "rulesets": {"std": ["all", "!collectNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "Find the solution of a first order separable differential equation of the form $(a+x)y'=b+y$.
"}, "advice": "The differential equation is separable, so we can write
\n\\[\\int{\\!\\frac{1}{\\var{b1}+y}\\,\\mathrm{d}y} = \\int{\\!\\frac{1}{\\var{a1}+x}\\,\\mathrm{d}x},\\]
\nthen
\n\\[\\ln\\lvert\\var{b1}+y\\rvert=\\ln\\lvert\\var{a1}+x\\rvert+c,\\]
\nso
\n\\[y=\\simplify{A({a1}+x)-{b1}},\\]
\nwhich is the general solution of the equation.
\nNow,
\n\\[\\var{d1}=y(\\var{c1})=\\simplify[std]{A({a1}+{c1})-{b1}},\\]
\nso
\n\\[A=\\simplify[std]{({d1}+{b1})/({a1}+{c1})}=\\simplify{{d1+b1}/{a1+c1}},\\]
\nand then the full solution is
\n\\[y=\\simplify[std]{{d1+b1}/{a1+c1}({a1}+x)-{b1}}=\\simplify{{(d1*a1-b1*c1)}/{a1+c1}+{(d1+b1)}*x/{a1+c1}}.\\]
"}, {"name": "Solve a separable first order ODE, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [], "variables": {"b1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)*sign(random(-1,1))", "description": "", "name": "b1"}, "c1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)*sign(random(-1,1))", "description": "", "name": "c1"}, "a1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)*sign(random(-1,1))", "description": "", "name": "a1"}, "d1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..9)*sign(random(-1,1))", "description": "", "name": "d1"}}, "ungrouped_variables": ["a1", "c1", "b1", "d1"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"showCorrectAnswer": true, "scripts": {}, "gaps": [{"answer": "{-a1}", "showCorrectAnswer": true, "vsetrange": [0, 1], "scripts": {}, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"message": "Do not enter decimals in your answer.
", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "answersimplification": "all", "type": "jme", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}, {"answer": "x^2+{2*b1}*x+{(a1+d1)^2-c1^2-2*b1*c1}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"message": "Do not enter decimals in your answer, and expand $f(x)$ fully, so that no parentheses appear in the expression.
", "showStrings": true, "partialCredit": 0, "strings": [".", "(", ")"]}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "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.)
", "variableReplacements": [], "marks": 0}], "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$.
", "tags": ["checked2015", "MAS1603", "MAS2105"], "rulesets": {"std": ["all", "!collectNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "Jan 2016 (WHF)
\nThe bddy condition determines the solution, so not correct to have $\\pm$ in the solution.
", "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$.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "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})}.\\]
"}, {"name": "Solve a separable first order ODE, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "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/"}], "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"], "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,\\]
\nsatisfying $y(\\var{c1})=\\var{d1}$.
\nThe 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", "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},\\]
\nwhich 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.\\]
\nExponentiating both sides leads to
\n\\[\\sqrt{\\var{b1}+y^2}=\\simplify{Ax^(1/{a1})}\\]
\nand, on rearranging for $y$ (and redefining $A$), we have
\n\\[y=\\pm\\sqrt{\\simplify{A*x^(2/{a1})-{b1}}}.\\]
\nThen we have
\n\\[\\var{d1}=y(\\var{c1})=\\pm\\sqrt{\\simplify{A*{c1}^(2/{a1})-{b1}}},\\]
\nso
\n\\[A=\\simplify[std]{({d1}^2+{b1})/{c1}^(2/{a1})}=\\simplify{{d1^2+b1}/{c1^(2/a1)}}.\\]
\nThen the full solution is
\n\\[y=\\pm\\sqrt{\\simplify{{d1^2+b1}/{c1^(2/a1)}*x^(2/{a1})-{b1}}}.\\]
"}, {"name": "Solve a separable first order ODE with trig functions, ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "parts": [{"variableReplacementStrategy": "originalfirst", "scripts": {}, "gaps": [{"answer": "{d1}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"showStrings": false, "message": "Do not enter decimals in your answer.
", "strings": ["."], "partialCredit": 0}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}, {"answer": "{beta}", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"showStrings": false, "message": "Do not enter decimals in your answer.
", "strings": ["."], "partialCredit": 0}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "answersimplification": "fractionnumbers", "type": "jme", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}, {"answer": "{if(is_cosec,1,0)}*cosec(x)+{if(is_cosec,0,1)}*sin(x)", "showCorrectAnswer": true, "vsetrange": [0, 1], "checkingaccuracy": 0.001, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"showStrings": false, "message": "Do not enter decimals in your answer.
", "strings": ["."], "partialCredit": 0}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "type": "jme", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "showCorrectAnswer": true, "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]]
", "variableReplacements": [], "marks": 0}], "variables": {"beta": {"templateType": "anything", "group": "Ungrouped variables", "definition": "abs({b1}/{a1})", "name": "beta", "description": ""}, "c1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-11,-7,-3,1,5,9)", "name": "c1", "description": ""}, "is_cosec": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(b1*a1<0,true,false)", "name": "is_cosec", "description": ""}, "b1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9 except [0,a1])", "name": "b1", "description": ""}, "a1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9)*sign(random(-1,1))", "name": "a1", "description": ""}, "d1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..9)*sign(random(-1,1))", "name": "d1", "description": ""}}, "ungrouped_variables": ["a1", "c1", "b1", "d1", "beta", "is_cosec"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "variable_groups": [], "showQuestionGroupNames": false, "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "You are given the differential equation
\n\\[\\simplify{{a1}*sin(x)*y'}=\\simplify{{b1}*y*cos(x)},\\]
\nsatisfying $y\\left(\\simplify{{c1}*pi/2}\\right)=\\var{d1}$.
\nThe 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$.
", "tags": ["checked2015", "MAS1603", "MAS2105"], "rulesets": {"std": ["all", "!collectNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "Better to ask for solution directly as breaking down the solution in this way forces only one way of inputting.
", "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)$.
"}, "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)},\\]
\nwhich can be integrated to give
\n\\[\\ln\\lvert y\\rvert=\\simplify{{b1}/{a1}*ln(abs(sin(x)))}+c,\\]
\nso
\n\\[y=\\simplify[all,fractionnumbers]{A*({if(is_cosec,1,0)}*cosec(x)+{if(is_cosec,0,1)}*sin(x))^({beta})},\\]
\nwhich is the general solution of the equation.
\nThen 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}))},\\]
\nso $A=\\var{d1}$.
\nThen 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})}.\\]
"}, {"name": "Classify singular points of a second order ODE", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [{"variables": ["singular_points", "extra_points", "points", "a", "b", "c", "p", "q", "y''", "y'", "y", "is_essential", "essential_points", "regular_points"], "name": "Unnamed group"}], "variables": {"q": {"group": "Unnamed group", "templateType": "anything", "definition": "map(c[j]-a[j],j,0..len(points)-1)", "description": "Power of $x-\\alpha$ in $q(x)$, for $\\alpha \\in roots$
", "name": "q"}, "singular_points": {"group": "Unnamed group", "templateType": "anything", "definition": "shuffle(list(-5..5))[0..random(0,1,1,1,2,2,2,2)]", "description": "Some randomly picked points to be singular.
", "name": "singular_points"}, "points": {"group": "Unnamed group", "templateType": "anything", "definition": "singular_points+extra_points", "description": "", "name": "points"}, "b": {"group": "Unnamed group", "templateType": "anything", "definition": "map(max(0,x+random(-2..1)),x,a[0..len(a)-2])+[random(1,1,1,2),0]", "description": "Power of $x-\\alpha$ in coefficient of $y'$, for $\\alpha \\in roots$
", "name": "b"}, "c": {"group": "Unnamed group", "templateType": "anything", "definition": "map(max(0,random(x-2..x+1 except x)),x,a[0..len(a)-2])+[0,random(1,1,1,2)]", "description": "Power of $x-\\alpha$ in coefficient of $y$, for $\\alpha \\in roots$
", "name": "c"}, "regular_points": {"group": "Unnamed group", "templateType": "anything", "definition": "singular_points except essential_points", "description": "The regular singular points
", "name": "regular_points"}, "y''": {"group": "Unnamed group", "templateType": "anything", "definition": "coefficient(singular_points,a,'y\\'\\'')", "description": "$y''$ term.
", "name": "y''"}, "essential_points": {"group": "Unnamed group", "templateType": "anything", "definition": "filterjs(singular_points,is_essential)", "description": "The essential singular points
", "name": "essential_points"}, "extra_points": {"group": "Unnamed group", "templateType": "anything", "definition": "shuffle(-5..5 except singular_points)[0..2]", "description": "", "name": "extra_points"}, "y'": {"group": "Unnamed group", "templateType": "anything", "definition": "coefficient(points,b,'y\\'')", "description": "$y'$ term
", "name": "y'"}, "is_essential": {"group": "Unnamed group", "templateType": "anything", "definition": "map(b[j]Is point $j$ an essential singular point? True if $(x-\\alpha_j)^{a_j-b_j}>1$ or $(x-\\alpha_j)^{a_j-c_j}>1$", "name": "is_essential"}, "a": {"group": "Unnamed group", "templateType": "anything", "definition": "map(random(1..2),x,singular_points)+[0,0]", "description": "Power of $x-\\alpha$ in coefficient of $y''$, for $\\alpha \\in roots$
", "name": "a"}, "p": {"group": "Unnamed group", "templateType": "anything", "definition": "map(b[j]-a[j],j,0..len(points)-1)", "description": "Power of $x-\\alpha$ in $p(x)$, for $\\alpha \\in roots$
", "name": "p"}, "y": {"group": "Unnamed group", "templateType": "anything", "definition": "coefficient(points,c,'y')", "description": "$y$ term.
", "name": "y"}}, "ungrouped_variables": [], "functions": {"filterjs": {"type": "list", "language": "javascript", "definition": "// elements x[i] such that include[i] is true\nreturn x.filter(function(v,i){ return include[i] });", "parameters": [["x", "list"], ["include", "list"]]}, "coefficient": {"type": "string", "language": "javascript", "definition": "var tops = [];\nvar bottoms = [];\nfor(var i=0;iRegular singular points: [[0]]
\n", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "useCustomName": false, "customName": "", "unitTests": [], "showFeedbackIcon": true, "scripts": {}, "gaps": [{"answer": "{sort(regular_points)}", "useCustomName": false, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showPreview": true, "customName": "", "checkVariableNames": false, "unitTests": [], "valuegenerators": [], "vsetRange": [0, 1], "marks": 1, "showFeedbackIcon": true, "scripts": {"mark": {"script": "var os = this.studentAnswer;\nvar oc = this.settings.correctAnswer;\nthis.studentAnswer = 'set('+this.studentAnswer+')';\nthis.settings.correctAnswer = 'set('+this.settings.correctAnswer+')';\nJMEPart.prototype.mark.apply(this);\n\nthis.studentAnswer = os;\nthis.settings.correctAnswer = oc;", "order": "instead"}}, "vsetRangePoints": 5, "type": "jme", "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "showCorrectAnswer": true, "variableReplacements": [], "failureRate": 1}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 0, "sortAnswers": false}, {"prompt": "Essential singular points: [[0]]
\n", "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "useCustomName": false, "customName": "", "unitTests": [], "showFeedbackIcon": true, "scripts": {}, "gaps": [{"answer": "{sort(essential_points)}", "useCustomName": false, "customMarkingAlgorithm": "", "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "showPreview": true, "customName": "", "checkVariableNames": false, "unitTests": [], "valuegenerators": [], "vsetRange": [0, 1], "marks": 1, "showFeedbackIcon": true, "scripts": {"mark": {"script": "var os = this.studentAnswer;\nvar oc = this.settings.correctAnswer;\nthis.studentAnswer = 'set('+this.studentAnswer+')';\nthis.settings.correctAnswer = 'set('+this.settings.correctAnswer+')';\nJMEPart.prototype.mark.apply(this);\n\nthis.studentAnswer = os;\nthis.settings.correctAnswer = oc;", "order": "instead"}}, "vsetRangePoints": 5, "type": "jme", "variableReplacementStrategy": "originalfirst", "checkingAccuracy": 0.001, "showCorrectAnswer": true, "variableReplacements": [], "failureRate": 1}], "type": "gapfill", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 0, "sortAnswers": false}], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "Find and classify all the singular points (excluding the point at infinity) of the equation
\n\\[ \\var{latex(y'')} + \\var{latex(y')} + \\var{latex(y)} = 0 \\]
\nEnter your answer for each part as a list of numbers, separated by commas and enclosed in square brackets. For example, if $8$ and $9$ were regular singular points, you would enter [8,9]
. If there are no points, enter []
.
Trying out something: get the student to enter a set for each of \"regular singular points\" and \"essential singular points\".
\nFind and classify singular points of a second-order ordinary differential equation. One equation is chosen from a selection of 10.
"}, "advice": "First write the equation in the form
\n\\[y''+p(x)y'+q(x)y=0,\\]
\nso we have
\n\\[ y'' + \\var{latex(coefficient(points,p,'y\\''))} + \\var{latex(coefficient(points,q,'y'))} = 0 \\]
\nThat is,
\n\\begin{align}
p(x) &= \\var{latex(coefficient(points,p,''))}, & q(x) &= \\var{latex(coefficient(points,q,''))}.
\\end{align}
This equation has no singular points, i.e. all points are analytic.
\n$x = \\var{singular_points[0]}$ is a singular point of the equation. This is a regular essential point if both $(\\simplify{x-{singular_points[0]}})p(x)$ and $(\\simplify{x-{singular_points[0]}})^2q(x)$ are analytic at $x = \\var{singular_points[0]}$.
\nSo first form
\n\\[ (\\simplify[]{x-{singular_points[0]}})p(x) = \\var{latex(coefficient(points,[p[0]+1]+p[1..len(p)],''))} \\]
\nThis is {if(p[0]+1>=0,\"analytic\",\"singular\")} at $x = \\var{singular_points[0]}$.
\nNext, form
\n\\[ (\\simplify[]{x-{singular_points[0]}})^2q(x) = \\var{latex(coefficient(points,[q[0]+2]+q[1..len(q)],''))} \\]
\nThis is {if(q[0]+2>=0,\"analytic\",\"singular\")} at $x = \\var{singular_points[0]}$.
\nHence $x = \\var{singular_points[0]}$ is {if(is_essential[0],\"an essential\",\"a regular\")} singular point.
\n$x = \\var{singular_points[1]}$ is another singular point of the equation, so form
\n\\[ (\\simplify[]{x-{singular_points[1]}})p(x) = \\var{latex(coefficient(points,[p[0],p[1]+1]+p[2..len(p)],''))} \\]
\nThis is {if(p[1]+1>=0,\"analytic\",\"singular\")} at $x = \\var{singular_points[1]}$.
\nNext, form
\n\\[ (\\simplify[]{x-{singular_points[1]}})^2q(x) = \\var{latex(coefficient(points,[q[0],q[1]+2]+q[2..len(q)],''))} \\]
\nThis is {if(q[1]+2>=0,\"analytic\",\"singular\")} at $x = \\var{singular_points[1]}$.
\nHence $x = \\var{singular_points[1]}$ is {if(is_essential[1],\"an essential\",\"a regular\")} singular point.
\nDo not enter decimals in your answer.
", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "type": "jme", "answersimplification": "all", "marks": 1, "vsetrangepoints": 5}, {"answer": "-{a1+b1}*a1/6", "showCorrectAnswer": true, "vsetrange": [0, 1], "scripts": {}, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"message": "Do not enter decimals in your answer.
", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "showpreview": true, "checkingtype": "absdiff", "checkingaccuracy": 0.001, "type": "jme", "answersimplification": "all", "marks": 1, "vsetrangepoints": 5}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "In your answer use the symbols a0
and a1
for $a_0$ and $a_1$ respectively. In addition, do not enter decimals.
$a_2=$ [[0]].
\n$a_3=$ [[1]].
", "marks": 0}], "statement": "{addSumFunction()}
\nSeek a power series solution, about $x=0$, in the form
\n\\[y(x)=\\sum_{n=0}^{\\infty}{a_nx^n},\\]
\nof the differential equation
\n\\[\\simplify{y''+{a1}*x*y'+{b1}*y}=0.\\]
\nTake $a_0$ and $a_1$ to be arbitrary constants, and enter the coefficients $a_2$ and $a_3$ as functions of $a_0$ and $a_1$.
", "tags": ["checked2015", "MAS2105"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "Uses a custom function to allow simplification of a LaTeX sum, in the same manner as e.g. int()
or defint()
.
Power series solution of $y''+axy'+by=0$ about $x=0$.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "We have
\n\\[y(x)=\\sum_{n=0}^{\\infty}{a_nx^n},\\]
\nso
\n\\[y'(x)=\\sum_{n=1}^{\\infty}{a_nnx^{n-1}},\\]
\nand
\n\\[y''(x)=\\sum_{n=2}^{\\infty}{a_nn(n-1)x^{n-2}}.\\]
\nSubstitute these expressions into the original differential equation to obtain
\n\\[\\simplify{sum(a_n*n*(n-1)x^(n-2),n=2,infty)+{a1}*sum(a_n*n*x^n,n=1,infty)+{b1}*sum(a_n*x^n,n=0,infty)}=0.\\]
\nNow reset the index $m=n-2$ in the first summation, and $m=n$ in the second and third summations to obtain
\n\\[\\simplify{sum({amp2}*(m+2)*(m+1)x^m,m=0,infty)+{a1}*sum(a_m*m*x^m,m=1,infty)+{b1}*sum(a_m*x^m,m=0,infty)}=0.\\]
\nThis equation must be valid for all values of $x$, so the coefficients of like powers of $x$ must vanish. Take $m=0$ to obtain the coefficients of $x^0$, then
\n\\[\\simplify{2*a2+{b1}*a0}=0,\\]
\nand so
\n\\[a_2=\\simplify{{-b1}*a0/2}.\\]
\nNow take $m=1$ to obtain the coefficients of $x^1$, so
\n\\[\\simplify{6*a3+{a1}*a1+{b1}*a1}=0,\\]
\nthen
\n\\[a_3=\\simplify{-{a1+b1}*a1/6}.\\]
"}]}], "contributors": [{"name": "Henrik Skov Midtiby", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/829/"}], "extensions": [], "custom_part_types": [], "resources": []}