When is an elliptic integral expressible in terms of elementary functions?

A consideration of Aryabhata's answer to the linked question shows that there is a map from the elliptic curve $y^2 = P(x)$ to the conic $v^2 = u^2 + 2$ given by $$(x,y) \mapsto \left(x - \dfrac{1}{x}, \dfrac{y}{x}\right),$$ and the differential $$\dfrac{1+x^2}{(1-x^2)\sqrt{1 + x^4}} \,\mathrm dx$$ on the elliptic curve is the pull-back of the differential $$\dfrac{1}{u v}\,\mathrm du$$ on the conic.

Since a conic has genus zero (i.e. it can be parameterized by a single variable, using a classical "$t$-substitution"), the integral of a differential on a conic can always be expressed via elementary functions. Thus the same is true of the integral of the original differential on the elliptic curve.

The answer to the general question is the same: if the differential in question can be pulled back from a map to a rational curve (i.e. a genus zero curve), then the "elliptic integral" in question can be in fact integrated via elementary functions.

For example, any elliptic curve $y^2 = P(x)$ has a map to the the $x$-line given by $(x,y) \mapsto x$. So if the integral only involves rational functions of $x$ (which will be the case when $y$ appears to even powers, since we can always substitute $P(x)$ for $y^2$) then it can be computed in elementary terms. Also, if $P(x)$ has repeated roots, then the curve $y^2 = P(x)$ itself is actually rational (it can be parameterized by a variation of the classical $t$-substitution for conics), and so any "elliptic integral" is actually elementarily integrable.

P.S. I have used some geometric terminology here (pull-back, differential, elliptic curve, rational curve) because the modern point of view on this material is via algebraic geometry. If some of this is unfamiliar, leave a comment and I (or someone else) can elaborate.

Added: If we have a curve $C$ (which could be our elliptic curve $y^2 = P(x)$, or our rational curve $v^2 = u^2 + 2$, or just the $x$-line, or ...) and if $\omega$ is a differential on $C$, then finding the indefinite integral of $\omega$ means finding some function $f$ on $C$ such that $\omega = df$.

Now if $\varphi: C' \to C$ is a map of curves, then $\varphi^* \omega = \varphi^* d f = d (f\circ \varphi).$ So $f\circ \varphi$ is an indefinite integral of the pulled back differential $\varphi^*\omega$.

In particular, if $f$ is an elementary function of the coordinates on $C$, and $\varphi$ is given by expressions which are elementary functions of the coordinates, than the composite $f\circ \varphi$ will again be given by elementary functions of the coordinates.

This is what is happening in your example. Explicitly, on our curve $v^2 = u^2 + u,$ we had for example the differential $$\dfrac{1}{u v} \,\mathrm du = \frac{1}{2 u^2 v}\,\mathrm d (u^2 + 2) = \frac{1}{2(v^2-2)v}\,\mathrm d(v^2) = \dfrac{1}{v^2-2}\,\mathrm dv = \dfrac{1}{2\sqrt{2}}\mathrm d\log\bigl( \frac{v-\sqrt{2}}{v+\sqrt{2}}\bigr).$$ Now pulling back this differential via our map $\varphi:(x,y)\mapsto \left(x-\dfrac{1}{x}, \dfrac{y}{x}\right)$ we obtain $$\dfrac{1 + x^2}{(1-x^2)y}\,\mathrm dx = \dfrac{1}{2\sqrt{2}}\mathrm d\log\bigl(\frac{y-\sqrt{2}x}{y+\sqrt{2}x} \bigr).$$

As this example shows, pulling back is just the theoretical terminology for making a substitution, just as a map of curves is just theoretical terminology for a change of variables.

If memory serves, Miles Reid's wonderful book Undergraduate algebraic geometry discusses some of this, and in particular gives some of the history of how the analytic theory of elliptic integrals turned into the algebro-geometric theory of elliptic curves. (If you don't know this book, don't be fooled by the title --- it is a great introduction to the subject for someone at any level, not just undergraduates!) A much more detailed history can be found in Dieudonne's book on the history of algebraic geometry, but that book is probably not very readable unless you already have some feeling for algebraic geometry as a subject.


(This was intended to be yet another comment, but it got too big for the comment box.)

I finally got a chance to look at the venerable Handbook of Elliptic Integrals for Engineers and Scientists by Byrd and Friedman, and there is indeed a short discussion there on pseudoelliptic integrals, which I shall quote in part:

One frequently encounters integrals that have all the appearances of being elliptic but which can ultimately be expressed solely in terms of elementary functions. These ... are called pseudoelliptic integrals, and can always be evaluated as

$$v_0(t)+\sum_{j=1}^m b_j\ln\;v_j(t)$$

where the $b_j$ are constants and the $v_j(t)$ are algebraic functions. One need not, however, be too concerned at the outset about whether or not his integral at hand is genuinely elliptic, because the substitutions given in this book for the reduction and evaluation of elliptic integrals will lead to the right results (without additional labor) even though the integral might turn out to be elementary. We give several important examples.

...

...the more general integral

$$\int\frac{t\cdot R(t^2)}{\sqrt{at^4+bt^2+c}}\mathrm dt$$

($R(u)$ a rational function in $u$) ... reduces to integrals involving odd powers of Jacobi elliptic functions, and can thus always be ultimately evaluated in terms of elementary functions.

A general case of a less obvious pseudoelliptic integral is

$$\int \frac{R(t^2)}{\sqrt{(1-t^2)(1-k^2 t^2)}}\mathrm dt=\int \frac{R(\sin^2\theta)}{\sqrt{1-k^2\sin^2\theta}}\mathrm d\theta=\int R(\mathrm{sn}^2(u,k))\mathrm du$$

when... for all values of $t$ any one of the following relations holds:

$$\begin{cases}R(t^2)+R\left(\frac1{k^2 t^2}\right)&=0\\R(t^2)+R\left(\frac{1-k^2 t^2}{k^2(1-t^2)}\right)&=0\\R(t^2)+R\left(\frac{1-t^2}{1-k^2 t^2}\right)&=0\end{cases}$$

...

(emphasis mine)

Since it's a handbook intended for use by nonspecialists, there's not much discussion of the conditions where an "elliptic integral" is in fact pseudoelliptic; I'd imagine advanced textbooks on the elliptic integrals would discuss the matter, but I have not been able to find any.


I might be coming at this too late to interest anyone, but let me build on Matt E's answer. Suppose that we have a elliptic curve $E$ given as $y^2 = P(x)$ and a differential form $\eta = f(x, \sqrt{P(x)}) dx/\sqrt{P(x)}$ on $E$. We would like to know whether or not there is a map $\phi: \eta \to \mathbb{P}^1$, and a differential form $\omega$ on $\mathbb{P}^1$, such that $\eta = \phi^* \omega$. I'll explain how to solve this, using the current problem as an example.

Recall that $dx/\sqrt{P(x)}$ has no zeroes or poles on $E$. So the poles of $\eta$ are precisely those of $f(x, \sqrt{P(x)}$. In our case, $f$ has poles at the points where $1-x^2 =0$, namely the four points $(x,y) = (\pm 1, \pm \sqrt{2})$. If $\eta = \phi^* \omega$, then the poles of $\eta$ will occur at precisely the preimages of the poles of $\omega$. Moreover, if $\phi(a) = b$, with $\phi$ ramified of order $e$ at $a$, then the residue of $\phi^* \omega$ at $a$ is going to be $e$ times the residue of $\omega$ at $b$. So we can guess which poles of $\eta$ come from the same pole of $\omega$ by seeing which ones have residues which are in positive rational ratios.

In this case, the residue is $1/ \sqrt{2}$ at $(1, \sqrt{2})$ and $(-1, - \sqrt{2})$, and is $- 1/ \sqrt{2}$ at $(1, -\sqrt{2})$ and $(1, - \sqrt{2})$. So the most obvious guess is that $\phi(1, \sqrt{2}) = \phi(-1, -\sqrt{2})$ and $\phi(-1, \sqrt{2}) = \phi(-1, \sqrt{2})$, with branching of equal orders at these points. If I were going to write a careful algorithm, I'd have to consider other possibilities, but I'll just try this possibility.

So, we would like to know whether or not there is a rational function $\phi$ on $E$, of degree $2$, with $\phi(1, \sqrt{2}) = \phi(-1, -\sqrt{2})$ and $\phi(-1, \sqrt{2}) = \phi(-1, \sqrt{2})$, and with branching of some order $e$ at all these points? In other words, does $e (1, \sqrt{2}) + e (-1, -\sqrt{2}) = e (-1, \sqrt{2}) + e (-1, \sqrt{2})$ in the group law of $E$? Note that if you just chose $4$ random points on an elliptic curve, there would be no relations between them in the group law, consistent with the fact that there are usually no elementary solutions to elliptic integrals.

In this case, we win! Notice that the line $y= \sqrt{2} x$ is tangent to $E$ at the points $(1, \sqrt{2})$ and $(-1, -\sqrt{2})$. Similarly, $y = -\sqrt{2} x$ is tangent to $E$ at the other two points. So $2 \cdot (1, \sqrt{2}) + 2 \cdot (-1, -\sqrt{2}) = 2 \cdot (-1, \sqrt{2}) + 2 \cdot (-1, \sqrt{2}).$

Explicitly, the map $\phi$ should be $x \mapsto (\sqrt{x^4+1} - \sqrt{2} \cdot x)/(\sqrt{x^4+1} + \sqrt{2} \cdot x)$. We know that $\omega$ should be a form which has poles of residue $1/2 \sqrt{2}$ at $0$ and $\infty$, so it should be $du/2 \sqrt{2} u$.

Ask your favorite computer algebra system to pullback $du/2 \sqrt{2} u$ along $x \mapsto (\sqrt{x^4+1} - \sqrt{2} \cdot x)/(\sqrt{x^4+1} + \sqrt{2} \cdot x)$. It will whine a lot but, if you make it keep expanding and factoring, you will get the original integrand.


I think Hardy's monograph The Integration of Functions of a Single Variable discusses this but I'm not sure.