// Numbas version: exam_results_page_options {"name": "Differential equation with 3 simple linear factors & delta function: X(s)", "extensions": [], "custom_part_types": [], "resources": [["question-resources/MSD_6oL6did.jpg", "/srv/numbas/media/question-resources/MSD_6oL6did.jpg"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"rulesets": {}, "extensions": [], "tags": [], "ungrouped_variables": ["b1", "a1", "c1", "d1", "i0", "i1", "e1"], "functions": {}, "name": "Differential equation with 3 simple linear factors & delta function: X(s)", "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})}\\)

\n

.

", "metadata": {"licence": "Creative Commons Attribution-NonCommercial 4.0 International", "description": "

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

"}, "variable_groups": [], "variables": {"d1": {"definition": "random(2..10)", "templateType": "anything", "name": "d1", "group": "Ungrouped variables", "description": ""}, "e1": {"definition": "random(2..9#1)", "templateType": "randrange", "name": "e1", "group": "Ungrouped variables", "description": ""}, "c1": {"definition": "random(1..10)", "templateType": "anything", "name": "c1", "group": "Ungrouped variables", "description": ""}, "b1": {"definition": "random(6..11)", "templateType": "anything", "name": "b1", "group": "Ungrouped variables", "description": ""}, "i0": {"definition": "random(1..10)", "templateType": "anything", "name": "i0", "group": "Ungrouped variables", "description": ""}, "i1": {"definition": "random(1..10) ", "templateType": "anything", "name": "i1", "group": "Ungrouped variables", "description": ""}, "a1": {"definition": "random(1..5)", "templateType": "anything", "name": "a1", "group": "Ungrouped variables", "description": ""}}, "statement": "

The diagram below shows a typical mass-spring-damper system as might apply to the suspension of a car.

\n

(Masses have mass M, springs with stiffness k and dampers having damping coefficient B).

\n

The associated variables are displacement x(t) and force F(t).

\n

 

\n

Initially the mass is at a distance of \\(\\var{i0}cm\\) from the equilibrium point and is moving at \\(\\var{i1}cm/s\\).

\n

If \\(B=\\simplify{{b1}+{a1}}\\),  \\(k=\\simplify{{a1}*{b1}}\\) and the system is subjected to an external applied force \\(F(t)=\\var{c1}+\\var{e1}\\delta(t-\\var{d1})\\)

\n

then from Newton's law we get the differential equation:

\n

\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

\n

The solution to the differential equation is given by:

\n

\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})})\\)

\n

.

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

Enter the value for \\(A\\) as an exact fraction.        \\(A=\\)  [[0]]

\n

Enter the value for \\(B\\) as an exact fraction.        \\(B=\\)  [[1]]

\n

Enter the value for \\(C\\) as an exact fraction.        \\(C=\\)  [[2]]

\n

Enter the value for \\(D\\) as an exact fraction.        \\(D=\\)  [[3]]

\n

Enter the value for \\(E\\) as an exact fraction.        \\(E=\\)  [[4]]

", "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "marks": 0}], "preamble": {"js": "", "css": ""}, "variablesTest": {"condition": "", "maxRuns": "222"}, "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/"}]}