Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: bug in Legendre polinomials

  • To: mathgroup at
  • Subject: [mg20455] Re: bug in Legendre polinomials
  • From: paul <paul at>
  • Date: Wed, 27 Oct 1999 02:04:33 -0400
  • Organization: University of Western Australia
  • References: <7u8vsu$>
  • Sender: owner-wri-mathgroup at

Peter Pollner wrote:

> I have found a misterious bug (Version
> 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
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
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]


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

            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?