% Section 4.5 Exercise 3
% y'' + 2*y' + 5*y = 12*exp(-t)
% with the 
% particular solution:
% yp=-exp(-t)
% and the 
% homogeneous solution:
% yh = c1*exp(-4*t) + c2*exp(-2*t) 
t = linspace(-1,10,100);
c1=1;c2=0.001;
yh = c1*exp(-4*t) + c2*exp(-2*t);
yp = -exp(-t);
y = yh + yp;

figure(2)
plot(t,yh,'.-.r',t,yp,'-ob',t,y,'-g','Linewidth',2)
legend('homogeneous','particular','solution')
