I do not understand what you are trying to do. The approach I would take would be
syms y(t) s
eqn = diff(y(t), t, t)+4*y(t) == 4*t*(heaviside(t)-heaviside(t-1))+4*heaviside(t-1)
ode = dsolve(eqn, y(0)==1, subs(diff(y(t),t),t,0)==0)
laplace(ode, t, s)
I would not attempt a laplace before doing the dsolve because at that point the equation has not been sufficiently resolved to do a laplace. The h part has a nice laplace transform but the other side does not.
But if you must...
syms y(t) s Y
eqn = diff(y(t), t, t)+4*y(t) == 4*t*(heaviside(t)-heaviside(t-1))+4*heaviside(t-1)
sol = ilaplace( solve( subs(laplace(eqn, t, s), laplace(y(t), t, s), Y), Y), s, t)
yt = subs(sol, {y(0), sym('D(y)(0)')}, {1, 0})
Best Answer