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 Copyright 1988-97 Wolfram Research, Inc. -- Motif graphics initialized -- In[1]:= Table[EllipticE[p+Pi,k]-(2EllipticE[k]+EllipticE[p,k])/.{p->Random[],k->Random[]}//Chop,{10}] Out[1]= {0, 0, 0, 0, 0, 0, 0, 0, 0, 0} In[2]:= Table[EllipticE[p+Pi,k]-(2EllipticE[k]+EllipticE[p,k])/.{p->Random[Real,{-4Pi,4Pi}],k->Random[Real,{-10,10}]}//Chop,{10}] Out[2]= {0, 0, 0, 0, 0, 0, 0, 0, 0, 0} In[3]:= Table[EllipticF[p+Pi,k]-(2EllipticK[k]+EllipticF[p,k])/.{p->Random[],k->Random[]}//Chop,{10}] Out[3]= {0, 0, 0, 0, 0, 0, 0, 0, 0, 0} In[4]:= Table[EllipticF[p+Pi,k]-(2EllipticK[k]+EllipticF[p,k])/.{p->Random[Real,{-4Pi,4Pi}],k->Random[Real,{-10,10}]}//Chop,{10}] Out[4]= {0, 0, 0, 0, 0, 0, 0, 0, 0, 0} then I check the identity for EllipticE[p,1/k]: In[5]:= eq=EllipticE[ArcSin[Sqrt[k]Sin[p]],1/k]-(EllipticE[p,k]-(1-k)EllipticF[p,k])/Sqrt[k] 1 Out[5]= EllipticE[ArcSin[Sqrt[k] Sin[p]], -] - k EllipticE[p, k] - (1 - k) EllipticF[p, k] > ----------------------------------------- Sqrt[k] In[6]:= Table[eq/.{p->Random[Real,{-Pi/2,Pi/2}],k->Random[Real,{-10,10}]}//Chop,{10}] Out[6]= {0, 0, 0, 0, 0, 0, 0, 0, 0, 0} In[7]:= Table[eq/.{p->Random[Real,{0,Pi}],k->Random[Real,{-10,10}]}//Chop,{10}] Out[7]= {0, 0.520936 I, 0, 0, -1.90617 I, 0.363113 I, 0.0053501 I, > -1.00235 I, 0, 1.22196 I} In[8]:= Table[eq/.{p->Random[Real,{-Pi,Pi}],k->Random[Real,{-10,10}]}//Chop,{10}] Out[8]= {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[9]:= f[pp_,kk_]:=Chop[N[eq/.{p->pp,k->kk}]] In[10]:= Plot3D[Re[f[p,k]],{p,-2Pi,2Pi},{k,-10,10}] Out[10]= -SurfaceGraphics- In[11]:= Plot3D[Im[f[p,k]],{p,-2Pi,2Pi},{k,-10,10}] Out[11]= -SurfaceGraphics- I don't understand why Out[7] and Out[8] have entries different than 0. Maybe the identity I check is valid only for p in interval (-Pi/2,Pi/2)? Any comments? RP -------------------- Robert Prus, robert at fuw.edu.pl Institute of Theoretical Physics, Warsaw University Hoza 69, 00-681 Warsaw, Poland