| |
 |
|
|
Science Forum Index » Math - Symbolic Forum » elliptic integral (reloaded!)
Page 1 of 1
|
| Author |
Message |
| dimitris |
Posted: Mon May 14, 2007 10:01 am |
|
|
|
Guest
|
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!)
Although the response of David Cantrell offered a workaround
and its second post giving clear explanation made its
solution look less magic I continued to think about another
solution.
So here it comes. 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/ *(-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] = FullSimplify[Integrate[1/((1 - (1 - I/Sqrt[2])*Sin[è]^2)*Sqrt[1 -
(1/3)*(1 - 2*I*Sqrt[2])*Sin[è]^2]),
{è, 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[è]^2)*Sqrt[1 - (1/3)*(1 -
2*I*Sqrt[2])*Sin[è]^2]), {è, 0, (-I)*Infinity},
WorkingPrecision -> 50, PrecisionGoal -> 30]}
Out[89]{0.231172407496034449016465231148189638820114680495`29.631822080262413
-
0.727329509018479709907956522274451298714332212402`30.129617292377752*I,
0.231172407496034449016465231148192196752982617568`29.631822080262413
-
0.727329509018479709907956522274448474978799078007`30.129617292377752*I,
0.231172407496034449016465231148189638755554362212`29.637614251854142
-
0.727329509018479709907956522274451297859216481608`30.13540946396948*I}
So that, by a replacement rule we simply 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.975261536923865518804845371747769411552590737095`30.189694608876156
+ 0``30.2005735123453*I}
Dimitris |
|
|
| Back to top |
|
| Peter Pein |
Posted: Mon May 14, 2007 10:47 pm |
|
|
|
Guest
|
Hi Dimitris,
I often observed, that Integrate does the job better on Integrals with
at least one limit at +/- infinity. Therefore I tried this:
In[1]:=
f[x_] = Sqrt[(1 - x)/((x - 2)*(x^2 - 2*x + 3))];
g[y_] = Simplify[ExpandAll[TrigToExp[
f[x]*Dt[x] /. x -> (3 + Tanh[y])/2 /. Dt[y] -> 1]]]
Out[2]=
(2*E^(2*y)*Sqrt[(E^(2*y)*(1 + E^(2*y))^2)/
(2 + 4*E^(2*y) + 3*E^(4*y))])/(1 + E^(2*y))^2
In[3]:=
Integrate[%, {y, -Infinity, Infinity}]
Out[3]=
-((1/Sqrt[(3*I)/(4*I - 2*Sqrt[2])])*
(I*(EllipticF[I*Log[Sqrt[2 - I/Sqrt[2]] +
Sqrt[-((3*I)/(-2*I + Sqrt[2]))]],
(2*I - Sqrt[2])/(2*I + Sqrt[2])] +
EllipticPi[1 + I/Sqrt[2],
I*Log[Sqrt[(1/3)*(5 - I*Sqrt[2])] +
Sqrt[-((2*I)/(-2*I + Sqrt[2]))]],
(2*I - Sqrt[2])/(2*I + Sqrt[2])] -
EllipticPi[(1/3)*(2 + I*Sqrt[2]),
I*Log[Sqrt[2 - I/Sqrt[2]] +
Sqrt[-((3*I)/(-2*I + Sqrt[2]))]],
(2*I - Sqrt[2])/(2*I + Sqrt[2])])))
In[4]:=
Chop[N[%, 20]]
Out[4]=
0.97526153692386551880
Peter |
|
|
| Back to top |
|
| dimitris |
Posted: Tue May 15, 2007 10:08 am |
|
|
|
Guest
|
W O W!
Dimitris
Ï/Ç Peter Pein Ýãñáøå:
Quote: Hi Dimitris,
I often observed, that Integrate does the job better on Integrals with
at least one limit at +/- infinity. Therefore I tried this:
In[1]:> f[x_] = Sqrt[(1 - x)/((x - 2)*(x^2 - 2*x + 3))];
g[y_] = Simplify[ExpandAll[TrigToExp[
f[x]*Dt[x] /. x -> (3 + Tanh[y])/2 /. Dt[y] -> 1]]]
Out[2]> (2*E^(2*y)*Sqrt[(E^(2*y)*(1 + E^(2*y))^2)/
(2 + 4*E^(2*y) + 3*E^(4*y))])/(1 + E^(2*y))^2
In[3]:> Integrate[%, {y, -Infinity, Infinity}]
Out[3]> -((1/Sqrt[(3*I)/(4*I - 2*Sqrt[2])])*
(I*(EllipticF[I*Log[Sqrt[2 - I/Sqrt[2]] +
Sqrt[-((3*I)/(-2*I + Sqrt[2]))]],
(2*I - Sqrt[2])/(2*I + Sqrt[2])] +
EllipticPi[1 + I/Sqrt[2],
I*Log[Sqrt[(1/3)*(5 - I*Sqrt[2])] +
Sqrt[-((2*I)/(-2*I + Sqrt[2]))]],
(2*I - Sqrt[2])/(2*I + Sqrt[2])] -
EllipticPi[(1/3)*(2 + I*Sqrt[2]),
I*Log[Sqrt[2 - I/Sqrt[2]] +
Sqrt[-((3*I)/(-2*I + Sqrt[2]))]],
(2*I - Sqrt[2])/(2*I + Sqrt[2])])))
In[4]:> Chop[N[%, 20]]
Out[4]> 0.97526153692386551880
Peter |
|
|
| Back to top |
|
| |
|
Page 1 of 1
All times are GMT - 5 Hours
The time now is Mon Dec 01, 2008 9:45 pm
|
|