Re: bug in Legendre polinomials

• To: mathgroup at smc.vnet.net
• Subject: [mg20359] Re: [mg20346] bug in Legendre polinomials
• From: David Withoff <withoff at wolfram.com>
• Date: Sun, 17 Oct 1999 02:45:36 -0400
• Sender: owner-wri-mathgroup at wolfram.com

```> Hi,
>
> I have found a misterious bug (Version 4.0.1.0):
>
> I have checked the identity:
> Sum[Binomial[ktmp, i]^2 x^i, {i, 0, ktmp}] = (1 - x)^ktmp LegendreP[ktmp,
> (x + 1)/(1 - x)]
>
> using:
>
> Simplify[Sum[
>       Binomial[ktmp, i]^2 x^i, {i, 0, ktmp}] - (1 - x)^ktmp LegendreP[
>         ktmp, (x + 1)/(1 - x)]]
>
> which should be zero for arbitrary ktmp integers.
> Mathematica gives only for ktmp<36 the correct result
> for ktmp>=36 it gives a nonvanishing polinom.
>
> Thanks
> Peter

I tried a few examples and I always got zero for the expression that
you mentioned, including for ktmp>=36:

In[1]:= expr = Simplify[Sum[
Binomial[ktmp, i]^2 x^i, {i, 0, ktmp}] - (1 - x)^ktmp LegendreP[
ktmp, (x + 1)/(1 - x)]]

Out[1]= Hypergeometric2F1[-ktmp, -ktmp, 1, x] -

ktmp                 1 + x
>    (1 - x)     LegendreP[ktmp, -----]
1 - x

In[2]:= Together[expr /. ktmp -> 60]

Out[2]= 0

If you haven't already gotten an explanation, could you perhaps describe
more explicitly what you did?

Dave Withoff
Wolfram Research

```

• Prev by Date: Re: how to open all cells?
• Next by Date: Re: Composing a stiffness matrix
• Previous by thread: Re: bug in Legendre polinomials
• Next by thread: Re: bug in Legendre polinomials