// Numbas version: exam_results_page_options {"name": "Shaheen's copy of Harry's copy of Second order ODE with constant coefficients and boundary conditions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variables": {"c": {"name": "c", "description": "", "definition": "random(1..5)", "group": "Ungrouped variables", "templateType": "anything"}, "b": {"name": "b", "description": "", "definition": "random(1..7)", "group": "Ungrouped variables", "templateType": "anything"}, "a": {"name": "a", "description": "", "definition": "s*random(1..5)", "group": "Ungrouped variables", "templateType": "anything"}, "s": {"name": "s", "description": "", "definition": "random(1,-1)", "group": "Ungrouped variables", "templateType": "anything"}}, "metadata": {"description": "

Solve: $\\displaystyle \\frac{d^2y}{dx^2}+2a\\frac{dy}{dx}+(a^2+b^2)y=0,\\;y(0)=1$ and $y'(0)=c$. 

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

The auxillary equation is $\\simplify[std]{lambda^2+{2*a}lambda+{a^2+b^2}}=0$.

\n

On solving this equation we get $\\lambda=\\simplify[std]{{-a}+{b}i}$ and $\\lambda=\\simplify[std]{{-a}-{b}i}$.

\n

Hence the general solution is:
\\[y = \\simplify[std]{e^({-a}x)(A*sin({b}x)+B*cos({b}x))}\\]
Note that
\\[y'(x)=\\simplify[std]{-{a}e^({-a}x)(A*sin({b}x)+B*cos({b}x))+e^({-a}x)({b}*A*cos({b}x)-{b}*B*sin({b}x))}\\]
Using the conditions $y(0)=1$ and $y'(0)=\\var{c}$ gives:
\\[\\begin{eqnarray*} B &=& 1\\\\ \\simplify[std]{{b}A+{-a}B}&=& \\var{c} \\end{eqnarray*} \\]
This gives $\\displaystyle{A = \\simplify[std]{{c+a}/{b}}}$.

\n

Hence the solution is:

\n

\\[y=\\simplify[std]{exp({- a} * x) * (cos({b} * x) +  ({c+a} / {b}) * sin({b} * x))}\\]

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "parts": [{"marks": 0, "type": "gapfill", "prompt": "

Solution is:

\n

$y=\\;\\;$[[0]]

\n

Input all numbers as integers or fractions – not as decimals.

", "scripts": {}, "showCorrectAnswer": true, "gaps": [{"checkvariablenames": false, "variableReplacementStrategy": "originalfirst", "expectedvariablenames": [], "vsetrange": [0, 1], "showpreview": true, "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "notallowed": {"showStrings": false, "message": "

Input all numbers as integers or fractions.

", "partialCredit": 0, "strings": ["."]}, "marks": 3, "scripts": {}, "type": "jme", "answersimplification": "std", "checkingtype": "absdiff", "checkingaccuracy": 1e-05, "answer": "exp({- a} * x) * (cos({b} * x) + ({c+a} / {b}) * sin({b} * x))", "vsetrangepoints": 5}], "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "variableReplacements": []}], "name": "Shaheen's copy of Harry's copy of Second order ODE with constant coefficients and boundary conditions", "tags": [], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "preamble": {"js": "", "css": ""}, "statement": "

Solve:
\\[\\simplify[std]{{2*a}*(dy/dx)+{a^2+b^2}y}=0\\]
which satisfies $y(0)=1$ and $y'(0)=\\var{c}$ (where prime denotes the derivative).

", "functions": {}, "ungrouped_variables": ["a", "s", "b", "c"], "extensions": [], "type": "question", "contributors": [{"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1819/"}]}]}], "contributors": [{"name": "Shaheen Charlwood", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1819/"}]}