LegendreP, LegendreQ
Legendre functions and associated Legendre functions of the first and second kinds
Calling Sequence
Parameters
Description
Examples
LegendreP(v, x)
LegendreQ(v, x)
LegendreP(v, u, x)
LegendreQ(v, u, x)
v
-
algebraic expression (degree)
u
algebraic expression (order)
x
algebraic expression (argument)
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+1⁢y⁢''−2⁢x⁢y⁢' +v⁢v+1−u2−x2+1⁢y=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);
LegendreP⁡a,b,z=z+1b2⁢hypergeom⁡−a,a+1,1−b,12−z2z−1b2⁢Γ⁡1−b
LegendreQ(a,b,z) = convert( LegendreQ(a,b,z), hypergeom);
LegendreQ⁡a,b,z=ⅇI⁢b⁢π⁢π⁢z+1b2⁢z−1b2⁢Γ⁡b+a+1⁢hypergeom⁡1+b2+a2,b2+a2+12,32+a,1z22⁢zb+a+1⁢Γ⁡32+a⁢2a
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]);
LegendreP⁡a,b,z=z+1b2⁢z−1b2⁢2b⁢pochhammer⁡12,b⁢GegenbauerC⁡a−b,12+b,z
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);
LegendreQ⁡a,b,Z=2⁢a+3⁢Z⁢LegendreQ⁡a+1,b,Z+b−a−2⁢LegendreQ⁡a+2,b,Zb+a+1
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 z−1b2 by 1−zb2.
The toroidal functions can be obtained by leaving _EnvLegendreCut unassigned (or assigning it the value −1..1) and composing with cosh⁡x: LegendreP(v, u, cosh(x)), etcetera.
Similarly, the spherical harmonic functions can be obtained by setting _EnvLegendreCut≔1..∞ and composing with cos⁡x: 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.
LegendreP⁡1.3,2.54,1.7
1.036634985
LegendreP⁡1.3,2.54,0.7
−3.485914197+3.953993515⁢I
LegendreP⁡1.3,2.54,0.7+0.0001⁢I
−3.487465642+3.952624688⁢I
_EnvLegendreCut≔1..∞:
forget⁡evalf:
5.271210724
5.271209941+0.002068978010⁢I
_EnvLegendreCut≔−1..1
LegendreQ⁡−2.4+1.7⁢I,π−γ⁢I,I
−4720.643302+4608.249867⁢I
LegendreQ⁡1.5,2,0.3+I
−0.7992112483+0.2994630511⁢I
LegendreP⁡12,2,x
diff⁡LegendreP⁡v,u,cosh⁡x,x
v−u+1⁢LegendreP⁡v+1,u,cosh⁡x−v+1⁢cosh⁡x⁢LegendreP⁡v,u,cosh⁡x⁢sinh⁡xcosh⁡x2−1
simplify⁡LegendreP⁡5,x,LegendreP
638⁢x5−354⁢x3+158⁢x
simplify⁡LegendreP⁡5,3,x,LegendreP
−105⁢1−x32⁢x+132⁢9⁢x2−12
simplify⁡LegendreQ⁡5,x,LegendreQ
−x⁢63⁢x4−70⁢x2+15⁢−ln⁡x+1+ln⁡1−x16−815−63⁢x48+49⁢x28
forget⁡simplify
−x⁢63⁢x4−70⁢x2+15⁢−ln⁡x+1+ln⁡x−116−815−63⁢x48+49⁢x28
simplify⁡LegendreQ⁡3,2,x,LegendreQ
−15⁢x−1⁢x+1⁢x⁢−ln⁡x+1+ln⁡x−12+−15⁢x4+25⁢x2−8x−1⁢x+1
_EnvLegendreCut≔1..∞
15⁢x−1⁢x+1⁢x⁢−ln⁡x+1+ln⁡1−x2+15⁢x4−25⁢x2+8x−1⁢x+1
See Also
ChebyshevT
ChebyshevU
EllipticE
EllipticF
EllipticPi
evalf
forget
GegenbauerC
HermiteH
initialfunctions
JacobiP
LaguerreL
orthopoly[P]
simplify
Download Help Document