Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

A workaround for an elliptic integral

  • To: mathgroup at smc.vnet.net
  • Subject: [mg76029] A workaround for an elliptic integral
  • From: dimitris <dimmechan at yahoo.com>
  • Date: Tue, 15 May 2007 04:48:29 -0400 (EDT)

In previous post I talked about the elliptic integral

In[30]:=
Integrate[Sqrt[(1 - x)/((x - 2)*(x^2 - 2*x + 3))], {x, 1, 2}]

which stays unevaluated in version 5.2 of Mathematica
whereas version 4.0 gets a closed form result.
(As I was informed version 6 also fails!)

So here it comes one approach of workaround. I look forward for any
kind of comments!

Here is the integrand

In[31]:=
g[x_] := Sqrt[(1 - x)/((x - 2)*(x^2 - 2*x + 3))]

Here is the indefinite integral

In[33]:=
G[x_] = Integrate[g[x], x]

Out[33]=
(2^(3/4)*(-2 + x)*Sqrt[(I + Sqrt[2] - I*x)/((-I + Sqrt[2])*(-1 +
x))]*Sqrt[(-I + Sqrt[2] + I*x)/((I + Sqrt[2])*(-1 + x))]*
   Sqrt[(1 - x)/(-6 + 7*x - 4*x^2 + x^3)]*EllipticPi[1 - I/Sqrt[2],
ArcSin[2^(1/4)*Sqrt[(-2 + x)/((-I + Sqrt[2])*(-1 + x))]],
    (-I + Sqrt[2])/(I + Sqrt[2])])/Sqrt[(-2 + x)/((-I + Sqrt[2])*(-1 +
x))]

Here is the verification

In[41]:=
Factor /@ Simplify[D[G[x], x]]

Out[41]=
Sqrt[-((-1 + x)/((-2 + x)*(3 - 2*x + x^2)))]

Define now

In[43]:=
GS[x] = FullSimplify[G[x], 1 < x < 2]

Out[43]=
(2^(3/4)*Sqrt[(I + Sqrt[2] - I*x)/(-I + Sqrt[2])]*(-2 + x)*Sqrt[-(I/
((-2 + x)*(I - 2*Sqrt[2] + (I + Sqrt[2])*x)))]*
   EllipticPi[1 - I/Sqrt[2], ArcSin[2^(1/4)*Sqrt[(-2 + x)/((-I +
Sqrt[2])*(-1 + x))]], (1/3)*(1 - 2*I*Sqrt[2])])/
  Sqrt[(-2 + x)/(-I + Sqrt[2])]

Here is an attempt of application of the Newton-Leibniz formula
in the integration range (GS is continouus there)

In[45]:=
lim = Limit[GS[x], x -> 2, Direction -> 1] - Limit[GS[x], x -> 1,
Direction -> -1]

Out[45]=
-Limit[(2^(3/4)*Sqrt[(I + Sqrt[2] - I*x)/(-I + Sqrt[2])]*(-2 +
x)*Sqrt[-(I/((-2 + x)*(I - 2*Sqrt[2] + (I + Sqrt[2])*x)))]*
     EllipticPi[1 - I/Sqrt[2], ArcSin[2^(1/4)*Sqrt[(-2 + x)/((-I +
Sqrt[2])*(-1 + x))]], (1/3)*(1 - 2*I*Sqrt[2])])/
    Sqrt[(-2 + x)/(-I + Sqrt[2])], x -> 1, Direction -> -1]

As we see Mathematica gets the limit at 2 (it is zero) and fails to
evaluate the limit at 1.

I think the reason for this failure is by ArcSin[2^(1/4)*Sqrt[(-2 + x)/
((-I + Sqrt[2])*(-1 + x))]].
For x->1, this expression diverges logarithmically.

In[85]:=
FullSimplify[Normal[Series[ArcSin[2^(1/4)*Sqrt[(-2 + x)/((-I +
Sqrt[2])*(-1 + x))]], {x, 1, 1}, Assumptions -> 1 < x < 2]]]
Limit[ArcSin[2^(1/4)*Sqrt[(-2 + x)/((-I + Sqrt[2])*(-1 + x))]], x ->
1, Direction -> -1]

Out[85]=
(1/8)*(-2*I + Sqrt[2] - (-2*I + Sqrt[2])*x + 4*ArcCot[Sqrt[2]] +
2*I*Log[6] - 4*I*Log[8] + 4*I*Log[-1 + x])

Out[86]=
DirectedInfinity[-I]

I will use the integral represantation of EllipticPi in order to
calculate
EllipticPi[1 - I/Sqrt[2], (-I)*Infinity, (1/3)*(1 - 2*I*Sqrt[2])].

In[87]:=
o = FullSimplify[Integrate[1/((1 - (1 - I/Sqrt[2])*Sin[=E8]^2)*Sqrt[1 -
(1/3)*(1 - 2*I*Sqrt[2])*Sin[=E8]^2]),
    {=E8, 0, (-I)*Infinity}, GenerateConditions -> False]]

Out[87]=
(-1 + I)*2^(3/4)*(EllipticPi[(((1 + I) - I*2^(1/4))*(5 + 2*I*Sqrt[2] +
2*Sqrt[6 + 6*I*Sqrt[2]]))/
     (((1 - I) + 2^(1/4))*(I + 2*Sqrt[2])), I*ArcSinh[Root[3 + 4*#1^2
+ 50*#1^4 + 4*#1^6 + 3*#1^8 & , 5]],
    -1 + 1/(1/2 + Root[12 - 76*#1^2 + 121*#1^4 & , 2])] -
   EllipticPi[(((1 - I) + 2^(1/4))*(-5*I + 2*Sqrt[2] + Root[1728 +
48*#1^2 + #1^4 & , 3]))/
     (((-1 + I) + 2^(1/4))*(I + 2*Sqrt[2])), I*ArcSinh[Root[3 + 4*#1^2
+ 50*#1^4 + 4*#1^6 + 3*#1^8 & , 5]],
    -1 + 1/(1/2 + Root[12 - 76*#1^2 + 121*#1^4 & , 2])])*Root[3 -
12*#1 + 14*#1^2 - 4*#1^3 + 3*#1^4 & , 2]

Here is a quick check of the last result

In[89]:=
{(N[#1, 30] & )[EllipticPi[1 - I/Sqrt[2], ArcSin[2^(1/4)*Sqrt[(-2 + x)/
((-I + Sqrt[2])*(-1 + x))]], (1/3)*(1 - 2*I*Sqrt[2])] /.
    x -> 1 + 10^(-40)], (N[#1, 30] & )[o],
  NIntegrate[1/((1 - (1 - I/Sqrt[2])*Sin[=E8]^2)*Sqrt[1 - (1/3)*(1 -
2*I*Sqrt[2])*Sin[=E8]^2]), {=E8, 0, (-I)*Infinity},
   WorkingPrecision -> 50, PrecisionGoal -> 30]}

Out[89]=
{0.231172407496034449016465231148189638820114680495`29.631822080262413
-

0=2E727329509018479709907956522274451298714332212402`30.129617292377752*I,

0=2E231172407496034449016465231148192196752982617568`29.631822080262413
-

0=2E727329509018479709907956522274448474978799078007`30.129617292377752*I,

0=2E231172407496034449016465231148189638755554362212`29.637614251854142
-

0=2E727329509018479709907956522274451297859216481608`30.13540946396948*I}

So that, by a replacement rule we have

In[92]:=
res = ToRadicals[lim /. EllipticPi[_, __] -> o]

Out[92]=
-((1/Sqrt[(1/2)*(-I - Sqrt[2])])*((2 - 2*I)*(1/3 + (2*I*Sqrt[2])/3 -
(1/2)*Sqrt[-(40/9) - (8*I*Sqrt[2])/9])*
    (-EllipticPi[(((1 - I) + 2^(1/4))*(-5*I + 2*Sqrt[2] + 2*Sqrt[6*(-1
- I*Sqrt[2])]))/(((-1 + I) + 2^(1/4))*(I + 2*Sqrt[2])),
       I*ArcSinh[Sqrt[-(1/3) + (4*I*Sqrt[2])/3 + (1/2)*Sqrt[-(160/9) -
(32*I*Sqrt[2])/9]]],
       -1 + 1/(1/2 - Sqrt[38/121 - (2*I*Sqrt[2])/121])] +
     EllipticPi[(((1 + I) - I*2^(1/4))*(5 + 2*I*Sqrt[2] + 2*Sqrt[6 +
6*I*Sqrt[2]]))/(((1 - I) + 2^(1/4))*(I + 2*Sqrt[2])),
      I*ArcSinh[Sqrt[-(1/3) + (4*I*Sqrt[2])/3 + (1/2)*Sqrt[-(160/9) -
(32*I*Sqrt[2])/9]]],
      -1 + 1/(1/2 - Sqrt[38/121 - (2*I*Sqrt[2])/121])])))

Check

In[98]:=
{N[res, 30], NIntegrate[Sqrt[(1 - x)/((x - 2)*(x^2 - 2*x + 3))], {x,
1, 2}, WorkingPrecision -> 60, MaxRecursion -> 12,
   PrecisionGoal -> 30]}

Out[98]=
{0.975261536923865518804845371749299297277448206407`30.15051499783199
+ 0``30.16139390130114*I,

0=2E975261536923865518804845371747769411552590737095`30.189694608876156
+ 0``30.2005735123453*I}

Recall that 4's result is a little simpler.

In[108]:=
math4 = (1/9)*Sqrt[(2/3)*(-2 - 5*I*Sqrt[2])]*
   (Sqrt[3*(7 - 4*I*Sqrt[2])]*EllipticPi[1 + I/Sqrt[2],
ArcSin[Sqrt[(1/3)*I*(2*I + Sqrt[2])]], (1/3)*(1 + 2*I*Sqrt[2])] +
    3*I*(I + Sqrt[2])*(EllipticF[ArcSin[Sqrt[-1 - I/Sqrt[2]]], 1/3 -
(2*I*Sqrt[2])/3] -
      EllipticPi[2/3 - (I*Sqrt[2])/3, ArcSin[Sqrt[-1 - I/Sqrt[2]]],
1/3 - (2*I*Sqrt[2])/3]));

Obviously "playing" a little someone can show the equivalence of the
two expressions.
FullSimplify fails.

In[110]:=
Developer`ZeroQ[math4 - res]

Out[110]=
True


Dimitris



  • Prev by Date: Re: Compatibility woes
  • Next by Date: Guessing "exact" values
  • Previous by thread: Re: Launching Mathematica kernel with Windows 'start' command in
  • Next by thread: Guessing "exact" values