# NAME    :- IBRAR    
ROLL NO :- 11232225 
TUTORIAL:- GROUP 5th
DATE    :- 22-1-2013

PLOT FAMILY OF SOLUTION CURVE OF 
THE DIFFERENTIAL EQUATION
y''+3*y'+2*y=0 ,WITH y(0)=1,y'(0)=a

                    
kill(all)$
depends(y,x);
eq:diff(y,x,2)+3*diff(y,x)+2*y=0;
sol:ode2(eq,y,x);
solx:ic2(sol,x=0,y=1,diff(y,x)=a);
gr1:ev(solx,a=-3);
gr2:ev(solx,a=-2);
gr3:ev(solx,a=-1);
gr4:ev(solx,a=0);
gr5:ev(solx,a=1);
gr6:ev(solx,a=2);
gr7:ev(solx,a=3);
wxplot2d([rhs(gr1),rhs(gr2),
rhs(gr3),rhs(gr4),rhs(gr5),
rhs(gr6),rhs(gr7)],[x,-1,5],[y,-3,3]);

kill(all) $
eqn:diff(y(x),x,2)+y(x)=0;
desolve(eqn,y(x));

kill(all) $
eqn:diff(y(x),x,2)+y(x)=0;
atvalue(diff(y(x),x),x=0,%k1);
atvalue(y(x),x=0,%k2);
desolve(eqn,y(x));

SOLUTION OF THIRD ORDER DIFFERENTIAL EQUATION

kill(all)$
eqn:diff(y(x),x,3)-5*diff(y(x),x,2)+
8*diff(y(x),x)-4*y(x)=0;
sol:desolve(eqn,y(x));

kill(all)$
eqn:diff(y(x),x,3)-5*diff(y(x),x,2)+
8*diff(y(x),x)-4*y(x)=0;
atvalue(diff(y(x),x,2),x=0,%k1);
atvalue(diff(y(x),x,1),x=0,%k2);
atvalue(y(x),x=0,%k3);
sol:desolve(eqn,y(x));

kill(all);
eq:diff(y(x),x,3)-5*diff(y(x),x,2)+
8*diff(y(x),x)-4*y(x)=0;
atvalue(diff (y(x),x,2),x=0,%k1);
atvalue(diff (y(x),x,1),x=0,%k2);
atvalue(y(x),x=0,%k3)$
sol:desolve(eq,y(x));
sol1:ev(sol,%k1=0,%k2=1,%k3=0);
sol2:ev(sol,%k1=0,%k2=1,%k3=1);
sol3:ev(sol,%k1=1,%k2=1,%k3=0);
sol4:ev(sol,%k1=1,%k2=1,%k3=1);
sol5:ev(sol,%k1=1,%k2=1,%k3=0);
wxplot2d([rhs(sol1),rhs(sol2),rhs(sol3),
rhs(sol4),rhs(sol5)],[x,-1,5],[y,-3,3],
[legend,"y1","y2","y3","y4","y5","y5"]);