// Numbas version: exam_results_page_options {"name": "Solve a constant coefficient second order ODE ", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Solve a constant coefficient second order ODE ", "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": {}, "extensions": [], "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}], "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/"}]}]}], "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/"}]}