% Solve the initial value problem
%    y''+3y'+2y = exp(-t)
%      y(0)=4,   y'(0)=5

clear
syms s t Y

% Transform driving term
f = exp(-t);
F = laplace(f,t,s);

% Transform y' and y''
Y1 = s*Y - 4;
Y2 = s*Y1 - 5;

% Solve for Y(s):
Sol = simplify(solve(Y2 + 3*Y1 + 2*Y - F, Y))

% Note that you can do partial fraction decomposition using
%  partfrac(Sol,s)

%Inverse Laplace transform
sol = ilaplace(Sol,s,t)