MapleDESeriesSolnEx12.mws

Series Solution Example 12

Some Polynomial Approximations

Truncated series solutions are graphed in red (Order 9 and then Order 10), blue (Order 12), green (Order 14), magenta (Order 24), and black (Order 36).

>    ode:=diff(y(x),x,x)+x*y(x)=x*sin(x);

ode := diff(y(x),`$`(x,2))+x*y(x) = x*sin(x)

>    Order:=9;

Order := 9

>    dsolve({ode,y(0)=0,D(y)(0)=1},y(x),type=series);

y(x) = series(1*x-1/180*x^6+1/6720*x^8+O(x^9),x,9)

>    rhs(%);

series(1*x-1/180*x^6+1/6720*x^8+O(x^9),x,9)

>    poly:=convert(%,polynom);

poly := x-1/180*x^6+1/6720*x^8

>    with(plots):SeriesSoln:=plot(poly,x=0..8,y=-40..40,color=red):

>    display(SeriesSoln);

[Maple Plot]

>    Order:=10;

Order := 10

Order := 12

>    dsolve({ode,y(0)=0,D(y)(0)=1},y(x),type=series);

y(x) = series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9+O(x^10),x,10)

>    rhs(%);

series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9+O(x^10),x,10)

>    poly1:=convert(%,polynom);

poly1 := x-1/180*x^6+1/6720*x^8+1/12960*x^9

>    with(plots):SeriesSoln1:=plot(poly1,x=0..5,y=-10..40,color=red):

>    display(SeriesSoln1);

[Maple Plot]

>    Order:=12;

Order := 12

>    dsolve({ode,y(0)=0,D(y)(0)=1},y(x),type=series);

y(x) = series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11+O(x^12),x,12)

>    rhs(%);

series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11+O(x^12),x,12)

>    poly2:=convert(%,polynom);

poly2 := x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11

>    SeriesSoln2:=plot(poly2,x=0..5,y=-10..40,color=blue):

>    display(SeriesSoln1,SeriesSoln2);

[Maple Plot]

>    Order:=14;

Order := 14

>    dsolve({ode,y(0)=0,D(y)(0)=1},y(x),type=series);

y(x) = series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+O(x^14),x,14)

>    rhs(%);

series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+O(x^14),x,14)

>    poly3:=convert(%,polynom);

poly3 := x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13

>    SeriesSoln3:=plot(poly3,x=0..5,y=-10..40,color=green):

>    display(SeriesSoln1,SeriesSoln2,SeriesSoln3);

[Maple Plot]

>    Order:=24;

Order := 24

>    dsolve({ode,y(0)=0,D(y)(0)=1},y(x),type=series);

y(x) = series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/4001483...
y(x) = series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/4001483...
y(x) = series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/4001483...

>    rhs(%);

series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/40014835660800...
series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/40014835660800...
series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/40014835660800...

>    poly4:=convert(%,polynom);

poly4 := x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/40014835660800...
poly4 := x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/40014835660800...
poly4 := x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/40014835660800...

>    SeriesSoln4:=plot(poly4,x=0..5,y=-10..40,color=magenta):

>    display(SeriesSoln1,SeriesSoln2,SeriesSoln3,SeriesSoln4);

[Maple Plot]

>    Order:=36;

Order := 36

>    dsolve({ode,y(0)=0,D(y)(0)=1},y(x),type=series);

y(x) = series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/4001483...
y(x) = series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/4001483...
y(x) = series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/4001483...
y(x) = series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/4001483...
y(x) = series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/4001483...
y(x) = series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/4001483...
y(x) = series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/4001483...

>    rhs(%);

series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/40014835660800...
series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/40014835660800...
series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/40014835660800...
series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/40014835660800...
series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/40014835660800...
series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/40014835660800...
series(1*x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/40014835660800...

>    poly5:=convert(%,polynom);

poly5 := x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/40014835660800...
poly5 := x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/40014835660800...
poly5 := x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/40014835660800...
poly5 := x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/40014835660800...
poly5 := x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/40014835660800...
poly5 := x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/40014835660800...
poly5 := x-1/180*x^6+1/6720*x^8+1/12960*x^9-1/453600*x^10-1/739200*x^11-1/1774080*x^12+1/70761600*x^13+53/7264857600*x^14+1/372556800*x^15-29/498161664000*x^16-53/1976041267200*x^17-3511/40014835660800...

>    SeriesSoln5:=plot(poly5,x=0..5,y=-10..40,color=black):

>    display(SeriesSoln1,SeriesSoln2,SeriesSoln3,SeriesSoln4,SeriesSoln5);

[Maple Plot]

>   

>