Series Solution Take-Home Number 4
With initial conditions
Truncated series solutions are graphed in blue (Order = 8), red (Order = 12), green (Order = 16), and black (Order = 32) .
> | ode:=x*diff(y(x),x,x)-y(x)=0; |
> | Order:=8; |
> | dsolve({ode,y(2)=0,D(y)(2)=3},y(x),type=series); |
> | rhs(%); |
> | poly1:=convert(%,polynom); |
> | with(plots): |
> | SeriesSoln1:=plot(poly1,x=2..7,color=blue): |
> | display(SeriesSoln1); |
> | Order:=12; |
> | dsolve({ode,y(2)=0,D(y)(2)=3},y(x),type=series); |
> | rhs(%); |
> | poly2:=convert(%,polynom); |
> | SeriesSoln2:=plot(poly2,x=2..7,color=red): |
> | display(SeriesSoln1,SeriesSoln2); |
> | Order:=16; |
> | dsolve({ode,y(2)=0,D(y)(2)=3},y(x),type=series); |
> | rhs(%); |
> | poly3:=convert(%,polynom); |
> | SeriesSoln3:=plot(poly3,x=2..7,color=green): |
> | display(SeriesSoln1,SeriesSoln2,SeriesSoln3); |
> | soln1:=plot(poly1,x=2..7,y=0..100,color=blue): |
> | soln2:=plot(poly2,x=2..7,y=0..100,color=red): |
> | soln3:=plot(poly3,x=2..7,y=0..100,color=green): |
> | display(soln1,soln2,soln3); |
> | Order:=32; |
> | dsolve({ode,y(2)=0,D(y)(2)=3},y(x),type=series); |
> | rhs(%); |
> | poly4:=convert(%,polynom); |
> | with(plots): |
> | SeriesSoln4:=plot(poly4,x=2..7,color=black): |
> | display(SeriesSoln4); |
> | soln4:=plot(poly4,x=2..7,y=0..100,color=black): |
> | display(soln1,soln2,soln3,soln4); |
> |