## how to solve laplace transform problem in matlab

### nilesh patel (view profile)

on 16 Feb 2019
Latest activity Answered by Star Strider

### Star Strider (view profile)

on 16 Feb 2019 ### Tags ### Star Strider (view profile)

on 16 Feb 2019

We do not know what you did to solve this. (Always post what you’ve already attempted.) However, if you got frustrated, that is easily understandable.
After a few frustrating minutes dealing with the Symbolic Math Toolbox Laplace transforms...
Try this:
syms s t T Y y(t) y0 Y(s)
Dy = diff(y);
D2y = diff(Dy);
Eqn = D2y + 4*Dy + 3*y;
LapEqn = laplace(Eqn);
LapEqn = subs(LapEqn, {laplace(y(t), t, s), subs(diff(y(t), t), t, 0), y(0)}, {Y(s), 0, 0})
Ys(s) = simplify(LapEqn/Y)
producing finally (after all that):
Ys(s) =
s^2 + 4*s + 3
The time-domain solution (such as it is) is then:
yt = ilaplace(Ys,s,t)
yt =
3*dirac(t) + 4*dirac(1, t) + dirac(2, t)
If you are just beginning to use the MATLAB Symbolic Math Toolbox, I would not expect that you would be able to work with it in this context. This should quite definitely not be as difficult as it is.