// Numbas version: finer_feedback_settings {"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": [{"parts": [{"displayColumns": 1, "displayType": "radiogroup", "prompt": "

Which of the following choices defines the form of the general solution of the differential equation?

\n

In 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).

", "maxMarks": 0, "choices": ["

{correctform}

", "

{incorrectform[0]}

", "

{incorrectform[1]}

"], "unitTests": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "scripts": {}, "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "distractors": ["", "", ""], "type": "1_n_2", "matrix": [1, 0, 0], "minMarks": 0, "shuffleChoices": true, "marks": 0, "extendBaseMarkingAlgorithm": true, "showCellAnswerState": true, "variableReplacements": []}, {"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$.

\n

Enter your answers to 3 d.p.

\n

$\\lambda_1=$ [[0]]

\n

$\\lambda_2=$ [[1]]

", "unitTests": [], "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "sortAnswers": false, "variableReplacementStrategy": "originalfirst", "type": "gapfill", "gaps": [{"answer": "{lambda1}", "extendBaseMarkingAlgorithm": true, "vsetRangePoints": 5, "checkingType": "absdiff", "unitTests": [], "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "marks": 1, "variableReplacementStrategy": "originalfirst", "type": "jme", "checkVariableNames": false, "showPreview": true, "customMarkingAlgorithm": "", "failureRate": 1, "expectedVariableNames": [], "vsetRange": [0, 1], "checkingAccuracy": 0.001}, {"answer": "{lambda2}", "extendBaseMarkingAlgorithm": true, "vsetRangePoints": 5, "checkingType": "absdiff", "unitTests": [], "variableReplacements": [], "scripts": {}, "showCorrectAnswer": true, "showFeedbackIcon": true, "marks": 1, "variableReplacementStrategy": "originalfirst", "type": "jme", "checkVariableNames": false, "showPreview": true, "customMarkingAlgorithm": "", "failureRate": 1, "expectedVariableNames": [], "vsetRange": [0, 1], "checkingAccuracy": 0.001}], "customMarkingAlgorithm": "", "marks": 0, "extendBaseMarkingAlgorithm": true, "variableReplacements": []}], "variablesTest": {"maxRuns": 100, "condition": ""}, "variable_groups": [], "extensions": [], "functions": {}, "advice": "

To determine the form of the general solution of the equation

\n

\\[ay''+by'+c=0,\\]

\n

first set $y=\\mathrm{e}^{\\lambda x}$, and substitute to obtain

\n

\\[a\\lambda^2+b\\lambda+c=0,\\]

\n

for which the solutions are

\n

\\[\\lambda_{1,2}=\\frac{-b\\pm\\sqrt{b^2-4ac}}{2a}.\\]

\n

If $b^2-4ac>0$, then the roots are real and distinct, and the solution takes the form

\n

\\[y(x)=\\var{forms[0]}.\\]

\n

If $b^2-4ac=0$, then the roots are real and repeated, and the solution takes the form

\n

\\[y(x)=\\var{forms[1]}.\\]

\n

If $b^2-4ac<0$, then the roots are complex, and the solution takes the form

\n

\\[y(x)=\\var{forms[2]},\\]

\n

where $\\lambda_1=\\alpha+i\\beta$ and $\\lambda_2=\\alpha-i\\beta$.

\n

a)

\n

In 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},\\]

\n

which is {ltgteq} zero, so the general solution takes the form

\n

\\[y(x)=\\var{correctform}.\\]

\n

b)

\n

Making the substitution $y=\\mathrm{e}^{\\lambda x}$, then gives

\n

\\[\\simplify{{a1}*lambda^2+{b1}*lambda+{c1}=0},\\]

\n

which has solutions

\n

\\[\\lambda_1=\\frac{\\var{-b1}+\\sqrt{\\var{disc}}}{\\var{2*a1}}=\\var{lambda1} \\text{ to 3 d.p.,}\\]

\n

and

\n

\\[\\lambda_2=\\frac{\\var{-b1}-\\sqrt{\\var{disc}}}{\\var{2*a1}}=\\var{lambda2} \\text{ to 3 d.p.}\\]

", "rulesets": {}, "metadata": {"description": "

Find the solution of a constant coefficient second order ordinary differential equation of the form $ay''+by'+cy=0$.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

You are given the differential equation

\n

\\[\\simplify{{a1}*y''+{b1}*y'+{c1}*y=0}.\\]

", "variables": {"incorrectform": {"templateType": "anything", "description": "", "definition": "switch (\n disc>0, [forms[1],forms[2]],\n disc=0, [forms[0],forms[2]],\n disc<0, [forms[0],forms[1]]\n )", "group": "Ungrouped variables", "name": "incorrectform"}, "correctform": {"templateType": "anything", "description": "", "definition": "switch (\n disc>0, forms[0],\n disc=0, forms[1],\n disc<0, forms[2]\n )", "group": "Ungrouped variables", "name": "correctform"}, "lambda2": {"templateType": "anything", "description": "", "definition": "precround((-b1-sqrt(disc))/(2*a1),3)", "group": "Ungrouped variables", "name": "lambda2"}, "forms": {"templateType": "anything", "description": "", "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)$\"]", "group": "Ungrouped variables", "name": "forms"}, "a1": {"templateType": "anything", "description": "", "definition": "random(1..9)", "group": "Ungrouped variables", "name": "a1"}, "c1": {"templateType": "anything", "description": "", "definition": "random(-9..9 except 0)", "group": "Ungrouped variables", "name": "c1"}, "b1": {"templateType": "anything", "description": "", "definition": "random(-9..9 except 0)", "group": "Ungrouped variables", "name": "b1"}, "ltgteq": {"templateType": "anything", "description": "", "definition": "switch (\n disc>0, \"greater than\",\n disc=0, \"equal to\",\n disc<0, \"less than\"\n )", "group": "Ungrouped variables", "name": "ltgteq"}, "lambda1": {"templateType": "anything", "description": "", "definition": "precround((-b1+sqrt(disc))/(2*a1),3)", "group": "Ungrouped variables", "name": "lambda1"}, "disc": {"templateType": "anything", "description": "", "definition": "b1^2-4*a1*c1", "group": "Ungrouped variables", "name": "disc"}}, "preamble": {"js": "", "css": ""}, "ungrouped_variables": ["a1", "correctform", "incorrectform", "forms", "disc", "b1", "c1", "lambda1", "lambda2", "ltgteq"], "tags": ["checked2015"], "name": "Solve a constant coefficient second order ODE", "type": "question", "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/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "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/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}