Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Associated Legendre Function Problem in mma?
Replies: 1   Last Post: Jul 9, 1996 12:55 AM

 Messages: [ Previous | Next ]
 AES Posts: 72 Registered: 12/7/04
Associated Legendre Function Problem in mma?
Posted: Jul 8, 1996 1:56 AM

Associated Legendre functions are a real bear. Trying to
cope with them, I note in Abramowitz and Stegun, p. 334,
Eq. (8.6.16), that one of these functions which I
particularly need to use, LegendreP[n,-n,x], has the special
case (in TeX notation):

P_n^{(-n}(x) = 2^{-n} (x^2-1)^{n/2} / \Gamma[n+1]

But when I try to confirm this with mma, I see that the
magnitudes are OK, but there is a residual confusion

specialCase[n_,x_] := 2^(-n) (x^2-1)^(n/2) /
Gamma[n+1]

Table[{n, LegendreP[n,-n,x] /
specialCase[n,x] // Simplify},
{n,0,5}] // TableForm

0 1

2
Sqrt[1 - x ]
-------------
2
1 Sqrt[-1 + x ]

2 -1

2
Sqrt[1 - x ]
-(-------------)
2
3 Sqrt[-1 + x ]

4 1

2
Sqrt[1 - x ]
-------------
2
5 Sqrt[-1 + x ]

and unfortunately getting the phase angles right is
important in my problem. Who's correct here?

I want to evaluate very high order polynomicals (n > 50)
using rational fraction values of x for accuracy (which
seem to work pretty well). But while LegendreP[2n, x],
which I also need to use, seems to run fine in this way,
LegendreP[n,-n,x] slows to a crawl for n > 20 or thereabouts
-- even though the polynomial expressions for the regular
and associated Legendre's are of the same order in the
two cases. Hence the search for an alternative for the
associated case.

--AES siegman@ee.stanford.edu

Date Subject Author
7/8/96 AES
7/9/96 Paul Abbott