Week 7
Week 7
ans =
-1/(a - s)
ans =
1 - exp(-t)
ans(s) =
1/s - 1/(s + 1)
1
% insert the ICs and simplify the expression
Leqn = subs(Leqn,[laplace(y,t,s),y(0),subs(diff(y(t),t),t,0)],[Y,y0,dy0]);
% solve for Y(s)
Ysol = solve(Leqn,Y);
% find the solution by taking the inverse Laplace transform
ysol = ilaplace(Ysol,s,t)
ysol =
2*exp(-t) + 3*exp(3*t)
Lu =
1/s
Ld =
2
% find the solution by taking the inverse Laplace transform
qsol = ilaplace(Qsol,s,t);