MapleSeriesTHno5.mws

Series Solution Take-Home Number 5

With and Without Initial Conditions

Below are examples with type = series and unspecified type.

>    ode:=2*diff(y(x),x,x)+x*diff(y(x),x)-4*y(x)=x;

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

>    Order:=12;

Order := 12

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

y(x) = series(y(0)+D(y)(0)*x+y(0)*x^2+(1/4*D(y)(0)+1/12)*x^3+1/12*y(0)*x^4+(1/160*D(y)(0)+1/480)*x^5+(-1/13440*D(y)(0)-1/40320)*x^7+(1/645120*D(y)(0)+1/1935360)*x^9+(-1/28385280*D(y)(0)-1/85155840)*x^1...
y(x) = series(y(0)+D(y)(0)*x+y(0)*x^2+(1/4*D(y)(0)+1/12)*x^3+1/12*y(0)*x^4+(1/160*D(y)(0)+1/480)*x^5+(-1/13440*D(y)(0)-1/40320)*x^7+(1/645120*D(y)(0)+1/1935360)*x^9+(-1/28385280*D(y)(0)-1/85155840)*x^1...

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

y(x) = 1+x^2+1/12*x^4-1/3*x

>    dsolve({ode,y(0)=1,D(y)(0)=-1/3},y(x));

y(x) = 1+x^2+1/12*x^4-1/3*x

>    rhs(%);

1+x^2+1/12*x^4-1/3*x

>    poly1:=convert(%,polynom);

poly1 := 1+x^2+1/12*x^4-1/3*x

>    with(plots):

Warning, the name changecoords has been redefined

>    SeriesSoln1:=plot(poly1,x=0..7,color=blue):

>    display(SeriesSoln1);

[Maple Plot]

Notice what a difference a little change in one of the initial conditions makes (although apparently not in the graph of the solution in this case).

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

y(x) = series(1-1/2*x+1*x^2-1/24*x^3+1/12*x^4-1/960*x^5+1/80640*x^7-1/3870720*x^9+1/170311680*x^11+O(x^12),x,12)

>    rhs(%);

series(1-1/2*x+1*x^2-1/24*x^3+1/12*x^4-1/960*x^5+1/80640*x^7-1/3870720*x^9+1/170311680*x^11+O(x^12),x,12)

>    poly2:=convert(%,polynom);

poly2 := 1-1/2*x+x^2-1/24*x^3+1/12*x^4-1/960*x^5+1/80640*x^7-1/3870720*x^9+1/170311680*x^11

>    SeriesSoln2:=plot(poly2,x=0..7,color=red):

>    display(SeriesSoln1,SeriesSoln2);

[Maple Plot]

>    dsolve({ode,y(0)=1,D(y)(0)=-1/2},y(x));

y(x) = 1+x^2+1/12*x^4-2*(12+12*x^2+x^4)*Int(1/(12+12*_z1^2+_z1^4)^2*exp(-1/4*_z1^2),_z1 = 0 .. x)-1/3*x

>   

>