% Section 4.5 Exercise 12
% y'' + 7*y' + 6*y = 12*exp(-t)
% with the 
% particular solution:
% yp=-0.21*Cos(2t) + 0.03*sin(2t),
% and the 
% homogeneous solution:
% yh = c1*exp(-t) + c2*exp(-6*t) 
t = linspace(-1,10,100);
c1=1;c2=0.001;
yh = c1*exp(-t) + c2*exp(-6*t);
yp = -0.21*cos(2*t) + 0.03*sin(2*t);
y = yh + yp;

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