MathGroup Archive 2007

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

Search the Archive

Re: LegendreP error (bug?) in Mathematica

  • To: mathgroup at
  • Subject: [mg81126] Re: LegendreP error (bug?) in Mathematica
  • From: John Ralston <ralston at>
  • Date: Thu, 13 Sep 2007 06:28:11 -0400 (EDT)

LegendreP[ l, m] and SphericalHarmonicY[ t, p, l, m]  go
wrong for large index l .  

For l> 40 or so neither can be used reliably everywhere. 

To see the breakdown plot the functions.  Not all index cases fail.
Here's some examples: 

Plot[LegendreP[ 44, 13, x] , {x, -1, 1} ]

Plot[LegendreP[ 66, 9, x] , {x, -1, 1} ]

ListPlot[ Table[ {j,
     Sqrt[ 4Pi/ (
      2l + 1) ] Abs[ SphericalHarmonicY[ j, 0, 0,
                     3.7 ]]}, {j, 1, 55}], PlotJoined -> True]

Has anyone fixed this?  Does anyone care? 
I need l ranges above 200. 

John Ralston 

> I find serious bugs in Mathematica 5.1 LegendreP
> and SphericalHarmonicY.  It is not a matter of 
> definitions or syntax, but a catastrophic failure
> easy to establish.  Math archives show a history
> of discussion, but invariably centered on variations
> of definition.
> Wolfram Research shows little interest.  I'm
> wondering if the failure
> to perfom is well known and has been repaired by
> someone 
> re-writing the commands.  I don't often follow this
> forum, but I've joined to either get access to code
> that works, or to inform people so they can go after
> the problem.   Does anyone care? 
> John Ralston

  • Prev by Date: How to invert a function
  • Next by Date: Re: Timeout in HTML export?
  • Previous by thread: Re: LegendreP error (bug?) in Mathematica
  • Next by thread: Re: LegendreP error (bug?) in Mathematica