Elliptic integrals, general form

elliptic integralsimproper-integralsintegration

According to https://mathworld.wolfram.com/EllipticIntegral.html, Elliptic integrals are integrals of the form of equation (1).

I am trying to convert an integral of the form

$$\int_{|x_+|}^\infty \frac{dx}{\sqrt{(x^2-x_-^2)(x^2-x_+^2)}}$$

To express as a function of elliptic integrals, where $|x_+|>|x_-|$, we can take $x_+>0$ for simplicity. We can easily see that this integral converges, and that it is real.

I have trying following the method outline in the webpage I linked, with no success, because of the arising of imaginary roots in the process. However, plugging this expression into mathematica with $x_-=1$, $x_+=2$, yields me the expression :

$$\int_{2}^\infty \frac{dx}{\sqrt{(x^2-1)(x^2-4)}}=\frac{i}{2}K(\frac{3}{4})+K(4)$$

Where $K(m) = \int_0^{\pi/2}\frac{1}{\sqrt{1-m\sin^2(\phi)}}d\phi$. Now clearly the integral I'm looking to re-express is well-defined, and real, but it would appear I get an complex number as an answer. However, looking closer, $K(4)$ will be complex because the parameter $m>1$. Thus, if we numerically compute the expression the imaginary parts cancel and we are left with a real answer, which is correct.

So my question is as follows : when we say that Elliptic integrals (as defined in my link) are expressible as a function of the three "kinds" of elliptic integrals (+ elementary functions), do we allow "complex" elliptic integrals ? In other words, is there any way to express my example as a function of "well defined" elliptic integrals, in the sense that we only integrate real numbers ?

I am unsure if I expressed myself clearly, I hope it makes sense.

Best Answer

The given integral is $K(1/2)/2$ (convention!), but i will try to follow also a geometric path, the canonical one, detailed in the given particular case $x_-=1$, and $x_+=2$, so that things are easier to type. There will be also numerical check (also for intermediate steps), so that i can calmly sleep tonight.


Let us recall the Complete elliptic integral of the first kind: $$ K(k) = \int_0^{\pi/2}\frac{d\theta}{\sqrt{1-k^2\sin^2\theta}} = \int_0^1 \frac {dt}{\sqrt{(1-t^2)(1-k^2t^2)}}\ . $$ See also DLMF on Elliptic integrals, where $K(k)=F(\pi/2,k)$, and in the definition of $F$ the above convention is used.

Note that the above convention differs from the convention used by Mathematica, as also remarked in loc. cit. .

Taking in the last integral $k=\frac 12$ we obtain an integral "similar" to the given one, at least under the integral, but the limits of integration differ. What can we do?

The lower integration limit $0$ is the point of symmetry for $(1-t^2)(1-k^2t^2)$, and $1$ is one of its roots. In our case, for $(x^2-1)(x^2-4)$ the value $2$ is also a root, so the substitution $t=2/x$ is natural. We get for the given integral $I$ (well, let us have this handy notation): $$ \begin{aligned} I&= \int_{2}^\infty \frac1{\sqrt{(x^2-1)(x^2-4)}}\; dx \\ &= \int_1^0 \frac1{\sqrt{\left(\frac 4{t^2}-1\right)\left(\frac 4{t^2}-4\right)}}\; \left(-\frac 2{t^2}\right)\; dt \\ &= \int_0^1 \frac1{\sqrt{(4-t^2)(4- 4t^2)}}\; 2\; dt \\ &= \frac12 \int_0^1 \frac1{\sqrt{(1-\frac 14t^2)(1- 1t^2)}}\; dt \\ &=\frac 12K\left(\frac 12\right)\ . \end{aligned} $$


Numerical check using sage, which also suffers from the same convention as Mathematica.

sage: var('x,t');
sage: I = integral( 1/sqrt( (x^2-1)*(x^2-4) ), x, 2, oo, hold=1 )
sage: I.n()
0.8428751774069201
sage: def K(k):    return elliptic_kc(k^2)    # convention
sage: K(1/2).n() / 2
0.842875177406298

pari/gp has the wiki convention, a numerical check using pari, taking advantage of the implementation of ellK, recently made public, October 2020, is as follows:

? intnum(x=2, oo, 1/sqrt( (x^2-1)*(x^2-4) ))
%1 = 0.84287517740629802143560182889542910036

? \p 60
   realprecision = 77 significant digits (60 digits displayed)

? intnum(x=2, oo, 1/sqrt( (x^2-1)*(x^2-4) ))
%2 = 0.842875177406298021435601828899538494750400447070248008383945

? ellK(1/2)/2
%3 = 0.842875177406298021435601828899538494750400447070544522059974

It seems that Mathematica goes an other way when evaluating the given integral, thus delivering a value which reflects 19.7.3 in DLMF, Legendre's relations, explicitly: $$K(1/k) = k(K(k)\mp iK(k')\ ,\qquad k^2 + {k'}^2=1\ .$$ In our case, with $k=1/2$, we get $K(2)=\frac 12(K(1/2)\mp iK(\sqrt{3/2}))$. This is compatible with the result of Mathematica, written in its convention.

This is already an answer to the question.

$\square$



A possible digression: Please ignore, if it feels not related to the question. This is inserted for my own purpose, so that i can find it next time as an explicit example. For me there is a natural relation, the most natural way to deal with elliptic integrals is to see them explicitly in relation with elliptic curves. We will obtain (after an expensive tour) an other realization of the given integral in terms of the complete elliptic integral, $K(\sqrt{8/9})/3$.

The given integral can be written as $$ \color{blue}{ I = \int_{(2,0)}^{\infty}\frac{dx}y } \ , $$ and it can be considered on the compact manifold $Q(\Bbb R)$ or $\Bbb C$, where $Q$ is the "quartic curve" (an algebraic variety, thus analytic, thus smooth manifold) with affine equation $$ Q\ :\ y^2 =(x-1)(x+1)(x-2)(x+2)\ . $$ (The infinity point is the point $(0:1:0)$ which verifies the projective form, the homogenized form of this equation, $y^2z^2=(x-z)(x+z)(x-2z)(x+2z)$.)

The idea is to obtain a birational morphism to an elliptic curve.


We use the (birational) transformations: $$ \left\{ \begin{aligned} x &=-\frac 4Y(X-5)\ ,\\ y &=2-\frac 4{Y^2}X(X-5)^2\ , \end{aligned} \right. \qquad \left\{ \begin{aligned} X &=-\frac 4{x^2}(y-2)\ ,\\ Y &=\frac 1{x^3}(16(y-2)+20x^2)\ , \end{aligned} \right. $$ and then $$ y^2- (x^2-1)(x^2-4) = \frac{16(X - 5)^3}{Y^4}\cdot(-Y^2+ X^3 - 5X^2- 16X + 80)\ , $$ so we have a passage to the elliptic curve with the equation from the last parentesis, $$ Y^2 =(X-5)(X-4)(X+4)\ . $$ We may (or may not) want to keep it simple (and unstructural), thus involve only the substitution $$ x = -\frac{4(X-5)}{\sqrt{(X-4)(X+4)(X-5)}} \ . $$ We have already made the "natural choice" for the square root. Note that for $X=2$ we obtain $x=2$. And $X\searrow -4$ implies $x\nearrow \infty$.


The structure or brute force computations shows now that we have: $$ \color{blue}{ I= \int_2^\infty\frac {dx}{\sqrt{(x^2-1)(x^2-4)}} = \int_{-4}^2 \frac {dX}{\sqrt{(X-4)(X+4)(X-5)}}\ . } $$ This is the passage from the integral on the quartic to an integral on the elliptic curve written in Weierstraß form.


Instead of a proof, here is a numerical check using pari/gp:

? \p 60
   realprecision = 77 significant digits (60 digits displayed)
? intnum( x=2, oo, 1/sqrt( (x^2-1)*(x^2-4) ) )
%2 = 0.842875177406298021435601828899538494750400447070248008383945
? intnum( X=-4, 2, 1/sqrt( (X-4)*(X+4)*(X-5) ) )
%3 = 0.842875177406298021435601828899538494750400447070446045891423

We are thus in the position to calculate the integral of the canonical differential on the elliptic curve $E$ with equation $$ (E)\qquad Y^2=(X-e_1)(X-e_2)(X-e_3)\ ,\qquad e_1,e_2,e_3=5,4,-4,\ e_1>e_2>e_3\ . $$ The limit of integration $e_1=-4$ corresponds to one torsion point of order two, $(e_1,0)$. The other $2$-torsion points are $(e_2,0)$, and $(e_3,0)$. Can we give a structural sense to the limit of integration $2$ from the blue realtion?!

Yes, the points $(2,\pm 6)$ are ($\Bbb Q$-rational) points on $E$, and they are $4$-torsion points. For this reason we have the chain of relations: $$ \begin{aligned} I &= \int_2^\infty\frac {dx}{\sqrt{(x^2-1)(x^2-4)}} \\ &= \int_{-4}^2 \frac {dX}{\sqrt{(X+4)(X-4)(X-5)}} = \int_2^4 \frac {dX}{\sqrt{(X+4)(X-4)(X-5)}} \\ &=\frac12\int_{e_3=-4}^{e_2=4} \frac {dX}{\sqrt{(X-e_1)(X-e_2)(X-e_3)}} \\ &=\frac 12\omega_1(E)\qquad\text{(real half-period of the elliptic curve $E$)} \\ &=\frac 1{\sqrt{e_1-e_3}}K\left(\sqrt{\frac{e_2-e_3}{e_1-e_3}}\right) \\ &=\frac 1{\sqrt{5-(-4)}}K\left(\sqrt{\frac{4-(-4)}{5-(-4)}}\right) \\ &=\frac 13 K\left(\frac{2\sqrt 2}3\right)\ . \end{aligned} $$

Let us numerically check again, pari/gp.

? intnum(x=2, oo, 1/sqrt( (x^2-1)*(x^2-4) ))
%10 = 0.842875177406298021435601828899538494750400447070248008383945
? ellK(sqrt(8/9))/3
%11 = 0.842875177406298021435601828899538494750400447070544522059974

Addendum. Computer algebra support for the elliptic curve computations.

Using sage:

sage: var('x,y,X,Y');
sage: def f(x,y): return y^2 - (x^2-1)*(x^2-4)
sage: factor( f(-4*(X-5)/Y, 2-4*X*(X-5)^2/Y^2) )
16*(X^3 - 5*X^2 - Y^2 - 16*X + 80)*(X - 5)^3/Y^4
sage: E = EllipticCurve(QQ, [0, -5, 0, -16, 80])
sage: E
Elliptic Curve defined by y^2 = x^3 - 5*x^2 - 16*x + 80 over Rational Field
sage: for T in E.torsion_points():
....:     if T != E(0):
....:         print(f"Order {T.order()} for the torsion point {T.xy()}")
....: 
Order 2 for the torsion point (-4, 0)
Order 4 for the torsion point (2, -6)
Order 4 for the torsion point (2, 6)
Order 2 for the torsion point (4, 0)
Order 2 for the torsion point (5, 0)
Order 4 for the torsion point (8, -12)
Order 4 for the torsion point (8, 12)

This structural aspect explains why, when we compute the integrals of the canonical differential form $\frac{dX}Y$ of $E$ on the intervals delimited (in $\Bbb R$) by the points $$ -\infty\ ,\ -4\ ,\ 2\ ,\ 4\ ,\ 5\ ,\ 8\ ,\ +\infty $$ we obtain numerically the values for the integral of $(\ (X-4)(X+4)(X-5)\ )^{-1/2}$ on the delimited intervals... (I am taking the absolute value to not confuse sage.)

sage: f = 1/sqrt( abs((X-4)*(X+4)*(X-5)) )
sage: integral(f, X, -oo, -4, hold=True).n()
1.07825782381822
sage: integral(f, X, -4, 2, hold=True).n()
0.8428751689072135
sage: integral(f, X, 2, 4, hold=True).n()
0.8428751680336899
sage: integral(f, X, 4, 5, hold=True).n()
1.0782578072972744
sage: integral(f, X, 5, 8, hold=True).n()
0.8428751637656617
sage: integral(f, X, 8, oo, hold=True).n()
0.8428751775376374

And the above values are related to the periods of $(E)$:

sage: L = E.period_lattice()
sage: L
Period lattice associated to 
    Elliptic Curve defined by y^2 = x^3 - 5*x^2 - 16*x + 80 over Rational Field
sage: L.gens()
(1.68575035481260, 1.07825782374982*I)
sage: L.gens()[0]/2
0.842875177406298
Related Question