seriessolutions.mws

>

MA 507

Chapter 4: Power Series Solutions

9 October 2000

Richard Hitt

Introduction

This worksheet serves as an introduction to using Maple to solve ODEs using power series methods.

Review of Power Series

Recall from calculus that a power series about x = a is a an infinite series of the form sum(a[n]*(x-a)^n,n = 0 .. infinity) . Such a series always converges when x = a . Typically, however, the series converges across an interval centered at x = a . A function f(x) can be represented by a power series about x = a if it has derivatives of all orders throughout a neighborhood of a , in which case f(x) = sum(f^n*a*(x-a)^n/n!,n = 0 .. infinity) .

>

Solving DEs with Power Series at an Ordinary Point

We can find analytic solutions to the DE diff(y(x),`$`(x,2))+p(x)*diff(y(x),x)+q(x)*y(x) = 0... by using a power series for y(x) expanded about any point x[0] at which the coefficient functions p(x) and q(x) are both analytic. Such a point x[0] is called an ordinary point. Maple can keep track of the bookkeeping for us as follows.

Exercise #7(h) on page 192

> dsolve(diff(y(x),x$2) + diff(y(x),x) + (1+x+x^2)*y(x) = 0, y(x), type=series);

y(x) = series(y(0)+D(y)(0)*x+(-1/2*D(y)(0)-1/2*y(0)...
y(x) = series(y(0)+D(y)(0)*x+(-1/2*D(y)(0)-1/2*y(0)...
y(x) = series(y(0)+D(y)(0)*x+(-1/2*D(y)(0)-1/2*y(0)...
y(x) = series(y(0)+D(y)(0)*x+(-1/2*D(y)(0)-1/2*y(0)...
y(x) = series(y(0)+D(y)(0)*x+(-1/2*D(y)(0)-1/2*y(0)...

We can find a solution to an initial value problem for this DE also.

> sol1:=dsolve({diff(y(x),x$2) + diff(y(x),x) + (1+x+x^2)*y(x) = 0, y(0)=0, D(y)(0)=1}, y(x), type=series);

sol1 := y(x) = series(1*x-1/2*x^2-1/24*x^4-1/60*x^5...
sol1 := y(x) = series(1*x-1/2*x^2-1/24*x^4-1/60*x^5...

Then to graph the solution we need to get rid of the error term at the end.

> plot(convert(rhs(sol1),polynom),x=-3.2..3);

[Maple Plot]

Airy's Equation

restart;

> ode1:= diff(y(x),x$2) - x*y(x)=0;

ode1 := diff(y(x),`$`(x,2))-x*y(x) = 0

> dsolve(ode1, y(x), type=series);

y(x) = series(y(0)+D(y)(0)*x+1/6*y(0)*x^3+1/12*D(y)...

To see additional terms in the series solution, do

> Order:=15;

Order := 15

> dsolve(ode1, y(x), type=series);

sol1 := y(x) = series(y(0)+D(y)(0)*x+1/6*y(0)*x^3+1...
sol1 := y(x) = series(y(0)+D(y)(0)*x+1/6*y(0)*x^3+1...

> sol1:=dsolve({ode1,y(0)=1,D(y)(0)=2},y(x),type=series);

sol1 := y(x) = series(1+2*x+1/6*x^3+1/6*x^4+1/180*x...

> plot(convert(rhs(sol1),polynom),x=0..1);

[Maple Plot]

>

Solving DEs with Power Series at a Regular Singular Point

A point x[0] is a singular point for the DE diff(y(x),`$`(x,2))+p(x)*diff(y(x),x)+q(x)*y(x) = 0... if p(x) or q(x) is not analytic there. If, however, (x-x[0])*p(x) and (x-x[0])^2*q(x) are both analytic, then x[0] is called a regular singular point (otherwise, its called an irregular singular point ). To simplify the notation, let's assume x[0] = 0 (if its not, a change of variable to z = x-x[0] will take care of it). Then the DE can be written as x^2*diff(y(x),`$`(x,2))+x^2*p(x)*diff(y(x),x)+x^2*q... by multiplying the original equation by x^2 . This equation can then be written in Cauchy-Euler form as x^2*diff(y(x),`$`(x,2))+x*p[0](x)*diff(y(x),x)+q[0]... where the coefficient functions p[0] and q[0] are analytic. So the Caucy-Euler equation has a solution of the form x^r for some real number r . This suggests we should look for a solution to the original differential equation not with a power series, but with a series of the form x^r*sum(a[n]*x^n,n = 0 .. infinity) . Keep in mind that r can be negative and/or fractional, so this series is not necessarily a power series. This is called the method of Frobenius .

When y(x) is replaced by the fractional power series and the resulting algebraic details are carried out and coefficients on both sides of the DE are equated, one obtains the indicial equation r^2+(p[0]-1)*r+q[0] = 0 where p[0] and q[0] are the constant terms in the power series expansions of the analytic functions x*p(x) and x^2*q(x) , respectively. The form of the DE solutions fall naturally into three cases depending on how the two roots of the indicial equation are related (see the text): distinct; repeated; differ by an integer. Fortunately, Maple knows how to handle the various cases. However, we still will only get partial sums of the series solutions computed by Maple. Issues of interval of convergence are still left for humans.

>

Example 3 on page 196.

> Order:=10:
frobde1:=
6*x^2*diff(y(x),x$2) + 7*x*diff(y(x),x) - (1-x^2)*y(x) = 0;
frobde1sol:=dsolve( frobde1 , y(x), type=series);

frobde1 := 6*x^2*diff(y(x),`$`(x,2))+7*x*diff(y(x),...

frobde1sol := y(x) = _C1*(series(1-1/14*x^2+1/1064*...
frobde1sol := y(x) = _C1*(series(1-1/14*x^2+1/1064*...

> frobde1polysol:=convert(rhs(frobde1sol),polynom);

frobde1polysol := _C1*(1-1/14*x^2+1/1064*x^4-1/1979...
frobde1polysol := _C1*(1-1/14*x^2+1/1064*x^4-1/1979...

> icfrobde1sol:=subs({_C1=1,_C2=2},frobde1polysol);

icfrobde1sol := (1-1/14*x^2+1/1064*x^4-1/197904*x^6...
icfrobde1sol := (1-1/14*x^2+1/1064*x^4-1/197904*x^6...

> plot(icfrobde1sol,x=.1..8);

[Maple Plot]

To see why we would want to use the method of Frobenius around a regular singular point rather than the power series method around an ordinary point, look at what happens if we base a power series solution at x = 1 . We can get Maple to do that by giving it some initial conditions at 1.

> Order:=12;
frobde1sol:=dsolve({frobde1, y(1)=1, D(y)(1)=-1}, y(x), type=series);

Order := 12

frobde1sol := y(x) = series(1-1*(x-1)+7/12*(x-1)^2-...
frobde1sol := y(x) = series(1-1*(x-1)+7/12*(x-1)^2-...
frobde1sol := y(x) = series(1-1*(x-1)+7/12*(x-1)^2-...

Then we can plot the Taylor polynomial

> plot(convert(rhs(frobde1sol),polynom), x=-.1..2.2);

[Maple Plot]

Explain why this graph is completely inaccurate around x = 0 . Why does this graph look so much different than the Frobenius solution around 0?

Legendre Functions

The differential equation (1-x^2)*diff(y(x),`$`(x,2))-2*x*diff(y(x),x)+lambda... is called Legender's equation . It arises in numerous applications, especially ones that involve boundary value problems on spheres.

We can use power series based at x = 0 to obtain solutions that are valid on the interval (-1,1). However, for certain values of lambda the series solutions so obtained have the property that the coefficients are eventually all 0 for one or the other of the linearly independent pair of basic solutions. This happens whenever 1+4*lambda is a perfect square (i.e., the square of an integer). The resulting solution is then a polynomial rather than a full power series. The table on page 213 of the text shows several Legendre polynomials.

Exercise: Work exercise 1 on page 216.

Exercise: Show that when lambda = n*(n+1) for n any positive integer, then 1+4*lambda is a perfect square. lambda

>

In Maple, we can solve the Legendre equation symbolically out to any desired order and substitute a[0] and a[1] into the solution in place of the default arbitrary constants used in Maple.

> sol:=dsolve((1-x^2)*diff(y(x),x$2)-2*x*diff(y(x),x)+lambda*y(x) = 0, y(x), type=series);

>

sol := y(x) = series(y(0)+D(y)(0)*x+(-1/2*lambda*y(...
sol := y(x) = series(y(0)+D(y)(0)*x+(-1/2*lambda*y(...

> subs({y(0)=a[0],D(y)(0)=a[1]},sol);

y(x) = series(a[0]+a[1]*x+(-1/2*lambda*a[0])*x^2+(1...

There is probably some clever way to gather together the even power terms and factor out the a[0] and likewise for the odd power terms so the solution looks more like to one in the book (equation (4) on page 212), but I don't know how to do it. Any ideas?

If we set lambda = n*(n+1) in Legendre's equation and solve using Maple, we get

> dsolve((1-x^2)*diff(y(x),x$2)-2*x*diff(y(x),x)+n*(n+1)*y(x) = 0, y(x));

y(x) = _C1*LegendreP(n,x)+_C2*LegendreQ(n,x)

We can graph some of these solutions. If n is an integer, they will be polynomials.

> plot({seq(LegendreP(n,x),n=1..5)},x=-1..1);

[Maple Plot]

If n is not an integer, we get an infinite series.

> plot({seq(LegendreP(n+.5,x),n=1..3)},x=-2..1);

[Maple Plot]

>

Notice that the polynomials and series are normalized to have a value of 1 when x = 1 .

Bessel Functions

The differential equation x^2*diff(y(x),`$`(x,2))+x*diff(y(x),x)+(x^2-nu^2)*y... where nu is a non-negative real number is known as Bessel's equation of order nu .

Exercise: Show that x = 0 is a regular singular point for Bessel's equation. (Hence, we can use the method of Frobenius to solve Bessel's equation).

Exercise: Work problem 1 on page 242.

The solution process of Bessel's equation naturally splits into two cases depending on whether nu is an integer or not. We won't go through the Frobenius method details, but will use Maple instead to explore the solutions.

For example, consider Bessel's equation of order 0 having initial conditions y(0) = 1 and D(y)(0) = 0 . diff(y(x),`$`(x,2))+diff(y(x),x)/x+y(x) = 0 . For large values of x , the solution to Bessel's equation can be compared to the solution of the corresponding DE with the middle term on the left side deleted.

Exercise: Explain the last statement. Solve Bessel's equation of order 0 with the given initial conditions and compare the solution with that of the simpler DE with the middle term deleted. Show the comparison graphically over a large interval, say from -50 to 50.