ab@sd.com science forum beginner
Joined: 12 Jul 2005
Posts: 13
|
Posted: Fri Jul 22, 2005 12:07 am Post subject:
legendreP bug in Mathematica?
|
|
|
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 |
|