MathGroup Archive 2006

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

Search the Archive

Re: Problem with LegendreQ

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67592] Re: Problem with LegendreQ
  • From: "sashap" <pavlyk at gmail.com>
  • Date: Sat, 1 Jul 2006 05:12:41 -0400 (EDT)
  • References: <e82o59$r5g$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Michael,

There is no problem with Mathematica's LegendreQ. In fact there is a
typo
is A&S. The correct identity reads:

LegendreQ[-1/2, 0, 3, x] = Sqrt[2/(x+1)] * EllipticK[ 2/(x+1) ]

Notice that LegendreQ[-1/2,x] is a short form of

LegendreQ[-1/2, 0, 2, x], that is LegendreQ[-1/2, x] has different
branch-cut
structure than LegendreQ[-1/2, 0, 3, x].

The typo in A&S becomes apparent if you compare

In[2]:= LegendreP[-2^(-1), x]

Out[2]= (2*EllipticK[(1 - x)/2])/Pi

to AS which incorrectly gives
  LegendreP[-1/2,x] == (2*EllipticK[ Sqrt[ (1 - x)/2 ]  ])/Pi.

Oleksandr Pavlyk,
Special Functions Developer
Wolfram Research

mmandelberg at comcast.net wrote:
> I seem to be getting incorrect numerical results for the LegendreQ[n,x]
> function.  For example I get:
>
>
>
> LegendreQ[-1/2,5]//N     =    1.00108 -1.17142 i
>
>
> so that the imaginary part is not zero.  However, using the identity
> (Abramowitz and Stegun 8.3.13):
>
> LegendreQ[-1/2, x] = Sqrt[2/(x+1)] * EllipticK[Sqrt[2/(x+1)]]
>
> The answer should be:
>
> Sqrt[2/(5+1)]EllipticK[Sqrt[2/(5+1)]]//N
> 
>  1.11187
> 
> 
> Michael Mandelberg


  • Prev by Date: Re: when dimension increases
  • Next by Date: Re: SetOptions for Notebooks
  • Previous by thread: RE: SetOptions for Notebooks
  • Next by thread: Re: Problem with LegendreQ