MATLAB: Help with Laplace ODE

laplace ode

Help solving this laplace ode with intial condition, my a and b values are respectively. I have tried solving this Laplace ode without using my a and b values. below is my code.
Any help is massively appreciated! Thank you
syms t y(t) Y(s) Dy0 a b y0
Dy1 = diff(y,t,1);
eqn = laplace(Dy1== a*sinh(a*t));
eqn = subs(eqn, {laplace(y(t), t, s), subs(diff(y(t), t), t, 0), y(0)},{Y(s), 0,0})
cond= y(0)==22;
Ys(s)= simplify(eqn/Y);
yt = ilaplace(Ys,s,t)

Best Answer

Try this —
syms t y(t) Y(s) Dy0 a b y0
Dy1 = diff(y,t,1);
eqn = laplace(Dy1== a*sinh(a*t))
eqn = 
eqn = subs(eqn, {laplace(y(t), t, s), subs(diff(y(t), t), t, 0), y(0)},{Y(s), 0, 22}) % Substitute 'y(0)' Here
eqn = 
% cond= y(0)==22;
eqn = isolate(eqn, Y)
eqn = 
y(t,a) = ilaplace(rhs(eqn))
y(t, a) = 
figure
fplot(y(t,34), [-0.1 0.1]) % Substitute 'a' Here
grid
.