// Numbas version: exam_results_page_options {"name": "Differential equation with 3 simple linear factors & delta function: X(s)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"description": "

Solve a Differential equation having 3 simple linear factors & a delta function.

", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "variable_groups": [], "rulesets": {}, "preamble": {"js": "", "css": ""}, "ungrouped_variables": ["b1", "a1", "c1", "d1", "i0", "i1", "e1"], "name": "Differential equation with 3 simple linear factors & delta function: X(s)", "tags": [], "variablesTest": {"maxRuns": "222", "condition": ""}, "parts": [{"strictPrecision": true, "precisionMessage": "You have not given your answer to the correct precision.", "showFeedbackIcon": true, "precisionType": "dp", "scripts": {}, "prompt": "

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

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

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

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

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

", "precisionPartialCredit": 0, "maxValue": "({c1}+({i0}*-{b1}+{i1}+({a1}+{b1})*{i0})*(-{b1}))/((-{b1})(-{b1}+{a1}))", "mustBeReduced": false, "precision": "3", "type": "numberentry", "allowFractions": false, "variableReplacementStrategy": "originalfirst", "minValue": "({c1}+({i0}*-{b1}+{i1}+({a1}+{b1})*{i0})*(-{b1}))/((-{b1})(-{b1}+{a1}))", "showCorrectAnswer": true, "mustBeReducedPC": 0, "variableReplacements": [], "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "marks": 1, "correctAnswerStyle": "plain"}, {"type": "numberentry", "minValue": "{e1}/(-{a1}+{b1})", "allowFractions": false, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "mustBeReducedPC": 0, "maxValue": "{e1}/(-{a1}+{b1})", "scripts": {}, "prompt": "

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

", "variableReplacements": [], "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "correctAnswerFraction": false, "marks": 1, "correctAnswerStyle": "plain"}, {"type": "numberentry", "minValue": "{e1}/(-{b1}+{a1})", "allowFractions": false, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "mustBeReducedPC": 0, "maxValue": "{e1}/(-{b1}+{a1})", "scripts": {}, "prompt": "

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

", "variableReplacements": [], "notationStyles": ["plain", "en", "si-en"], "mustBeReduced": false, "correctAnswerFraction": false, "marks": 1, "correctAnswerStyle": "plain"}], "extensions": [], "functions": {}, "statement": "

The solution to the differential equation:

\n

     \\(\\frac{d^2x}{dt^2}+\\simplify{{a1}+{b1}}\\frac{dx}{dt}+\\simplify{{a1}*{b1}}x(t)=\\var{c1}+\\var{e1}\\delta(t-\\var{d1})\\)  where \\(x(0)=\\var{i0} \\,\\, and \\,\\,  x'(0)=\\var{i1}\\)

\n

is given by

\n

     \\(x(t)=A+Be^{-\\var{a1}t}+Ce^{-\\var{b1}t}+u(t-\\var{d1})(De^{-\\var{a1}(t-\\var{d1})}+Ee^{-\\var{b1}(t-\\var{d1})})\\)

", "advice": "

\\(\\frac{d^2x}{dt^2}+\\simplify{{a1}+{b1}}\\frac{dx}{dt}+\\simplify{{a1}*{b1}}x(t)=\\var{c1}+\\var{e1}\\delta(t-\\var{d1})\\)  where \\(x(0)=\\var{i0} \\,\\, and \\,\\,  x'(0)=\\var{i1}\\)

\n

The Laplace transform of this is given by:

\n

\\(s^2X(s)-\\var{i0}s-\\var{i1}+\\simplify{{a1}+{b1}}(sX(s)-\\var{i0})+\\simplify{{a1}*{b1}}X(s)=\\frac{\\var{c1}}{s}+\\var{e1}e^{-\\var{d1}s}\\)

\n

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

\n

\\((s^2+\\simplify{{a1}+{b1}}s+\\simplify{{a1}*{b1}})X(s)=\\frac{\\var{c1}}{s}+\\var{i0}s+\\simplify{{i1}+({a1}+{b1})*{i0}}+\\var{e1}e^{-\\var{d1}s}\\)

\n

\\((s^2+\\simplify{{a1}+{b1}}s+\\simplify{{a1}*{b1}})X(s)=\\frac{\\simplify{{c1}+({i0}s+{i1}+({a1}+{b1})*{i0})*s}}{s}+\\var{e1}e^{-\\var{d1}s}\\)

\n

\\(X(s)=\\frac{\\simplify{{c1}+{i0}s^2+({i1}+({a1}+{b1})*{i0})*(s)}}{(s)(s+\\var{a1})(s+\\var{b1})}+e^{-\\var{d1}s}\\frac{\\var{e1}}{(s+\\var{a1})(s+\\var{b1})}\\)

\n

\\(X(s)=\\frac{A}{s}+\\frac{B}{s+\\var{a1}}+\\frac{C}{s+\\var{b1}}+e^{-\\var{d1}s}\\left(\\frac{D}{s+\\var{a1}}+\\frac{E}{s+\\var{b1}}\\right)\\)

\n

Solving for \\(A, B\\) and \\(C\\)

\n

\\(\\frac{\\simplify{{c1}+{i0}s^2+({i1}+({a1}+{b1})*{i0})*(s)}}{(s)(s+\\var{a1})(s+\\var{b1})}=\\frac{A}{s}+\\frac{B}{s+\\var{a1}}+\\frac{C}{s+\\var{b1}}\\)

\n

\\(\\simplify{{i0}s^2+({i1}+({a1}+{b1})*{i0})*(s)+{c1}}=A(s+\\var{a1})(s+\\var{b1})+B(s)(s+\\var{b1})+C(s)(s+\\var{a1})\\)

\n

Let \\(s=0\\)

\n

\\(\\var{c1}=\\simplify{({a1})({b1})}A\\)

\n

\\(A=\\simplify{{c1}/({a1}*{b1})}\\)

\n

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

\n

\\(\\simplify{{c1}+({i0}*-{a1}+{i1}+({a1}+{b1})*{i0})*(-{a1})}=\\simplify{(-{a1})(-{a1}+{b1})}B\\)

\n

\\(B=\\simplify{({c1}+({i0}*-{a1}+{i1}+({a1}+{b1})*{i0})*(-{a1}))/((-{a1})(-{a1}+{b1}))}\\)

\n

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

\n

\\(\\simplify{{c1}+({i0}*-{b1}+{i1}+({a1}+{b1})*{i0})*(-{b1})}=\\simplify{(-{b1})(-{b1}+{a1})}C\\)

\n

\\(C=\\simplify{({c1}+({i0}*-{b1}+{i1}+({a1}+{b1})*{i0})*(-{b1}))/((-{b1})(-{b1}+{a1}))}\\)

\n

Solving for \\(D\\) and \\(E\\), ignore the term \\(e^{-\\var{d1}s}\\)

\n

\\(\\frac{\\var{e1}}{(s+\\var{a1})(s+\\var{b1})}=\\frac{D}{s+\\var{a1}}+\\frac{E}{s+\\var{b1}}\\)

\n

\\(\\var{e1}=D(s+\\var{b1})+E(s+\\var{a1})\\)

\n

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

\n

\\(\\var{e1}=\\simplify{-{a1}+{b1}}D\\)

\n

\\(D=\\simplify{{e1}/(-{a1}+{b1})}\\)

\n

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

\n

\\(\\var{e1}=\\simplify{-{b1}+{a1}}E\\)

\n

\\(E=\\simplify{{e1}/({a1}-{b1})}\\)

", "variables": {"d1": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "d1", "definition": "random(2..10)"}, "c1": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "c1", "definition": "random(1..10)"}, "e1": {"description": "", "group": "Ungrouped variables", "templateType": "randrange", "name": "e1", "definition": "random(2..9#1)"}, "i1": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "i1", "definition": "random(1..10) "}, "i0": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "i0", "definition": "random(1..10)"}, "a1": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "a1", "definition": "random(1..5)"}, "b1": {"description": "", "group": "Ungrouped variables", "templateType": "anything", "name": "b1", "definition": "random(6..11)"}}, "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/"}]}