Re: LegendreP error (bug?) in Mathematica

*To*: mathgroup at smc.vnet.net*Subject*: [mg58897] Re: LegendreP error (bug?) in Mathematica*From*: dh <dh at metrohm.ch>*Date*: Sat, 23 Jul 2005 05:32:04 -0400 (EDT)*References*: <dbq2o2$713$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Hi, Legendre Polynomials are mostly used for n>=0 in LegendreP[n,x]. Extending n to negative values does bring nothing new as can be seen from Lengendre's diff. eq.: (1-x^2) y'' - 2x y' + n(n+1) y == 0 replacing n by -n-1 gives the same equation. However, it is obvious from the above equation that it only determines the Legendre polynomial up to a factor. This factor is determined by Orthonormality. This still leaves a phase factor undetermined. That is why you can encounter different choices mostly +1 or -1. Obviously, you are using a different choice than mathematica, however, this shoud not be a big problem because it is a choice. sincerely, Daniel ab at sd.com wrote: > Why does Mathematica give an erroneous answer to LegendreP[-1,1]=1? where it > shoudl give -1 according to the series expansion below? is this a bug? > > In[13]:= > LegendreP[-1, 1] > Out[13]= > 1 > In[12]:= > p[n_, z_] = (-1)^n* > Sum[((Pochhammer[-n, k]*Pochhammer[n + 1, k])/k!^2)* > ((z + 1)/2)^k, {k, 0, n}] > Out[12]= > n z + 1 > (-1) Hypergeometric2F1[-n, n + 1, 1, -----] > 2 > In[16]:= > p[-1, 1] > Out[16]= > -1 >