LegendreP - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


LegendreP, LegendreQ

Legendre functions and associated Legendre functions of the first and second kinds

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

LegendreP(v, x)

LegendreQ(v, x)

LegendreP(v, u, x)

LegendreQ(v, u, x)

Parameters

v

-

algebraic expression (degree)

u

-

algebraic expression (order)

x

-

algebraic expression (argument)

Description

• 

LegendreP(v, x) and LegendreP(v, u, x) are the Legendre and associated Legendre functions of the first kind. LegendreQ(v, x) and LegendreQ(v, u, x) are the Legendre and associated Legendre functions of the second kind. They satisfy the differential equation:

x2+1y''2xy' +vv+1u2x2+1y=0

• 

The points 1, -1, and  are singularities of the equation (except in special cases) and ordinary branch points of the functions.

• 

In standard references, the branch cuts are taken to be ,1 and 1,1, and the values of the functions on the branch cut 1,1 are obtained by an averaging process (in order to obtain functions which are real valued on this interval).

  

Rather than take this approach, Maple defines the default Legendre functions to be continuous from above onto the cuts, ,1 and 1,1. However, alternative definitions of the Legendre functions are also available, which place the branch cuts as ,1 and 1,; these functions are real valued on the interval 1,1. The selection between the two definitions for the Legendre functions is accomplished via assignment to the environment variable _EnvLegendreCut. If this environment variable is assigned the value −1..1, Maple provides the default behavior, which places a branch cut on the real line coincident with the interval 1,1. If this environment variable is assigned the value 1.., Maple places branch cuts on the real line coincident with the intervals ,1 and 1,.

  

If _EnvLegendreCut is either not assigned or has the value −1..1, the LegendreP and LegendreQ functions have the following hypergeometric representation:

LegendreP(a,b,z) = convert( LegendreP(a,b,z), hypergeom);

LegendrePa,b,z=z+1b2hypergeoma,a+1,1b,12z2z1b2Γ1b

(1)

LegendreQ(a,b,z) = convert( LegendreQ(a,b,z), hypergeom);

LegendreQa,b,z=ⅇIbππz+1b2z1b2Γb+a+1hypergeom1+b2+a2,b2+a2+12,32+a,1z22zb+a+1Γ32+a2a

(2)
  

The formula above for LegendreP is not valid when the second parameter, b, is a positive integer. In that case, the following formula is used:

LegendreP(a,b,z) = (z+1)^(b/2)*(z-1)^(b/2)*diff(LegendreP(a,z),[z$b]);

LegendrePa,b,z=z+1b2z1b22bpochhammer12,bGegenbauerCab,12+b,z

(3)
  

For LegendreQ, the hypergeometric representation shown is not valid when the first parameter a+32 is a non-positive integer; in that case the following formula is applied recursively

LegendreQ(a,b,Z) = ((2*a+3)*Z*LegendreQ(a+1,b,Z) + (b-a-2)*LegendreQ(a+2,b,Z))/(a+1+b);

LegendreQa,b,Z=2a+3ZLegendreQa+1,b,Z+ba2LegendreQa+2,b,Zb+a+1

(4)
  

Regardless of the value of b, in the hypergeometric representations above for LegendreP and LegendreQ, when _EnvLegendreCut has the value 1.. the formulas used are obtained from those displayed by replacing the factor z1b2 by 1zb2.

  

The toroidal functions can be obtained by leaving _EnvLegendreCut unassigned (or assigning it the value −1..1) and composing with coshx: LegendreP(v, u, cosh(x)), etcetera.

  

Similarly, the spherical harmonic functions can be obtained by setting _EnvLegendreCut1.. and composing with cosx: LegendreP(v, u, cos(x)), etcetera.

  

Commands such as evalf and simplify have remember tables that do not take into consideration the setting of _EnvLegendreCut. After changing the value of _EnvLegendreCut, remember tables can be cleared by executing either the  restart command or the forget command (as in forget(evalf) or forget(simplify)).

• 

The values returned by these functions when the argument is either 1 or -1 are the values that would be obtained by considering the order and degree parameters fixed and taking the appropriate limit in the argument.

Examples

LegendreP1.3,2.54,1.7

1.036634985

(5)

LegendreP1.3,2.54,0.7

−3.485914197+3.953993515I

(6)

LegendreP1.3,2.54,0.7+0.0001I

−3.487465642+3.952624688I

(7)

_EnvLegendreCut1..:

forgetevalf:

LegendreP1.3,2.54,0.7

5.271210724

(8)

LegendreP1.3,2.54,0.7+0.0001I

5.271209941+0.002068978010I

(9)

_EnvLegendreCut1..1

_EnvLegendreCut−1..1

(10)

LegendreQ2.4+1.7I,πγI,I

−4720.643302+4608.249867I

(11)

LegendreQ1.5,2,0.3+I

−0.7992112483+0.2994630511I

(12)

LegendreP12,2,x

LegendreP12,2,x

(13)

diffLegendrePv,u,coshx,x

vu+1LegendrePv+1,u,coshxv+1coshxLegendrePv,u,coshxsinhxcoshx21

(14)

_EnvLegendreCut1..:

simplifyLegendreP5,x,LegendreP

638x5354x3+158x

(15)

simplifyLegendreP5,3,x,LegendreP

1051x32x+1329x212

(16)

simplifyLegendreQ5,x,LegendreQ

x63x470x2+15lnx+1+ln1x1681563x48+49x28

(17)

forgetsimplify

_EnvLegendreCut1..1

_EnvLegendreCut−1..1

(18)

simplifyLegendreQ5,x,LegendreQ

x63x470x2+15lnx+1+lnx11681563x48+49x28

(19)

simplifyLegendreQ3,2,x,LegendreQ

15x1x+1xlnx+1+lnx12+15x4+25x28x1x+1

(20)

forgetsimplify

_EnvLegendreCut1..

_EnvLegendreCut1..

(21)

simplifyLegendreQ3,2,x,LegendreQ

15x1x+1xlnx+1+ln1x2+15x425x2+8x1x+1

(22)

See Also

ChebyshevT

ChebyshevU

EllipticE

EllipticF

EllipticPi

evalf

forget

GegenbauerC

HermiteH

initialfunctions

JacobiP

LaguerreL

orthopoly[P]

simplify