LegendreP error (bug?) in Mathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg58892] LegendreP error (bug?) in Mathematica
- From: "ab at sd.com" <at2 at ads.com>
- Date: Fri, 22 Jul 2005 01:58:42 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
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