Javascript required
Skip to content Skip to sidebar Skip to footer

Find Two Linearly Independent Power Series Solutions

Lesson31.mw

  • Outline of Lesson 31
  • Initialization
  • 31.A Taylor Series Methods for Solving IVPs
  • 31.B Power Series Solutions
  • 31.C Ordinary and Singular Points
    • 31.C-1 Example 1: Polynomial Coefficients
    • 31.C-2 Example 2: Rational Coefficients
    • 31.C-3 Example 3: Legendre's Equation
  • 31.D Method of Frobenius
    • 31.D-1 Example 4: Two Real Roots with a Noninteger Difference
  • 31.E Legendre's Equation
  • 31.F Bessel's Equation

ORDINARY DIFFERENTIAL EQUATIONS POWERTOOL

Lesson 31 -- Power Series Solutions

Prof. Douglas B. Meade

Industrial Mathematics Institute

Department of Mathematics

University of South Carolina

Columbia, SC 29208

URL: http://www.math.sc.edu/~meade/

E-mail: meade@math.sc.edu

Copyright  2001  by Douglas B. Meade

All rights reserved

-------------------------------------------------------------------

Outline of Lesson 31

31.A Taylor Series Methods for Solving IVPs

31.B Power Series Solutions

31.C Ordinary and Singular Points

31.C-1 Example 1: Polynomial Coefficients

31.C-2 Example 2: Rational Coefficients

31.C-3 Example 3: Legendre's Equation

31.D Method of Frobenius

31.D-1 Example 4: Two Real Roots with a Noninteger Difference

31.E Legendre's Equation

31.F Bessel's Equation

Initialization

Warning, the name changecoords has been redefined

31.A Taylor Series Methods for Solving IVPs

Consider the initial value problem

> ode1 := (x+y(x)+1) * diff( y(x), x ) = 1;

ode1 := (x+y(x)+1)*(diff(y(x), x)) = 1

ic1 := y(0) = 1

If the solution of this IVP has a Taylor series expansion at the initial point, x = 0 , then the Taylor polynomials generated from this solution are approximations of the solution. For example, the formal quintic Taylor polynomial for the function y(x) is

> form1 := y(x) = convert( series( y(x), x=0 ), polynom );

form1 := y(x) = y(0)+D(y)(0)*x+1/2*`@@`(D, 2)(y)(0)*x^2+1/6*`@@`(D, 3)(y)(0)*x^3+1/24*`@@`(D, 4)(y)(0)*x^4+1/120*`@@`(D, 5)(y)(0)*x^5

To completely determine this polynomial, it is necessary to compute the numbers y(0) , eval(diff(y(x), x), x = 0) , `...` , eval(diff(y(x), `$`(x, 5)), x = 0) .

If y(x) is to be the solution of the IVP, then the first number to compute is simply the initial condition,

Dy0[0] := y(0) = 1

The second number can be obtained by substituting the initial condition into the differential equation, and solving for `y'`(0) , which is thereby found to be

> Dode1[0] := simplify( convert( ode1, D ) );
> Dy0[1] := isolate( subs( x=0, ic1, Dode1[0] ), D(y)(0) );

Dode1[0] := (x+y(x)+1)*D(y)(x) = 1

Dy0[1] := D(y)(0) = 1/2

To compute the value of eval(diff(y(x), `$`(x, 2)), x = 0) , differentiate the ODE with respect to x and substitute x = 0 and the values already computed for the lower-order derivatives to obtain

> Dode1[1] := simplify( convert( diff( ode1, x ), D ) ):
> Dy0[2]   := isolate( subs( x=0, Dy0[i] $ i=0..1, Dode1[1] ), (D@@2)(y)(0) );

Dy0[2] := `@@`(D, 2)(y)(0) = (-3)/8

This process can be continued to determine the value of the remaining derivatives of the solution at the initial point.  The result is

> Dode1[n] := simplify( convert( diff( ode1, x$n ), D ) );
> Dy0[n+1] := isolate( subs( x=0, Dy0[i] $ i=0..n, Dode1[n] ), (D@@(n+1))(y)(0) );
> print( Dy0[n] $ n=0..N );

y(0) = 1, D(y)(0) = 1/2, `@@`(D, 2)(y)(0) = (-3)/8, `@@`(D, 3)(y)(0) = 21/32, `@@`(D, 4)(y)(0) = (-237)/128, `@@`(D, 5)(y)(0) = 3711/512

The approximate solution obtained by this method is

> sol1 := eval( form1, [ Dy0[i] $ i=0..N ] );

sol1 := y(x) = 1+1/2*x-3/16*x^2+7/64*x^3-79/1024*x^4+1237/20480*x^5

The same solution can be obtained directly from Maple when type=series is included in the argument list for dsolve .  The result is

> infolevel[dsolve] := 3:
> sol1a := dsolve( { ode1, ic1 }, y(x), type=series );
> infolevel[dsolve] := 0:

`DEtools/convertsys:`, `converted to first-order system Y'(x) = f(x,Y(x)\
)`, `   namely (with Y' represented by YP)`

[YP[1] = 1/(x+Y[1]+1)]

`DEtools/convertsys:`, `correspondence between Y[i] names and original f\
unctions:`

[Y[1] = y(x)]

`dsolve/series/ordinary:`, `converted to first-order system Y'(x) = f(x,\
Y(x))`, `   namely (with Y' represented by YP)`

[YP[1] = 1/(x+Y[1]+1)]

`dsolve/series/ordinary:`, `correspondence between Y[i] names and origin\
al functions:`

[Y[1] = y(x)]

`dsolve/series/ordinary:`, `vector Y of initial conditions at x0 =`, 0, \
[1]

`dsolve/series/ordinary:`, `trying Newton iteration`

`dsolve/series/sysol:`, `latest approx is`, table( [( 1 ) = 1+1/2*x ] )

`dsolve/series/sysol:`, `latest approx is`, table( [( 1 ) = 1+1/2*x-3/16\

*x^2+7/64*x^3 ] )

`dsolve/series/sysol:`, `latest approx is`, table( [( 1 ) = 1+1/2*x-3/16\

*x^2+7/64*x^3-79/1024*x^4+1237/20480*x^5-24817/491520*x^6 ] )

sol1a := y(x) = (series(1+1/2*x-3/16*x^2+7/64*x^3-79/1024*x^4+1237/20480*x^5+O(x^6),x,6))

Note the presence of the "order" term in solution. This indicates that the result is an approximation. To plot this solution it is necessary to eliminate the order term; the simplest way to do this is to convert the expression to the polynomial

> sol1b := convert( sol1a, polynom );

sol1b := y(x) = 1+1/2*x-3/16*x^2+7/64*x^3-79/1024*x^4+1237/20480*x^5

The degree of Maple's series solution is determined by the value of the global variable Order . Thus, the ninth-degree Taylor polynomial approximate solution to this IVP can be obtained with

> convert( dsolve( { ode1, ic1 }, y(x), type=series ), polynom );

y(x) = 1+1/2*x-3/16*x^2+7/64*x^3-79/1024*x^4+1237/20480*x^5-24817/491520*x^6+607519/13762560*x^7-17560063/440401920*x^8+83618587/2264924160*x^9

Note that this method extends to IVPs for higher-order differential equations provided it is possible to express the highest order derivative as a differentiable function of the lower order derivatives of the unknown function (and the independent variable). For example, an 11th-degree polynomial approximation for the solution of the second-order IVP

> ode2 := ( x^2 + 1 ) * diff( y(x), x$2 ) + x * diff( y(x), x ) + y(x) = 0;
ic2 := y(0)=1, D(y)(0)=-1;

ode2 := (x^2+1)*(diff(y(x), `$`(x, 2)))+x*(diff(y(x), x))+y(x) = 0

ic2 := y(0) = 1, D(y)(0) = -1

can be obtained with the Maple commands

> sol2 := convert( dsolve( { ode2, ic2 }, y(x), type=series ), polynom );

sol2 := y(x) = 1-x-1/2*x^2+1/3*x^3+5/24*x^4-1/6*x^5-17/144*x^6+13/126*x^7+629/8064*x^8-325/4536*x^9-8177/145152*x^10+2665/49896*x^11

The computation of Taylor series expansions is typically limited by the complexity and tedium of computing and manipulating the derivatives of the ODE. A tool such as Maple is very helpful in this regard, but other methods can be more effective in many situations.

31.B Power Series Solutions

Another problem with the Taylor polynomials is that they are approximate solutions. The exact solution (represented by the complete infinite power series), can be obtained only when a general pattern for the coefficients in the expansion can be determined. This general pattern to the coefficients can often be found directly by substituting a general power series into the ODE.  This is particularly true of linear ODEs.

Consider the problem of finding the general solution to the first-order (linear) ODE

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

ode3 := (diff(y(x), x))-2*y(x) = 0

The general form of a power series solution, based at the origin, is

> form3 := y(x) = Sum( a(k)*x^k, k=0..infinity );

form3 := y(x) = Sum(a(k)*x^k, k = 0 .. infinity)

When this solution is substituted into the ODE and simplified, the result is :

> q1 := eval( ode3, form3 );

q1 := (Sum(a(k)*x^k*k/x, k = 0 .. infinity))-2*(Sum(a(k)*x^k, k = 0 .. infinity)) = 0

or even

q2 := Sum(x^(k-1)*k*a(k)-2*a(k)*x^k, k = 0 .. infinity) = 0

While Maple is not quite up to manipulating infinite power series to find the general relation between the coefficients, a little insight and skill can be used to obtain this information. Because this differential equation is first order and, as seen above, only consecutive pairs of coefficients are related, it suffices to insert the general three-term sum

> tform3 := y(x) = Sum( a(n)*x^n, n=k-1..k+1 );

tform3 := y(x) = Sum(a(n)*x^n, n = k-1 .. k+1)

into the ODE and manipulate the expression to obtain

> q1 := eval( ode3, tform3 );

q1 := (Sum(a(n)*x^n*n/x, n = k-1 .. k+1))-2*(Sum(a(n)*x^n, n = k-1 .. k+1)) = 0

or even

> q2 := simplify( combine( value( q1 ), power ) );

q2 := x^(k-2)*a(k-1)*k-x^(k-2)*a(k-1)+x^(k-1)*k*a(k)+x^k*a(k+1)*k+x^k*a(k+1)-2*a(k-1)*x^(k-1)-2*a(k)*x^k-2*a(k+1)*x^(k+1) = 0

The recurrence equation between the coefficients can now be found to be

> recur_eqn3 := map( coeff, q2, x^k );

recur_eqn3 := a(k+1)*k+a(k+1)-2*a(k) = 0

The (general) solution to this recurrence equation can be found with Maple's rsolve command, and it is

> recur_sol3 := rsolve( recur_eqn3, {a} );

recur_sol3 := {a(k) = 2^k*a(0)/GAMMA(k+1)}

The general power series solution to the ODE is

> sol3 := subs( recur_sol3, form3 );

sol3 := y(x) = Sum(2^k*a(0)*x^k/GAMMA(k+1), k = 0 .. infinity)

To express the Gamma function, GAMMA , in terms of factorials , use

> convert( sol3, factorial );

y(x) = Sum(2^k*a(0)*x^k/factorial(k), k = 0 .. infinity)

Because of the simplicity of this example, it is possible to identify the function with this power series:

y(x) = a(0)*exp(2*x)

The constant a(0) takes the place of the integration constant in the other solution methods. Note that y(0) = a(0) . With this insight, this result is seen to be equivalent to the explicit solution found using dsolve .  This solution is

y(x) = _C1*exp(2*x)

There are many examples for which rsolve will not be able to solve the recurrence relation. In that case, it will be necessary to construct a finite set of explicit equations and solve for the first few coefficients. For example, the first few equations generated by the recurrence relation in this example are

> recur_sol3t := solve( { recur_eqn3 $ k=0..5 }, { a(k) $ k=1..6 } );

recur_sol3t := {a(1) = 2*a(0), a(2) = 2*a(0), a(3) = 4/3*a(0), a(4) = 2/3*a(0), a(5) = 4/15*a(0), a(6) = 4/45*a(0)}

Their solution is found to generate the polynomial

> collect( eval( value(subs(infinity=6,form3)), recur_sol3t ), a(0) );

y(x) = (1+2*x+2*x^2+4/3*x^3+2/3*x^4+4/15*x^5+4/45*x^6)*a(0)

31.C Ordinary and Singular Points

Consider the homogeneous second-order linear ODE in normalized form, namely,

> ode4 := diff( y(x), x$2 ) + PP(x) * diff( y(x), x ) + Q(x) * y(x) = 0;

ode4 := (diff(y(x), `$`(x, 2)))+PP(x)*(diff(y(x), x))+Q(x)*y(x) = 0

(Note that the orthopoly package uses the name P for the Legendre polynomials; hence the use of the name PP for the coefficient in the ODE.)

If the initial conditions given at x[0] are

> ic4 := y(x0) = y0, D(y)(x0) = y1;

ic4 := y(x0) = y0, D(y)(x0) = y1

then a power series solution based at the point x[0] would be of the form

> form4 := Sum( a(k) * ( x - x0 )^k, k=0..infinity );

form4 := Sum(a(k)*(x-x0)^k, k = 0 .. infinity)

The point x[0] is called an ordinary point of the ODE if the functions P(x) and Q(x) can be expressed as power series based at x[0] , i.e. , P(x) and Q(x) are real analytic at x[0] . If at least one of P(x) and Q(x) is not real analytic at x[0] , then x[0] is called a singular point of the ODE. A singular point is called a regular singular point (RSP) if (x-x0)*P(x) and (x-x0)^2*Q(x) are real analytic at x[0] , otherwise x[0] is an irregular singular point (ISP).

31.C-1 Example 1: Polynomial Coefficients

When the coefficient functions are polynomials, e.g. ,

> coeff1 := { PP(x) = 1 - x^3, Q(x) = x^2 };

coeff1 := {PP(x) = 1-x^3, Q(x) = x^2}

so the ODE becomes

(diff(y(x), `$`(x, 2)))+(1-x^3)*(diff(y(x), x))+x^2*y(x) = 0

all points x[0] are ordinary points.

31.C-2 Example 2: Rational Coefficients

When the coefficient functions are rational functions, e.g. ,

> coeff2 := { PP(x) = 2/(1 - x)^2, Q(x) = x^(-2)/(x-2) };

coeff2 := {PP(x) = 2/(1-x)^2, Q(x) = 1/(x^2*(x-2))}

then the ODE becomes

(diff(y(x), `$`(x, 2)))+2*(diff(y(x), x))/(1-x)^2+y(x)/(x^2*(x-2)) = 0

and all discontinuities of P(x) or of Q(x) are singular points.  Maple finds these singular points to be

> singpts := `union`(op( map( c -> discont( rhs( c ), x ), coeff2 ) ));

singpts := {0, 1, 2}

To decide if the singular points are regular or irregular, the definition can be applied or Maple's regularsp command (from the DEtools package) can be used.  This latter approach results in

> regularsp( eval( ode4, coeff2 ), y(x) );

[0, 2, infinity]

and so x[0] = 1 must be an irregular singular point.

31.C-3 Example 3: Legendre's Equation

Legendre's equation of order p is

> ode5 := ( 1 - x^2 ) * diff( y(x), x$2 ) - 2*x * diff( y(x), x ) + p*(p+1) * y(x) = 0;

ode5 := (1-x^2)*(diff(y(x), `$`(x, 2)))-2*x*(diff(y(x), x))+p*(p+1)*y(x) = 0

where p is a nonnegative constant. Written in normalized form, the coefficients P(x) and Q(x) are

> q4 := eval( lhs(ode5), [ diff( y(x), x$2 ) = d2y, diff( y(x), x ) = dy, y(x)=y ] ):
> coeff3 := { PP(x) = coeff( q4, dy )/coeff( q4, d2y ), Q(x) = coeff( q4, y )/coeff( q4, d2y ) };

coeff3 := {Q(x) = p*(p+1)/(1-x^2), PP(x) = -2*x/(1-x^2)}

The singular points are

> singpts := `union`(op( map( c -> discont( rhs( c ), x ), coeff3 ) ));

singpts := {-1, 1}

and both of these points are regular singular points, as deduced by

> regularsp( ode5, y(x) );

[-1, 1, infinity]

31.D Method of Frobenius

The method for finding a power series solution presented in Lesson 31, Section B can be applied at any ordinary point of an ODE. The Method of Frobenius is guaranteed to find at least one nontrivial solution in a neighborhood of a regular singular point. When the Method of Frobenius does not produce a second solution, reduction of order can be used (see Lesson 27 ). For an irregular singular point, the Method of Frobenius can be tried but may not produce a solution in all cases.

The Method of Frobenius produces solutions of the form

> form5 := y(x) = Sum( a(k) * (x-x0)^(k+r), k=0..infinity );

form5 := y(x) = Sum(a(k)*(x-x0)^(k+r), k = 0 .. infinity)

When r is a nonnegative integer, the Frobenius solution is a power series, but r does not have to be an integer -- it can be a negative real number or even a complex number. When a Frobenius solution is inserted into the ODE, the condition for the vanishing of the lowest order term is a quadratic polynomial in r . The general form of the indicial equation is

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 p(x) = x*P(x) and q(x) = x^2*Q(x) , respectively.

The full Method of Frobenius is long and exceedingly complicated. In the remainder of this worksheet the basic ideas will be explored in a number of examples.

31.D-1 Example 4: Two Real Roots with a Noninteger Difference

Consider the ODE

> ode6 := 2*x*(1+x) * diff( y(x), x$2 ) + (3+x) * diff( y(x), x ) - x * y(x) = 0;

ode6 := 2*x*(x+1)*(diff(y(x), `$`(x, 2)))+(3+x)*(diff(y(x), x))-x*y(x) = 0

The regular singular points for this problem are

> regularsp( ode6, y(x) );

[-1, 0]

The indicial equation at the regular singular point x[0] = 0 is

> ie1 := indicialeq( ode6, x, 0, y(x) );

ie1 := x^2+1/2*x = 0

The indicial roots are

> ir1 := solve( ie1, x );

ir1 := 0, (-1)/2

Because these roots do not differ by an integer, each indicial root should lead to a nontrivial Frobenius solution.  The forms of these two solutions would be

> formF := y(x) = Sum( c(k) * x^(k+r), k=0..infinity ):
> formF1 := eval( formF, [ c=a, r=max(ir1) ] );
> formF2 := eval( formF, [ c=b, r=min(ir1) ] );

formF1 := y(x) = Sum(a(k)*x^k, k = 0 .. infinity)

formF2 := y(x) = Sum(b(k)*x^(k-1/2), k = 0 .. infinity)

To obtain the recurrence relations for the coefficients in the two solutions, work with truncated versions of the solutions, namely,

> tformF1 := eval( y(x) = Sum( a(m) * x^(m+r), m=k-2..k+2 ), r=max(ir1) );
> tformF2 := eval( y(x) = Sum( b(m) * x^(m+r), m=k-2..k+2 ), r=min(ir1) );

tformF1 := y(x) = Sum(a(m)*x^m, m = k-2 .. k+2)

tformF2 := y(x) = Sum(b(m)*x^(m-1/2), m = k-2 .. k+2)

Substitution into the ODE leads to the equations

> q51 := simplify( combine( value( eval( ode6, tformF1 ) ), power ) );
> q52 := simplify( combine( value( eval( ode6, tformF2 ) ), power ) );

q51 := -7*x^(k-3)*a(k-2)*k+x^(k-1)*k*a(k)+3*x^k*a(k+1)+x^(k-2)*a(k-1)+3*x^(k+1)*a(k+1)*k+3*a(k-1)*x^(k-1)+a(k+1)*x^(k+1)-3*x^(k-2)*a(k-1)*k+5*x^k*a(k+1)*k+10*a(k-2)*x^(k-2)+6*a(k+2)*x^(k+2)+6*x^(k-3)*... q51 := -7*x^(k-3)*a(k-2)*k+x^(k-1)*k*a(k)+3*x^k*a(k+1)+x^(k-2)*a(k-1)+3*x^(k+1)*a(k+1)*k+3*a(k-1)*x^(k-1)+a(k+1)*x^(k+1)-3*x^(k-2)*a(k-1)*k+5*x^k*a(k+1)*k+10*a(k-2)*x^(k-2)+6*a(k+2)*x^(k+2)+6*x^(k-3)*... q51 := -7*x^(k-3)*a(k-2)*k+x^(k-1)*k*a(k)+3*x^k*a(k+1)+x^(k-2)*a(k-1)+3*x^(k+1)*a(k+1)*k+3*a(k-1)*x^(k-1)+a(k+1)*x^(k+1)-3*x^(k-2)*a(k-1)*k+5*x^k*a(k+1)*k+10*a(k-2)*x^(k-2)+6*a(k+2)*x^(k+2)+6*x^(k-3)*... q51 := -7*x^(k-3)*a(k-2)*k+x^(k-1)*k*a(k)+3*x^k*a(k+1)+x^(k-2)*a(k-1)+3*x^(k+1)*a(k+1)*k+3*a(k-1)*x^(k-1)+a(k+1)*x^(k+1)-3*x^(k-2)*a(k-1)*k+5*x^k*a(k+1)*k+10*a(k-2)*x^(k-2)+6*a(k+2)*x^(k+2)+6*x^(k-3)*...

q52 := 10*x^(-7/2+k)*b(k-2)+3*x^(-5/2+k)*b(k-1)+2*x^(1/2+k)*b(k+1)*k^2+2*x^(-7/2+k)*b(k-2)*k^2+2*x^(3/2+k)*b(k+2)*k^2+6*x^(1/2+k)*b(k+2)+6*b(k-1)*x^(-3/2+k)+15*b(k-2)*x^(-5/2+k)+3*b(k+2)*x^(3/2+k)+2*x... q52 := 10*x^(-7/2+k)*b(k-2)+3*x^(-5/2+k)*b(k-1)+2*x^(1/2+k)*b(k+1)*k^2+2*x^(-7/2+k)*b(k-2)*k^2+2*x^(3/2+k)*b(k+2)*k^2+6*x^(1/2+k)*b(k+2)+6*b(k-1)*x^(-3/2+k)+15*b(k-2)*x^(-5/2+k)+3*b(k+2)*x^(3/2+k)+2*x... q52 := 10*x^(-7/2+k)*b(k-2)+3*x^(-5/2+k)*b(k-1)+2*x^(1/2+k)*b(k+1)*k^2+2*x^(-7/2+k)*b(k-2)*k^2+2*x^(3/2+k)*b(k+2)*k^2+6*x^(1/2+k)*b(k+2)+6*b(k-1)*x^(-3/2+k)+15*b(k-2)*x^(-5/2+k)+3*b(k+2)*x^(3/2+k)+2*x... q52 := 10*x^(-7/2+k)*b(k-2)+3*x^(-5/2+k)*b(k-1)+2*x^(1/2+k)*b(k+1)*k^2+2*x^(-7/2+k)*b(k-2)*k^2+2*x^(3/2+k)*b(k+2)*k^2+6*x^(1/2+k)*b(k+2)+6*b(k-1)*x^(-3/2+k)+15*b(k-2)*x^(-5/2+k)+3*b(k+2)*x^(3/2+k)+2*x...

from which are extracted the recurrence relations

> reqn1 := collect( map( coeff, q51, eval( x^(k+r), r=max(ir1) ) ),
> [ a(k+i) $ i=-3..3 ] );
> reqn2 := collect( map( coeff, q52, eval( x^(k+r), r=min(ir1) ) ),
> [ b(k+i) $ i=-3..3 ] );

reqn1 := -a(k-1)+(-k+2*k^2)*a(k)+(3+5*k+2*k^2)*a(k+1) = 0

reqn2 := -b(k-1)+(2*k^2+1-3*k)*b(k)+(3*k+1+2*k^2)*b(k+1) = 0

While these recurrence relations cannot be solved explicitly by Maple, as verified by the attempts

rsolve(-a(k-1)+(-k+2*k^2)*a(k)+(3+5*k+2*k^2)*a(k+1) = 0, {a})

rsolve(-b(k-1)+(2*k^2+1-3*k)*b(k)+(3*k+1+2*k^2)*b(k+1) = 0, {b})

the first few terms are easily computed from

> q61 := isolate( reqn1, a(k+1) );
> q62 := isolate( reqn2, b(k+1) );

q61 := a(k+1) = (a(k-1)-(-k+2*k^2)*a(k))/(3+5*k+2*k^2)

q62 := b(k+1) = (b(k-1)-(2*k^2+1-3*k)*b(k))/(3*k+1+2*k^2)

and are found to be

> assign( { q61, q62} );
> print( 'a'(k+1) = a(k+1), 'b'(k+1) = b(k+1) );

a(2) = 1/10*a(0)-1/10*a(1), b(2) = 1/6*b(0)

a(3) = 8/105*a(1)-1/35*a(0), b(3) = 1/15*b(1)-1/30*b(0)

a(4) = 37/2520*a(0)-29/840*a(1), b(4) = 1/56*b(0)-1/42*b(1)

a(5) = 73/3850*a(1)-277/34650*a(0), b(5) = 17/1350*b(1)-49/5400*b(0)

a(6) = 10379/2162160*a(0)-631/55440*a(1), b(6) = 1447/277200*b(0)-167/23100*b(1)

a(7) = 5083/693000*a(1)-27869/9009000*a(0), b(7) = 7753/1719900*b(1)-22391/6879600*b(0)

a(8) = 15475949/7351344000*a(0)-313627/62832000*a(1), b(8) = 55859/25872000*b(0)-174073/58212000*b(1)

a(9) = 14286037/4029102000*a(1)-196309/131274000*a(0), b(9) = 48204193/23156733600*b(1)-139215971/92626934400*b(0)

and so the (approximate) solutions to the ODE are

> q71 := value( subs( infinity=9, formF1 ) );
> q72 := value( subs( infinity=9, formF2 ) );

q71 := y(x) = a(0)+a(1)*x+(1/10*a(0)-1/10*a(1))*x^2+(8/105*a(1)-1/35*a(0))*x^3+(37/2520*a(0)-29/840*a(1))*x^4+(73/3850*a(1)-277/34650*a(0))*x^5+(10379/2162160*a(0)-631/55440*a(1))*x^6+(5083/693000*a(1... q71 := y(x) = a(0)+a(1)*x+(1/10*a(0)-1/10*a(1))*x^2+(8/105*a(1)-1/35*a(0))*x^3+(37/2520*a(0)-29/840*a(1))*x^4+(73/3850*a(1)-277/34650*a(0))*x^5+(10379/2162160*a(0)-631/55440*a(1))*x^6+(5083/693000*a(1...

q72 := y(x) = b(0)/x^(1/2)+b(1)*x^(1/2)+1/6*b(0)*x^(3/2)+(1/15*b(1)-1/30*b(0))*x^(5/2)+(1/56*b(0)-1/42*b(1))*x^(7/2)+(17/1350*b(1)-49/5400*b(0))*x^(9/2)+(1447/277200*b(0)-167/23100*b(1))*x^(11/2)+(775... q72 := y(x) = b(0)/x^(1/2)+b(1)*x^(1/2)+1/6*b(0)*x^(3/2)+(1/15*b(1)-1/30*b(0))*x^(5/2)+(1/56*b(0)-1/42*b(1))*x^(7/2)+(17/1350*b(1)-49/5400*b(0))*x^(9/2)+(1447/277200*b(0)-167/23100*b(1))*x^(11/2)+(775...

or even

> sol61 := sort( collect( q71, [ a(0), a(1) ] ) );
> sol62 := sort( collect( q72, [ b(0), b(1) ] ) );

sol61 := y(x) = (-196309/131274000*x^9+15475949/7351344000*x^8-27869/9009000*x^7+10379/2162160*x^6-277/34650*x^5+37/2520*x^4-1/35*x^3+1/10*x^2+1)*a(0)+(14286037/4029102000*x^9-313627/62832000*x^8+5083... sol61 := y(x) = (-196309/131274000*x^9+15475949/7351344000*x^8-27869/9009000*x^7+10379/2162160*x^6-277/34650*x^5+37/2520*x^4-1/35*x^3+1/10*x^2+1)*a(0)+(14286037/4029102000*x^9-313627/62832000*x^8+5083...

sol62 := y(x) = (-139215971/92626934400*x^(17/2)+55859/25872000*x^(15/2)-22391/6879600*x^(13/2)+1447/277200*x^(11/2)-49/5400*x^(9/2)+1/56*x^(7/2)-1/30*x^(5/2)+1/6*x^(3/2)+1/x^(1/2))*b(0)+(48204193/231... sol62 := y(x) = (-139215971/92626934400*x^(17/2)+55859/25872000*x^(15/2)-22391/6879600*x^(13/2)+1447/277200*x^(11/2)-49/5400*x^(9/2)+1/56*x^(7/2)-1/30*x^(5/2)+1/6*x^(3/2)+1/x^(1/2))*b(0)+(48204193/231...

To conclude, compare this solution to the series solution obtained by dsolve with type=series , namely,

> sol6 := dsolve( ode6, y(x), type=series );

sol6 := y(x) = _C1*(series(1-x+1/6*x^2-1/10*x^3+1/24*x^4-13/600*x^5+493/39600*x^6-2543/327600*x^7+171289/33264000*x^8-1756787/490089600*x^9+O(x^10),x,10))/x^(1/2)+_C2*(series(1+1/10*x^2-1/35*x^3+37/25... sol6 := y(x) = _C1*(series(1-x+1/6*x^2-1/10*x^3+1/24*x^4-13/600*x^5+493/39600*x^6-2543/327600*x^7+171289/33264000*x^8-1756787/490089600*x^9+O(x^10),x,10))/x^(1/2)+_C2*(series(1+1/10*x^2-1/35*x^3+37/25...

To see the equivalence of these solutions,  observe that the sum of the two linearly independent solutions obtained from the Method of Frobenius, namely,

> q8 := rhs(sol61) + rhs(sol62) = convert( rhs(sol6), polynom );

q8 := (-196309/131274000*x^9+15475949/7351344000*x^8-27869/9009000*x^7+10379/2162160*x^6-277/34650*x^5+37/2520*x^4-1/35*x^3+1/10*x^2+1)*a(0)+(14286037/4029102000*x^9-313627/62832000*x^8+5083/693000*x^... q8 := (-196309/131274000*x^9+15475949/7351344000*x^8-27869/9009000*x^7+10379/2162160*x^6-277/34650*x^5+37/2520*x^4-1/35*x^3+1/10*x^2+1)*a(0)+(14286037/4029102000*x^9-313627/62832000*x^8+5083/693000*x^... q8 := (-196309/131274000*x^9+15475949/7351344000*x^8-27869/9009000*x^7+10379/2162160*x^6-277/34650*x^5+37/2520*x^4-1/35*x^3+1/10*x^2+1)*a(0)+(14286037/4029102000*x^9-313627/62832000*x^8+5083/693000*x^... q8 := (-196309/131274000*x^9+15475949/7351344000*x^8-27869/9009000*x^7+10379/2162160*x^6-277/34650*x^5+37/2520*x^4-1/35*x^3+1/10*x^2+1)*a(0)+(14286037/4029102000*x^9-313627/62832000*x^8+5083/693000*x^... q8 := (-196309/131274000*x^9+15475949/7351344000*x^8-27869/9009000*x^7+10379/2162160*x^6-277/34650*x^5+37/2520*x^4-1/35*x^3+1/10*x^2+1)*a(0)+(14286037/4029102000*x^9-313627/62832000*x^8+5083/693000*x^... q8 := (-196309/131274000*x^9+15475949/7351344000*x^8-27869/9009000*x^7+10379/2162160*x^6-277/34650*x^5+37/2520*x^4-1/35*x^3+1/10*x^2+1)*a(0)+(14286037/4029102000*x^9-313627/62832000*x^8+5083/693000*x^...

agrees with the dsolve solution for a specific choice of a(0) , a(1) , b(0) , and b(1) , as seen via

> solve( identity(q8,x), {a(0),a(1),b(0),b(1)} );

{a(0) = _C2, a(1) = 0, b(0) = _C1, b(1) = -_C1}

31.E Legendre's Equation

Recall, from Section 31.C-3 , that

(1-x^2)*(diff(y(x), `$`(x, 2)))-2*x*(diff(y(x), x))+p*(p+1)*y(x) = 0

Legendre's equation of order p (a nonnegative constant), has two regular singular points in the finite plane, as shown by

> regularsp( ode5, y(x) );

[-1, 1, infinity]

Because x[0] = 0 , is an ordinary point, there should be no trouble finding the general solution in the form of the power series

> form5 := y(x) = Sum( a(k) * x^k, k=0..infinity );

form5 := y(x) = Sum(a(k)*x^k, k = 0 .. infinity)

constructed at x = 0 .

To obtain the recurrence relation for the coefficients in this solution, work with the truncated version of the solution

> tform5 := y(x) = Sum( a(m) * x^m, m=k-2..k+2 );

tform5 := y(x) = Sum(a(m)*x^m, m = k-2 .. k+2)

Substitution into the ODE yields

> q9 := simplify( combine( value( eval( ode5, tform5 ) ), power ) );

q9 := -3*x^(k+1)*a(k+1)*k-2*a(k+1)*x^(k+1)+6*x^(k-4)*a(k-2)+2*x^(k-3)*a(k-1)+2*a(k+2)*x^k+a(k+2)*x^k*k^2+3*a(k+2)*x^k*k+x^(k-1)*a(k+1)*k^2+x^(k-1)*a(k+1)*k+x^(k-3)*a(k-1)*k^2-3*x^(k-3)*a(k-1)*k+x^(k-4... q9 := -3*x^(k+1)*a(k+1)*k-2*a(k+1)*x^(k+1)+6*x^(k-4)*a(k-2)+2*x^(k-3)*a(k-1)+2*a(k+2)*x^k+a(k+2)*x^k*k^2+3*a(k+2)*x^k*k+x^(k-1)*a(k+1)*k^2+x^(k-1)*a(k+1)*k+x^(k-3)*a(k-1)*k^2-3*x^(k-3)*a(k-1)*k+x^(k-4... q9 := -3*x^(k+1)*a(k+1)*k-2*a(k+1)*x^(k+1)+6*x^(k-4)*a(k-2)+2*x^(k-3)*a(k-1)+2*a(k+2)*x^k+a(k+2)*x^k*k^2+3*a(k+2)*x^k*k+x^(k-1)*a(k+1)*k^2+x^(k-1)*a(k+1)*k+x^(k-3)*a(k-1)*k^2-3*x^(k-3)*a(k-1)*k+x^(k-4... q9 := -3*x^(k+1)*a(k+1)*k-2*a(k+1)*x^(k+1)+6*x^(k-4)*a(k-2)+2*x^(k-3)*a(k-1)+2*a(k+2)*x^k+a(k+2)*x^k*k^2+3*a(k+2)*x^k*k+x^(k-1)*a(k+1)*k^2+x^(k-1)*a(k+1)*k+x^(k-3)*a(k-1)*k^2-3*x^(k-3)*a(k-1)*k+x^(k-4...

so the recurrence relation is

> reqn3 := collect( map( coeff, q9, x^k ), [ a(k+i) $ i=-3..3 ] );

reqn3 := (p-k^2-k+p^2)*a(k)+(k^2+3*k+2)*a(k+2) = 0

Maple can now solve this recurrence relation, finding

> ak := rsolve( reqn3, {a} );

ak := PIECEWISE([4^(1/2*k)*GAMMA(1/2*k+1/2*p+1/2)*GAMMA(1/2*k-1/2*p)*a(0)/(GAMMA(k+1)*GAMMA(1/2*p+1/2)*GAMMA(-1/2*p)), k::even], [4^(1/2*k-1/2)*GAMMA(1/2*k+1/2*p+1/2)*GAMMA(1/2*k-1/2*p)*a(1)/(GAMMA(k+...

and so two independent (approximate) solutions to the ODE are

> sol1 := collect(simplify(convert(add(ak*x^k,k=[0,2,4,6,8]),factorial)),x,factor);
sol2 := collect(simplify(convert(add(ak*x^k,k=[1,3,5,7,9]),factorial)),x,factor);

sol1 := 1/40320*p*a(0)*(p-2)*(p-4)*(p-6)*(p+7)*(p+5)*(p+3)*(p+1)*x^8-1/720*p*a(0)*(p-2)*(p-4)*(p+5)*(p+3)*(p+1)*x^6+1/24*p*a(0)*(p-2)*(p+3)*(p+1)*x^4-1/2*p*a(0)*(p+1)*x^2+a(0)

sol2 := 1/362880*a(1)*(p-1)*(p-3)*(p-5)*(p-7)*(p+8)*(p+6)*(p+4)*(p+2)*x^9-1/5040*a(1)*(p-1)*(p-3)*(p-5)*(p+6)*(p+4)*(p+2)*x^7+1/120*a(1)*(p-1)*(p-3)*(p+4)*(p+2)*x^5-1/6*a(1)*(p+2)*(p-1)*x^3+a(1)*x sol2 := 1/362880*a(1)*(p-1)*(p-3)*(p-5)*(p-7)*(p+8)*(p+6)*(p+4)*(p+2)*x^9-1/5040*a(1)*(p-1)*(p-3)*(p-5)*(p+6)*(p+4)*(p+2)*x^7+1/120*a(1)*(p-1)*(p-3)*(p+4)*(p+2)*x^5-1/6*a(1)*(p+2)*(p-1)*x^3+a(1)*x

To confirm these computations, obtain by dsolve with type=series , the series solution that satisfies the initial conditions y(0) = a(0) and `y'`(0) = a(1) .  This solution is

> sol5 := collect( convert( dsolve( {ode5,y(0)=a(0),D(y)(0)=a(1)}, y(x), type=series ), polynom ), [ y(0), D(y)(0) ] );

sol5 := y(x) = a(0)+a(1)*x-1/2*p*a(0)*(p+1)*x^2+(-1/6*a(1)*p^2-1/6*a(1)*p+1/3*a(1))*x^3+(-5/24*p^2*a(0)+1/12*p^3*a(0)-1/4*p*a(0)+1/24*p^4*a(0))*x^4+(1/60*a(1)*p^3-13/120*a(1)*p^2+1/120*a(1)*p^4+1/5*a(... sol5 := y(x) = a(0)+a(1)*x-1/2*p*a(0)*(p+1)*x^2+(-1/6*a(1)*p^2-1/6*a(1)*p+1/3*a(1))*x^3+(-5/24*p^2*a(0)+1/12*p^3*a(0)-1/4*p*a(0)+1/24*p^4*a(0))*x^4+(1/60*a(1)*p^3-13/120*a(1)*p^2+1/120*a(1)*p^4+1/5*a(... sol5 := y(x) = a(0)+a(1)*x-1/2*p*a(0)*(p+1)*x^2+(-1/6*a(1)*p^2-1/6*a(1)*p+1/3*a(1))*x^3+(-5/24*p^2*a(0)+1/12*p^3*a(0)-1/4*p*a(0)+1/24*p^4*a(0))*x^4+(1/60*a(1)*p^3-13/120*a(1)*p^2+1/120*a(1)*p^4+1/5*a(... sol5 := y(x) = a(0)+a(1)*x-1/2*p*a(0)*(p+1)*x^2+(-1/6*a(1)*p^2-1/6*a(1)*p+1/3*a(1))*x^3+(-5/24*p^2*a(0)+1/12*p^3*a(0)-1/4*p*a(0)+1/24*p^4*a(0))*x^4+(1/60*a(1)*p^3-13/120*a(1)*p^2+1/120*a(1)*p^4+1/5*a(... sol5 := y(x) = a(0)+a(1)*x-1/2*p*a(0)*(p+1)*x^2+(-1/6*a(1)*p^2-1/6*a(1)*p+1/3*a(1))*x^3+(-5/24*p^2*a(0)+1/12*p^3*a(0)-1/4*p*a(0)+1/24*p^4*a(0))*x^4+(1/60*a(1)*p^3-13/120*a(1)*p^2+1/120*a(1)*p^4+1/5*a(...

To see the equivalence of these solutions,  observe that the sum of the two linearly independent solutions obtained from the Method of Frobenius agrees with the dsolve solution up to the order of the terms computed.

> simplify(sol1+sol2-rhs(sol5));

0

While not proven here, the series associated with a(0) and the series associated with a(1) , i.e. , the two functions

1/40320*p*a(0)*(p-2)*(p-4)*(p-6)*(p+7)*(p+5)*(p+3)*(p+1)*x^8-1/720*p*a(0)*(p-2)*(p-4)*(p+5)*(p+3)*(p+1)*x^6+1/24*p*a(0)*(p-2)*(p+3)*(p+1)*x^4-1/2*p*a(0)*(p+1)*x^2+a(0)

1/362880*a(1)*(p-1)*(p-3)*(p-5)*(p-7)*(p+8)*(p+6)*(p+4)*(p+2)*x^9-1/5040*a(1)*(p-1)*(p-3)*(p-5)*(p+6)*(p+4)*(p+2)*x^7+1/120*a(1)*(p-1)*(p-3)*(p+4)*(p+2)*x^5-1/6*a(1)*(p+2)*(p-1)*x^3+a(1)*x

form a fundamental set of solutions to Legendre's equation of order p .

Additional inspection of these solutions (or the recurrence relations) when p is an integer reveals that either the series of even terms ( y[1] ) or the series of odd terms ( y[2] ) terminates. Thus, one fundamental solution is a polynomial. This polynomial, normalized to have value 1 at x = 1 , is the Legendre polynomial of order p .

The first few of these polynomials are

> q := eval( sol1, p=k );
> q := eval( sol2, p=k );
> P[k] = simplify(q / eval( q, x=1 ));

P[0] = 1

P[1] = x

P[2] = 3/2*x^2-1/2

P[3] = 1/2*x*(5*x^2-3)

P[4] = 35/8*x^4-15/4*x^2+3/8

P[5] = 1/8*x*(63*x^4-70*x^2+15)

The Legendre polynomials form an orthogonal family of functions in the sense that

Int(P[m](x)*P[n](x), x = -1 .. 1) = 0 for all nonnegative integers m <> n .

Maple provides the Legendre polynomials in the orthopoly package, using the name P(k, x) for P[k](x) .  Maple's list of Legendre polynomials begins with

1

x

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

5/2*x^3-3/2*x

35/8*x^4-15/4*x^2+3/8

63/8*x^5-35/4*x^3+15/8*x

A graph of these first Legendre polynomials is seen in Figure 31.1.

> plot( [ P(k,x) $ k=0..6 ], x=-1..1, legend=[ seq( "P"||k, k=0..6 ) ], title="Figure 31.1" );

[Plot]

The orthogonality of the (first few) Legendre polynomials is confirmed by the diagonal structure in the matrix of inner products of pairs of Legendre polynomials, computed efficiently with

> Matrix( 9, 9, (m,n) -> int( P(m,x)*P(n,x), x=-1..1 ) );

Matrix([[2/3, 0, 0, 0, 0, 0, 0, 0, 0], [0, 2/5, 0, 0, 0, 0, 0, 0, 0], [0, 0, 2/7, 0, 0, 0, 0, 0, 0], [0, 0, 0, 2/9, 0, 0, 0, 0, 0], [0, 0, 0, 0, 2/11, 0, 0, 0, 0], [0, 0, 0, 0, 0, 2/13, 0, 0, 0], [0, ...

The LegendreP and LegendreQ commands provide high level access to the Legendre functions of the first and second kind, respectively. The series command can be used to obtain a series expansion for the appropriate Legendre function.  For example, the series for LegendreP(1/2, x) begins

> series( LegendreP(1/2,x), x=0 );

series(2*GAMMA(3/4)^2/Pi^(3/2)+1/2*Pi^(1/2)/GAMMA(3/4)^2*x-3/4*GAMMA(3/4)^2/Pi^(3/2)*x^2+5/48*Pi^(1/2)/GAMMA(3/4)^2*x^3-21/64*GAMMA(3/4)^2/Pi^(3/2)*x^4+15/256*Pi^(1/2)/GAMMA(3/4)^2*x^5+O(x^6),x,6)

31.F Bessel's Equation

Bessel's equation of order nu is

> ode7 := x^2 * diff( y(x), x$2 ) + x * diff( y(x), x ) + ( x^2 - nu^2 ) * y(x) = 0;

ode7 := x^2*(diff(y(x), `$`(x, 2)))+x*(diff(y(x), x))+(x^2-nu^2)*y(x) = 0

where nu is a nonnegative constant. All points are ordinary points except for the regular singular point at the origin. This is verified with

> regularsp( ode7, y(x) );

[0]

Thus, a series solution at the origin can be found with the Method of Frobenius. The indicial equation at the origin is

> ie2 := indicialeq( ode7, x, 0, y(x) );

ie2 := x^2-nu^2 = 0

with indicial roots

> ir2 := solve( ie2, x );

ir2 := -nu, nu

Because x[0] = 0 is a regular singular point for Bessel's equation, solutions are sought via the Method of Frobenius.  Thus, there should be two formal power series solutions of the form

> formF := y(x) = Sum( c(k) * x^(k+r), k=0..infinity ):
> formF3 := eval( formF, [ c=a, r=nu ] );
> formF4 := eval( formF, [ c=b, r=-nu ] );

formF3 := y(x) = Sum(a(k)*x^(k+nu), k = 0 .. infinity)

formF4 := y(x) = Sum(b(k)*x^(k-nu), k = 0 .. infinity)

To obtain the recurrence relations for the coefficients in the two solutions, work with the following truncated versions of the solution

> tformF3 := eval( y(x) = Sum( a(m) * x^(m+r), m=k-2..k+2 ), r=nu );
> tformF4 := eval( y(x) = Sum( b(m) * x^(m+r), m=k-2..k+2 ), r=-nu );

tformF3 := y(x) = Sum(a(m)*x^(m+nu), m = k-2 .. k+2)

tformF4 := y(x) = Sum(b(m)*x^(m-nu), m = k-2 .. k+2)

Substitution into Bessel's equation leads to

> q131 := simplify( combine( value( eval( ode7, tformF3 ) ), power ) );
> q132 := simplify( combine( value( eval( ode7, tformF4 ) ), power ) );

q131 := x^(k+nu)*a(k-2)+x^(1+k+nu)*a(k-1)+x^(2+k+nu)*a(k)-4*x^(-2+k+nu)*a(k-2)*nu-2*x^(-1+k+nu)*a(k-1)*nu+x^(-2+k+nu)*a(k-2)*k^2+x^(-1+k+nu)*a(k-1)*k^2+2*x^(1+k+nu)*a(k+1)*k+x^(1+k+nu)*a(k+1)*k^2-2*x^... q131 := x^(k+nu)*a(k-2)+x^(1+k+nu)*a(k-1)+x^(2+k+nu)*a(k)-4*x^(-2+k+nu)*a(k-2)*nu-2*x^(-1+k+nu)*a(k-1)*nu+x^(-2+k+nu)*a(k-2)*k^2+x^(-1+k+nu)*a(k-1)*k^2+2*x^(1+k+nu)*a(k+1)*k+x^(1+k+nu)*a(k+1)*k^2-2*x^... q131 := x^(k+nu)*a(k-2)+x^(1+k+nu)*a(k-1)+x^(2+k+nu)*a(k)-4*x^(-2+k+nu)*a(k-2)*nu-2*x^(-1+k+nu)*a(k-1)*nu+x^(-2+k+nu)*a(k-2)*k^2+x^(-1+k+nu)*a(k-1)*k^2+2*x^(1+k+nu)*a(k+1)*k+x^(1+k+nu)*a(k+1)*k^2-2*x^... q131 := x^(k+nu)*a(k-2)+x^(1+k+nu)*a(k-1)+x^(2+k+nu)*a(k)-4*x^(-2+k+nu)*a(k-2)*nu-2*x^(-1+k+nu)*a(k-1)*nu+x^(-2+k+nu)*a(k-2)*k^2+x^(-1+k+nu)*a(k-1)*k^2+2*x^(1+k+nu)*a(k+1)*k+x^(1+k+nu)*a(k+1)*k^2-2*x^...

q132 := -2*x^(k-nu)*b(k)*k*nu+b(k+1)*x^(1+k-nu)+4*b(k-2)*x^(-2+k-nu)+x^(1+k-nu)*b(k+1)*k^2+4*x^(-2+k-nu)*b(k-2)*nu+x^(-2+k-nu)*b(k-2)*k^2+x^(2+k-nu)*b(k+2)*k^2+2*x^(-1+k-nu)*b(k-1)*nu+x^(3+k-nu)*b(k+1... q132 := -2*x^(k-nu)*b(k)*k*nu+b(k+1)*x^(1+k-nu)+4*b(k-2)*x^(-2+k-nu)+x^(1+k-nu)*b(k+1)*k^2+4*x^(-2+k-nu)*b(k-2)*nu+x^(-2+k-nu)*b(k-2)*k^2+x^(2+k-nu)*b(k+2)*k^2+2*x^(-1+k-nu)*b(k-1)*nu+x^(3+k-nu)*b(k+1... q132 := -2*x^(k-nu)*b(k)*k*nu+b(k+1)*x^(1+k-nu)+4*b(k-2)*x^(-2+k-nu)+x^(1+k-nu)*b(k+1)*k^2+4*x^(-2+k-nu)*b(k-2)*nu+x^(-2+k-nu)*b(k-2)*k^2+x^(2+k-nu)*b(k+2)*k^2+2*x^(-1+k-nu)*b(k-1)*nu+x^(3+k-nu)*b(k+1... q132 := -2*x^(k-nu)*b(k)*k*nu+b(k+1)*x^(1+k-nu)+4*b(k-2)*x^(-2+k-nu)+x^(1+k-nu)*b(k+1)*k^2+4*x^(-2+k-nu)*b(k-2)*nu+x^(-2+k-nu)*b(k-2)*k^2+x^(2+k-nu)*b(k+2)*k^2+2*x^(-1+k-nu)*b(k-1)*nu+x^(3+k-nu)*b(k+1...

from which the recurrence relations

> reqn3 := collect( map( coeff, q131, eval( x^(k+r), r=nu ) ), [ a(k+i) $ i=-3..3 ] );
> reqn4 := collect( map( coeff, q132, eval( x^(k+r), r=-nu ) ), [ b(k+i) $ i=-3..3 ] );

reqn3 := a(k-2)+(2*k*nu+k^2)*a(k) = 0

reqn4 := b(k-2)+(k^2-2*k*nu)*b(k) = 0

or even

> factor( isolate( reqn3, a(k) ) );
factor( isolate( reqn4, b(k) ) );

a(k) = -a(k-2)/(k*(2*nu+k))

b(k) = -b(k-2)/(k*(k-2*nu))

are obtained.

Once again, Maple can now solve the recurrence equations, giving the solutions

> ak := rsolve( reqn3, {a} );
> bk := rsolve( reqn4, {b} );

ak := PIECEWISE([(-1)^(1/2*k)*4^(-1/2*k)*GAMMA(1+nu)*a(0)/(GAMMA(1/2*k+1+nu)*GAMMA(1/2*k+1)), k::even], [1/2*(-1)^(1/2*k-1/2)*4^(-1/2*k+1/2)*Pi^(1/2)*GAMMA(3/2+nu)*a(1)/(GAMMA(1/2*k+1)*GAMMA(1/2*k+1+n...

bk := PIECEWISE([(-1)^(1/2*k)*4^(-1/2*k)*GAMMA(-nu+1)*b(0)/(GAMMA(1/2*k-nu+1)*GAMMA(1/2*k+1)), k::even], [1/2*(-1)^(1/2*k-1/2)*4^(-1/2*k+1/2)*Pi^(1/2)*GAMMA(3/2-nu)*b(1)/(GAMMA(1/2*k+1)*GAMMA(1/2*k-nu...

The two Frobenius solutions are therefore

> sol1 := x^nu   *collect(simplify(convert(add(ak*x^k,k=0..9),factorial)),x,factor);
sol2 := x^(-nu)*collect(simplify(convert(add(bk*x^k,k=0..9),factorial)),x,factor);

sol1 := x^nu*(1/945*a(1)*x^9/((9+2*nu)*(7+2*nu)*(5+2*nu)*(3+2*nu))+1/6144*a(0)*x^8/((4+nu)*(3+nu)*(2+nu)*(1+nu))-1/105*a(1)*x^7/((7+2*nu)*(5+2*nu)*(3+2*nu))-1/384*a(0)*x^6/((3+nu)*(2+nu)*(1+nu))+1/15*... sol1 := x^nu*(1/945*a(1)*x^9/((9+2*nu)*(7+2*nu)*(5+2*nu)*(3+2*nu))+1/6144*a(0)*x^8/((4+nu)*(3+nu)*(2+nu)*(1+nu))-1/105*a(1)*x^7/((7+2*nu)*(5+2*nu)*(3+2*nu))-1/384*a(0)*x^6/((3+nu)*(2+nu)*(1+nu))+1/15*...

sol2 := x^(-nu)*(1/945*b(1)*x^9/((-9+2*nu)*(-7+2*nu)*(-5+2*nu)*(-3+2*nu))+1/6144*b(0)*x^8/((-4+nu)*(-3+nu)*(-2+nu)*(nu-1))+1/105*b(1)*x^7/((-7+2*nu)*(-5+2*nu)*(-3+2*nu))+1/384*b(0)*x^6/((-3+nu)*(-2+nu... sol2 := x^(-nu)*(1/945*b(1)*x^9/((-9+2*nu)*(-7+2*nu)*(-5+2*nu)*(-3+2*nu))+1/6144*b(0)*x^8/((-4+nu)*(-3+nu)*(-2+nu)*(nu-1))+1/105*b(1)*x^7/((-7+2*nu)*(-5+2*nu)*(-3+2*nu))+1/384*b(0)*x^6/((-3+nu)*(-2+nu...

To confirm these computations, compare these solution to the series solution obtained by dsolve with type=series .

> sol7 := convert(dsolve( ode7, y(x), type=series ), polynom);

sol7 := y(x) = _C1*x^nu*(1+x^2/(-4*nu-4)+x^4/((-8*nu-16)*(-4*nu-4))+x^6/((-12*nu-36)*(-8*nu-16)*(-4*nu-4))+x^8/((-16*nu-64)*(-12*nu-36)*(-8*nu-16)*(-4*nu-4)))+_C2*x^(-nu)*(1+x^2/(4*nu-4)+x^4/((8*nu-16... sol7 := y(x) = _C1*x^nu*(1+x^2/(-4*nu-4)+x^4/((-8*nu-16)*(-4*nu-4))+x^6/((-12*nu-36)*(-8*nu-16)*(-4*nu-4))+x^8/((-16*nu-64)*(-12*nu-36)*(-8*nu-16)*(-4*nu-4)))+_C2*x^(-nu)*(1+x^2/(4*nu-4)+x^4/((8*nu-16...

Noting that only even powers of x appear within the parentheses, modify the Frobenius solutions to read

> sol11 := eval(sol1,a(1)=0);
sol22 := eval(sol2,b(1)=0);

sol11 := x^nu*(1/6144*a(0)*x^8/((4+nu)*(3+nu)*(2+nu)*(1+nu))-1/384*a(0)*x^6/((3+nu)*(2+nu)*(1+nu))+1/32*a(0)*x^4/((2+nu)*(1+nu))-1/4*a(0)*x^2/(1+nu)+a(0))

sol22 := x^(-nu)*(1/6144*b(0)*x^8/((-4+nu)*(-3+nu)*(-2+nu)*(nu-1))+1/384*b(0)*x^6/((-3+nu)*(-2+nu)*(nu-1))+1/32*b(0)*x^4/((-2+nu)*(nu-1))+1/4*b(0)*x^2/(nu-1)+b(0))

then compare the expressions that are multiplied by x^nu and x^(-nu) .  If the constants are factored out, or equivalently set to 1, the differences in these expressions are found to be

> simplify(eval(rhs(sol7),{_C2=0,_C1=1})-eval(sol11,a(0)=1));
simplify(eval(rhs(sol7),{_C2=1,_C1=0})-eval(sol22,b(0)=1));

0

0

Note that these series solutions are not well defined when 2*nu is an integer. When 2*nu is not an integer, a fundamental set of solutions to Bessel's equation of order nu is { J[nu](x) , J[-nu](x) }

Define the Bessel's function (of the first kind) of order nu and -nu ( nu nonnegative) to be

> J[nu](x) = eval(sol11, a(0)=1);
J[-nu](x) = eval(sol22, b(0)=1);

J[nu](x) = x^nu*(1/6144*x^8/((4+nu)*(3+nu)*(2+nu)*(1+nu))-1/384*x^6/((3+nu)*(2+nu)*(1+nu))+1/32*x^4/((2+nu)*(1+nu))-1/4*x^2/(1+nu)+1)

J[-nu](x) = x^(-nu)*(1/6144*x^8/((-4+nu)*(-3+nu)*(-2+nu)*(nu-1))+1/384*x^6/((-3+nu)*(-2+nu)*(nu-1))+1/32*x^4/((-2+nu)*(nu-1))+1/4*x^2/(nu-1)+1)

While it is tempting to state that {J[nu](x), J[-nu](x)} is a fundamental set of solutions to Bessel's equation of order nu , note that J[-0](x) = J[0](x) and that J[-nu] is not well-defined when 2*nu is an even positive integer. If nu is not a positive integer, then {J[nu](x), J[-nu](x)} is a fundamental set of solutions to Bessel's equation of order nu . If nu is a positive integer, a fundamental set of solutions is {J[nu](x), Y[nu](x)} where Y[nu](x) , the Bessel function of the second kind of order nu , is defined for noninteger orders nu to be the following linear combination of the linearly independent functions J[nu](x) and J[-nu](x) ,

Y[nu](x) = (cos(nu*Pi)*J[nu](x)-J[-nu](x))/sin(nu*Pi)

and, for integer orders ( nu = m ),

Y[m](x) = Limit(Y[nu](x), nu = m) .

Thus, the general solution to Bessel's equation of (nonnegative) order nu can be written as

y(x) = c[1]*J[nu](x)+c[2]*Y[nu](x) .

Direct access to the Bessel functions of the first and second kind is provided with Maple's BesselJ and BesselY commands.

Two important properties of Bessel functions are that

limit(J[nu](x), x = 0, right) = 0

and

limit(Y[nu](x), x = 0, right) = -infinity

These limits essentially result from J[nu](x) being obtained from the indicial root r = nu > 0 and Y[nu](x) from the indicial root r = -nu < 0. These properties can be observed in Figure 31.2

> plot( [ BesselJ(1,x), BesselY(1,x) ], x=0..10, y=-2..1,
> legend=[ "J[1]", "Y[1]" ], title="Figure 31.2" );

[Plot]

and Figure 31.3.

> plot( [ BesselJ(7/3,x), BesselY(7/3,x) ], x=0..10, y=-2..1,
> legend=[ "J[7/3]", "Y[7/3]" ], title="Figure 31.3" );

[Plot]

As a final comment, the Bessel functions of half-integer orders can be expressed in unexpectedly simple forms. For example it turns out that

> for k from -5 to 5 by 2 do
> J[k/2](x) = BesselJ( k/2, x );

J[(-5)/2](x) = -2^(1/2)*(cos(x)*x^2-3*cos(x)-3*sin(x)*x)/(Pi^(1/2)*x^(5/2))

J[(-3)/2](x) = -2^(1/2)*(sin(x)*x+cos(x))/(Pi^(1/2)*x^(3/2))

J[(-1)/2](x) = 2^(1/2)*cos(x)/(Pi^(1/2)*x^(1/2))

J[1/2](x) = 2^(1/2)*sin(x)/(Pi^(1/2)*x^(1/2))

J[3/2](x) = -2^(1/2)*(cos(x)*x-sin(x))/(Pi^(1/2)*x^(3/2))

J[5/2](x) = -2^(1/2)*(sin(x)*x^2-3*sin(x)+3*cos(x)*x)/(Pi^(1/2)*x^(5/2))

[Back to ODE Powertool Table of Contents ]

Find Two Linearly Independent Power Series Solutions

Source: https://www.maplesoft.com/applications/view.aspx?SID=4719&view=html&L=E