// Numbas version: exam_results_page_options {"name": "Differential equation with a simple irreducible quadratic factor: Q(s)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"ungrouped_variables": ["a1", "c1", "d1", "i0", "i1"], "metadata": {"licence": "Creative Commons Attribution-NonCommercial 4.0 International", "description": "

Solve a Differential equation with a  simple irreducible quadratic factor

"}, "variablesTest": {"condition": "", "maxRuns": "222"}, "preamble": {"js": "", "css": ""}, "functions": {}, "advice": "

 \\(\\frac{d^2q}{dt^2}+\\simplify{{a1}^2}q(t)=\\var{c1}e^{-\\var{d1}t}\\)  where \\(q(0)=\\var{i0} \\,\\, and \\,\\,  q'(0)=\\var{i1}\\)

\n

The Laplace transform of this is given by:

\n

\\(s^2Q(s)-\\var{i0}s-\\var{i1}+\\simplify{{a1}^2}Q(s)=\\frac{\\var{c1}}{s+\\var{d1}}\\)

\n

Gathering only \\(Q(s)\\) terms on the left hand side and factoring gives:

\n

\\((s^2+\\simplify{{a1}^2})Q(s)=\\frac{\\var{c1}}{s+\\var{d1}}+\\var{i0}s+\\var{i1}\\)

\n

\\((s^2+\\simplify{{a1}*{a1}})Q(s)=\\frac{\\simplify{{c1}+({i0}s+{i1})*(s+{d1})}}{s+\\var{d1}}\\)

\n

\\(Q(s)=\\frac{\\simplify{{c1}+({i0}s+{i1})*(s+{d1})}}{(s+\\var{d1})(s^2+\\var{a1}^2)}\\)

\n

\\(Q(s)=\\frac{A}{s+\\var{d1}}+\\frac{Bs+c}{s^2+\\var{a1}^2}\\)

\n

\\(\\simplify{{c1}+({i0}s+{i1})*(s+{d1})}=A(s^2+\\var{a1}^2)+Bs(s+\\var{d1})+c(s+\\var{d1})\\)

\n

Let \\(s=-\\var{d1}\\)

\n

\\(\\var{c1}=\\simplify{{d1}^2+{a1}^2}A\\)

\n

\\(A=\\simplify{({c1})/(({d1}^2+{a1}^2))}\\)

\n

Let \\(s=0\\)

\n

\\(\\simplify{{c1}+{i1}*{d1}}=\\simplify{{a1}^2}A+{\\var{d1}}c\\)

\n

\\(\\simplify{{c1}+{i1}*{d1}}=\\simplify{{a1}^2*{c1}/({d1}^2+{a1}^2)}+{\\var{d1}}c\\)

\n

\n

\\(\\var{d1}c=\\simplify{{c1}+{i1}*{d1}}-\\simplify{{a1}^2*{c1}/({d1}^2+{a1}^2)}\\)

\n

\\(c=\\frac{\\simplify{({c1}+{i1}*{d1})-({a1}^2*{c1})/({d1}^2+{a1}^2)}}{\\var{d1}}\\)

\n

\n

But the coefficient of \\(sin(\\var{a1}t)\\) is given by \\(C=\\frac{c}{\\var{a1}}\\)

\n

\\(C=\\frac{\\simplify{{c1}+{i1}*{d1}-{a1}^2*{c1}/({d1}^2+{a1}^2)}}{\\simplify{{a1}*{d1}}}\\)

\n

\\(C=\\simplify{(({c1}+{i1}*{d1})*({d1}^2+{a1}^2)-{a1}^2*{c1})/(({d1}^2+{a1}^2)*({a1}*{d1}))}\\)

\n

Compare the coefficients of \\(s^2\\)   

\n

\\(\\var{i0}=A+B\\)

\n

\\(B=\\var{i0}-\\simplify{({c1})/(({d1}^2+{a1}^2))}=\\simplify{(({d1}^2+{a1}^2)*{i0}-{c1})/({d1}^2+{a1}^2)}\\)

\n

", "tags": [], "statement": "

The solution to the differential equation:

\n

     \\(\\frac{d^2q}{dt^2}+\\simplify{{a1}^2}q(t)=\\var{c1}e^{-\\var{d1}t}\\)  where \\(q(0)=\\var{i0} \\,\\, and \\,\\,  q'(0)=\\var{i1}\\)

\n

is given by

\n

     \\(q(t)=Ae^{-\\var{d1}t}+Bcos(\\var{a1}t)+Csin(\\var{a1}t)\\)

", "name": "Differential equation with a simple irreducible quadratic factor: Q(s)", "parts": [{"precisionPartialCredit": 0, "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "mustBeReduced": false, "showCorrectAnswer": true, "showPrecisionHint": false, "variableReplacements": [], "mustBeReducedPC": 0, "precision": "3", "prompt": "

Enter the value for \\(A\\) correct to three decimal places.

", "showFeedbackIcon": true, "strictPrecision": true, "variableReplacementStrategy": "originalfirst", "precisionMessage": "You have not given your answer to the correct precision.", "minValue": "({c1})/(({d1}^2+{a1}^2))", "marks": 1, "correctAnswerFraction": false, "maxValue": "({c1})/(({d1}^2+{a1}^2))", "scripts": {}, "type": "numberentry", "precisionType": "dp"}, {"precisionPartialCredit": 0, "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "mustBeReduced": false, "showCorrectAnswer": true, "showPrecisionHint": false, "variableReplacements": [], "mustBeReducedPC": 0, "precision": "3", "prompt": "

Enter the value for \\(B\\) correct to three decimal places.

", "showFeedbackIcon": true, "strictPrecision": true, "variableReplacementStrategy": "originalfirst", "precisionMessage": "You have not given your answer to the correct precision.", "minValue": "(({d1}^2+{a1}^2)*{i0}-{c1})/({d1}^2+{a1}^2)", "marks": 1, "correctAnswerFraction": false, "maxValue": "(({d1}^2+{a1}^2)*{i0}-{c1})/({d1}^2+{a1}^2)", "scripts": {}, "type": "numberentry", "precisionType": "dp"}, {"precisionPartialCredit": 0, "allowFractions": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain", "mustBeReduced": false, "showCorrectAnswer": true, "showPrecisionHint": false, "variableReplacements": [], "mustBeReducedPC": 0, "precision": "3", "prompt": "

Enter the value for \\(C\\) correct to three decimal places.

", "showFeedbackIcon": true, "strictPrecision": true, "variableReplacementStrategy": "originalfirst", "precisionMessage": "You have not given your answer to the correct precision.", "minValue": "({c1}+{i1}*{d1}-{a1}^2*{c1}/({d1}^2+{a1}^2))/({{a1}*{d1}})", "marks": 1, "correctAnswerFraction": false, "maxValue": "({c1}+{i1}*{d1}-{a1}^2*{c1}/({d1}^2+{a1}^2))/({{a1}*{d1}})", "scripts": {}, "type": "numberentry", "precisionType": "dp"}], "extensions": [], "variables": {"c1": {"definition": "random(1..10)", "name": "c1", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "a1": {"definition": "random(1..5)", "name": "a1", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "d1": {"definition": "random(12..16)", "name": "d1", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "i0": {"definition": "random(1..10)", "name": "i0", "templateType": "anything", "group": "Ungrouped variables", "description": ""}, "i1": {"definition": "random(1..10) ", "name": "i1", "templateType": "anything", "group": "Ungrouped variables", "description": ""}}, "variable_groups": [], "rulesets": {}, "type": "question", "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}]}], "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}