// Numbas version: finer_feedback_settings {"name": "Differential equation with a repeated linear factor & a delta function: X(s)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"statement": "
The solution to the differential equation:
\n\\(\\frac{d^2x}{dt^2}+\\simplify{{a1}+{a1}}\\frac{dx}{dt}+\\simplify{{a1}*{a1}}x(t)=\\var{c1}e^{-\\var{d1}t}+\\var{b}\\delta(t-\\var{f})\\) where \\(x(0)=\\var{i0} \\,\\, and \\,\\, x'(0)=\\var{i1}\\)
\nis given by
\n\\(x(t)=Ae^{-\\var{d1}t}+Be^{-\\var{a1}t}+Cte^{-\\var{a1}t}+Du(t-\\var{f})(t-\\var{f})e^{-\\var{a1}(t-\\var{f})}\\)
", "preamble": {"js": "", "css": ""}, "variable_groups": [], "variables": {"b": {"name": "b", "group": "Ungrouped variables", "definition": "random(2..12#1)", "templateType": "randrange", "description": ""}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "random(1..9#1)", "templateType": "randrange", "description": ""}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(1..5)", "templateType": "anything", "description": ""}, "d1": {"name": "d1", "group": "Ungrouped variables", "definition": "random(12..16)", "templateType": "anything", "description": ""}, "i0": {"name": "i0", "group": "Ungrouped variables", "definition": "random(1..10)", "templateType": "anything", "description": ""}, "i1": {"name": "i1", "group": "Ungrouped variables", "definition": "random(1..10) ", "templateType": "anything", "description": ""}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "random(1..10)", "templateType": "anything", "description": ""}}, "functions": {}, "ungrouped_variables": ["a1", "c1", "d1", "i0", "i1", "b", "f"], "advice": "\\(\\frac{d^2x}{dt^2}+\\simplify{{a1}+{a1}}\\frac{dx}{dt}+\\simplify{{a1}*{a1}}x(t)=\\var{c1}e^{-\\var{d1}t}+\\var{b}\\delta(t-\\var{f})\\) where \\(x(0)=\\var{i0} \\,\\, and \\,\\, x'(0)=\\var{i1}\\)
\nThe Laplace transform of this is given by:
\n\\(s^2X(s)-\\var{i0}s-\\var{i1}+\\simplify{{a1}+{a1}}(sX(s)-\\var{i0})+\\simplify{{a1}*{a1}}X(s)=\\frac{\\var{c1}}{s+\\var{d1}}+\\var{b}e^{-\\var{f}s}\\)
\nGathering only \\(X(s)\\) terms on the left hand side and factoring gives:
\n\\((s^2+\\simplify{{a1}+{a1}}s+\\simplify{{a1}*{a1}})X(s)=\\frac{\\var{c1}}{s+\\var{d1}}+\\var{i0}s+\\simplify{{i1}+({a1}+{a1})*{i0}}+\\var{b}e^{-\\var{f}s}\\)
\n\\((s^2+\\simplify{{a1}+{a1}}s+\\simplify{{a1}*{a1}})X(s)=\\frac{\\simplify{{c1}+({i0}s+{i1}+({a1}+{a1})*{i0})*(s+{d1})}}{s+\\var{d1}}+\\var{b}e^{-\\var{f}s}\\)
\n\\(X(s)=\\frac{\\simplify{{c1}+({i0}s+{i1}+({a1}+{a1})*{i0})*(s+{d1})}}{(s+\\var{d1})(s+\\var{a1})^2}+\\frac{\\var{b}}{(s+\\var{a1})^2}e^{-\\var{f}s}\\)
\nSolving the first fraction gives:
\n\\(X(s)=\\frac{A}{s+\\var{d1}}+\\frac{B}{s+\\var{a1}}+\\frac{C}{(s+\\var{a1})^2}\\)
\n\\(\\simplify{{c1}+({i0}s+{i1}+({a1}+{a1})*{i0})*(s+{d1})}=A(s+\\var{a1})(s+\\var{a1})+B(s+\\var{d1})(s+\\var{a1})+C(s+\\var{d1})\\)
\nLet \\(s=-\\var{d1}\\)
\n\\(\\simplify{{c1}+({i0}*-{d1}+{i1}+({a1}+{a1})*{i0})*(-{d1}+{d1})}=\\simplify{(-{d1}+{a1})(-{d1}+{a1})}A\\)
\n\\(A=\\simplify{({c1})/((-{d1}+{a1})(-{d1}+{a1}))}\\)
\nLet \\(s=-\\var{a1}\\)
\n\\(\\simplify{{c1}+({i0}*-{a1}+{i1}+({a1}+{a1})*{i0})*(-{a1}+{d1})}=\\simplify{(-{a1}+{d1})}C\\)
\n\\(C=\\simplify{({c1}+({i0}*-{a1}+{i1}+({a1}+{a1})*{i0})*(-{a1}+{d1}))/((-{a1}+{d1}))}\\)
\nCompare the coefficients of \\(s^2\\)
\n\\(\\var{i0}=A+B\\)
\n\\(B=\\simplify{{i0}-(({c1})/((-{d1}+{a1})(-{d1}+{a1})))}\\)
\n\nWe can find the inverse Laplace transform of the second fraction without breaking it down:
\n\\(\\frac{\\var{b}}{(s+\\var{a1})^2}e^{-\\var{f}s}\\) changes to \\(\\var{b}u(t-\\var{f})(t-\\var{f})e^{-\\var{a1}(t-\\var{f})}\\)
\n\\(D=\\var{b}\\)
", "tags": [], "parts": [{"mustBeReducedPC": 0, "allowFractions": false, "maxValue": "{c1}/((-{d1}+{a1})(-{d1}+{a1}))", "showCorrectAnswer": true, "scripts": {}, "precisionMessage": "You have not given your answer to the correct precision.", "precisionType": "dp", "showPrecisionHint": false, "showFeedbackIcon": true, "correctAnswerStyle": "plain", "correctAnswerFraction": false, "type": "numberentry", "minValue": "{c1}/((-{d1}+{a1})(-{d1}+{a1}))", "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "precisionPartialCredit": 0, "marks": 1, "precision": "3", "mustBeReduced": false, "strictPrecision": true, "prompt": "Enter the value for \\(A\\) correct to three decimal places.
"}, {"mustBeReducedPC": 0, "allowFractions": false, "maxValue": "{i0}-{c1}/((-{d1}+{a1})(-{d1}+{a1}))", "showCorrectAnswer": true, "scripts": {}, "precisionMessage": "You have not given your answer to the correct precision.", "precisionType": "dp", "showPrecisionHint": false, "showFeedbackIcon": true, "correctAnswerStyle": "plain", "correctAnswerFraction": false, "type": "numberentry", "minValue": "{i0}-{c1}/((-{d1}+{a1})(-{d1}+{a1}))", "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "precisionPartialCredit": 0, "marks": 1, "precision": "3", "mustBeReduced": false, "strictPrecision": true, "prompt": "Enter the value for \\(B\\) correct to three decimal places.
"}, {"mustBeReducedPC": 0, "allowFractions": false, "maxValue": "({c1}+(-{i0}*{a1}+{i1}+2*{a1}*{i0})*(-{a1}+{d1}))/(-{a1}+{d1})", "showCorrectAnswer": true, "scripts": {}, "precisionMessage": "You have not given your answer to the correct precision.", "precisionType": "dp", "showPrecisionHint": false, "showFeedbackIcon": true, "correctAnswerStyle": "plain", "correctAnswerFraction": false, "type": "numberentry", "minValue": "({c1}+(-{i0}*{a1}+{i1}+2*{a1}*{i0})*(-{a1}+{d1}))/(-{a1}+{d1})", "notationStyles": ["plain", "en", "si-en"], "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "precisionPartialCredit": 0, "marks": 1, "precision": "3", "mustBeReduced": false, "strictPrecision": true, "prompt": "Enter the value for \\(C\\) correct to three decimal places.
"}, {"showFeedbackIcon": true, "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "allowFractions": false, "correctAnswerFraction": false, "maxValue": "b", "type": "numberentry", "variableReplacements": [], "minValue": "b", "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "scripts": {}, "marks": 1, "variableReplacementStrategy": "originalfirst", "mustBeReduced": false, "prompt": "Enter the value for \\(D\\).
"}], "name": "Differential equation with a repeated linear factor & a delta function: X(s)", "variablesTest": {"maxRuns": "222", "condition": ""}, "extensions": [], "metadata": {"licence": "Creative Commons Attribution-NonCommercial 4.0 International", "description": "Solve a Differential equation with a repeated linear factor & a delta function
"}, "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/"}]}