       Problems with EllipticE[p,1/k] - bug or property?

• To: mathgroup at smc.vnet.net
• Subject: [mg20580] Problems with EllipticE[p,1/k] - bug or property?
• From: Robert Prus <robert at fuw.edu.pl>
• Date: Sat, 30 Oct 1999 14:54:54 -0400
• Organization: Warsaw University, Physics Department, Institute of Theoretical Physics
• Sender: owner-wri-mathgroup at wolfram.com

```Hi,

I try to check the identity:

EllipticE[ArcSin[Sqrt[k]Sin[p]],1/k]-(EllipticE[p,k]-(1-k)EllipticF[p,k])/Sqrt[k]==0

(it is taken from one of the the books: Abramowitz, Stegun or Gradshteyn,
Ryzhik with some corrections due to Mathematica notation).

Here are the calculations (I use Mathematica 3.0 for SGI):

First of all I check that functions EllipticE[p,k] and EllipticF[p,k] have
period Pi in p (in the sense of identities:

EllipticE[p+Pi,k] == 2EllipticE[k]+EllipticE[p,k]
EllipticF[p+Pi,k] == 2EllipticK[k]+EllipticF[p,k] ):

Mathematica 3.0 for Silicon Graphics
-- Motif graphics initialized --

In:= Table[EllipticE[p+Pi,k]-(2EllipticE[k]+EllipticE[p,k])/.{p->Random[],k->Random[]}//Chop,{10}]

Out= {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

In:= Table[EllipticE[p+Pi,k]-(2EllipticE[k]+EllipticE[p,k])/.{p->Random[Real,{-4Pi,4Pi}],k->Random[Real,{-10,10}]}//Chop,{10}]

Out= {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

In:= Table[EllipticF[p+Pi,k]-(2EllipticK[k]+EllipticF[p,k])/.{p->Random[],k->Random[]}//Chop,{10}]

Out= {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

In:= Table[EllipticF[p+Pi,k]-(2EllipticK[k]+EllipticF[p,k])/.{p->Random[Real,{-4Pi,4Pi}],k->Random[Real,{-10,10}]}//Chop,{10}]

Out= {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

then I check the identity for EllipticE[p,1/k]:

In:= eq=EllipticE[ArcSin[Sqrt[k]Sin[p]],1/k]-(EllipticE[p,k]-(1-k)EllipticF[p,k])/Sqrt[k]

1
Out= EllipticE[ArcSin[Sqrt[k] Sin[p]], -] -
k

EllipticE[p, k] - (1 - k) EllipticF[p, k]
>    -----------------------------------------
Sqrt[k]

In:= Table[eq/.{p->Random[Real,{-Pi/2,Pi/2}],k->Random[Real,{-10,10}]}//Chop,{10}]

Out= {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

In:= Table[eq/.{p->Random[Real,{0,Pi}],k->Random[Real,{-10,10}]}//Chop,{10}]

Out= {0, 0.520936 I, 0, 0, -1.90617 I, 0.363113 I, 0.0053501 I,

>    -1.00235 I, 0, 1.22196 I}

In:= Table[eq/.{p->Random[Real,{-Pi,Pi}],k->Random[Real,{-10,10}]}//Chop,{10}]

Out= {0, 0, -0.39191, 0, -0.0333185 I, 0, 0.364729 I, 0, 0, 0.0519677 I}

then I can plot the values of eq:

In:= f[pp_,kk_]:=Chop[N[eq/.{p->pp,k->kk}]]

In:= Plot3D[Re[f[p,k]],{p,-2Pi,2Pi},{k,-10,10}]

Out= -SurfaceGraphics-

In:= Plot3D[Im[f[p,k]],{p,-2Pi,2Pi},{k,-10,10}]

Out= -SurfaceGraphics-

I don't understand why Out and Out have entries different than 0.

Maybe the identity I check is valid only for p in interval (-Pi/2,Pi/2)?