% Section 4.5 Exercise 10
% x'' +  4*x = cos(3*t)
% with the 
% particular solution:
% xp=-1/5*cos(3*t)
% and the 
% homogeneous solution:
% xh = c1*cos(2*t) + c2*sin(2*t) 
t = linspace(-1,25,100);
c1=1;c2=0.001;
xh = c1*cos(2*t) + c2*sin(2*t) ;
xp = -1/5*cos(3*t);
x = xh + xp;

figure(10)
plot(t,xh,'.-.r',t,xp,'-ob',t,x,'-g','Linewidth',2)
legend('homogeneous','particular','solution')
title('!!!')
