Compute the Legendre function of degree n and order m = 0 ... N. The optional argument, normalization, may be one of
"unnorm"
,"sch"
, or"norm"
. The default is"unnorm"
. The value of n must be a non-negative scalar integer.If the optional argument normalization is missing or is
"unnorm"
, compute the Legendre function of degree n and order m and return all values for m = 0 ... n. The return value has one dimension more than x.The Legendre Function of degree n and order m:
m m 2 m/2 d^m P(x) = (-1) * (1-x ) * ---- P (x) n dx^m nwith Legendre polynomial of degree n:
1 d^n 2 n P (x) = ------ [----(x - 1) ] n 2^n n! dx^n
legendre (3, [-1.0, -0.9, -0.8])
returns the matrix:x | -1.0 | -0.9 | -0.8 ------------------------------------ m=0 | -1.00000 | -0.47250 | -0.08000 m=1 | 0.00000 | -1.99420 | -1.98000 m=2 | 0.00000 | -2.56500 | -4.32000 m=3 | 0.00000 | -1.24229 | -3.24000If the optional argument
normalization
is"sch"
, compute the Schmidt semi-normalized associated Legendre function. The Schmidt semi-normalized associated Legendre function is related to the unnormalized Legendre functions by the following:For Legendre functions of degree n and order 0:
0 0 SP (x) = P (x) n nFor Legendre functions of degree n and order m:
m m m 2(n-m)! 0.5 SP (x) = P (x) * (-1) * [-------] n n (n+m)!If the optional argument normalization is
"norm"
, compute the fully normalized associated Legendre function. The fully normalized associated Legendre function is related to the unnormalized Legendre functions by the following:For Legendre functions of degree n and order m
m m m (n+0.5)(n-m)! 0.5 NP (x) = P (x) * (-1) * [-------------] n n (n+m)!