Re: bug in Legendre polinomials

• To: mathgroup at smc.vnet.net
• Subject: [mg20455] Re: bug in Legendre polinomials
• From: paul <paul at physics.uwa.edu.au>
• Date: Wed, 27 Oct 1999 02:04:33 -0400
• Organization: University of Western Australia
• References: <7u8vsu\$qcn@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Peter Pollner wrote:

> 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.

You will find that, for rational functions, Together is faster than Simplify
and
gives the desired result.

> I am interested also to force Mathematica to give the result of the series
> Sum[Binomial[ktmp, i]^2 x^i, {i, 0, ktmp}]
> in terms of Legendre polinomials and not as terms of Hypergeometric
> functions.

In general, this is not so simple.  There are many alternative forms in terms
of
orthogonal polynomials.  However, you can define a pattern rule that will do
this, e.g.

Simplify[Sum[Binomial[k, i]^2*((y - 1)/(y + 1))^i,
{i, 0, k}] /. Hypergeometric2F1[k_, k_, 1, x_] :>
LegendreP[-k, (x + 1)/(1 - x)]/(1 - x)^k]

Cheers,
Paul

____________________________________________________________________
Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia
Nedlands WA  6907                     mailto:paul at physics.uwa.edu.au
AUSTRALIA                            http://physics.uwa.edu.au/~paul

God IS a weakly left-handed dice player
____________________________________________________________________

```

• Prev by Date: Re: Non standard evaluation troubles.
• Next by Date: Re: service pack for Mathematica?
• Previous by thread: Re: bug in Legendre polinomials
• Next by thread: how to open all cells?