JOVANA
Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

Elliptic Integrals & Elliptic Functions

A real swinging pendulum and the true perimeter of an ellipse both refuse to be measured by elementary functions. Meet the integrals that finally close those classic problems, and the doubly periodic functions hiding inside them.

Two ancient problems that won't behave

Start with a problem you think you already own: the perimeter of an ellipse. A circle of radius r has circumference 2 pi r — clean, elementary, done in first-year calculus. So you reach for the arc-length formula, plug in the ellipse x = a cos theta, y = b sin theta, and confidently set up the integral. What comes out is the integral from 0 to 2 pi of square root of (a^2 sin^2 theta + b^2 cos^2 theta) d theta. And then everything stops. There is no elementary antiderivative for that square root. The ellipse — the second most basic curve there is — has a perimeter that no finite combination of polynomials, roots, exponentials, logs, and trig functions can express.

The pendulum tells the same story. You met the small-angle pendulum as a simple harmonic oscillator: theta'' = -(g/L) sin theta, and the textbook quietly replaces sin theta by theta to get a clean period 2 pi square root of (L/g) that does not depend on the swing size. But that is a lie for any real swing. Keep the true sin theta, ask for the exact period of a pendulum released from amplitude theta_0, and you again land on an integral of the form 1 over square root of (something minus something times sin^2). The honest pendulum and the honest ellipse hand you the very same shape — and that shape has a name.

Naming the answer: the four Legendre forms

When calculus refuses to give a formula, the mature move is to name the function we need — exactly how the logarithm was once invented as the antiderivative of 1/x, and how erf was named for the bell curve in the previous guide. Here the family of problematic integrals is broad: any integral of a rational function of theta and the square root of a cubic or quartic is called an elliptic integral — see elliptic integral (non-elementary). Legendre showed that every one of them can be reduced, by standard substitutions, to just a handful of canonical building blocks. We only need two basic shapes.

The two shapes are the elliptic integrals of the first and second kind, written with a free upper limit phi (the amplitude) and a number k between 0 and 1 (the modulus, which sets the eccentricity of the square root). Keep the upper limit phi free and you get the incomplete integrals; push the limit all the way to pi/2 — a full quarter period — and you get the complete integrals K(k) and E(k). That gives four named objects total: F and E incomplete, K and E complete. The notation collides a little — E is used for the second kind in both the complete and incomplete cases — so always read whether an amplitude argument is present.

Incomplete (upper limit phi is free):
  F(phi, k) = integral_0^phi  d theta / sqrt(1 - k^2 sin^2 theta)      (first kind)
  E(phi, k) = integral_0^phi  sqrt(1 - k^2 sin^2 theta) d theta        (second kind)

Complete (set phi = pi/2, a full quarter turn):
  K(k) = F(pi/2, k) = integral_0^{pi/2}  d theta / sqrt(1 - k^2 sin^2 theta)
  E(k) = E(pi/2, k) = integral_0^{pi/2}  sqrt(1 - k^2 sin^2 theta) d theta

Endpoints:  K(0) = E(0) = pi/2 ;   E(1) = 1 ;   K(k) -> +infinity as k -> 1
The two kinds, incomplete and complete. First kind has the square root downstairs; second kind has it upstairs. Setting phi = pi/2 turns each incomplete integral into its complete partner.

A sanity check that ties it to first-year calculus: set k = 0. The square root collapses to 1, and F(phi, 0) = integral from 0 to phi of d theta = phi, while E(phi, 0) = phi too. So at zero modulus the elliptic integrals are just the identity function — they ARE the elementary case, dressed up. The modulus k measures exactly how far you have departed from the elementary world. A small k means a nearly circular ellipse or a tiny pendulum swing, and you can recover the familiar answers as the leading term of a series in k.

Putting them to work: pendulum and ellipse

Here is the payoff for the pendulum, worked as a picture. Use conservation of energy to express the angular speed at angle theta, separate variables, and integrate over a quarter swing. After the clean substitution sin(theta/2) = sin(theta_0/2) sin(phi) — a trigonometric move in the same family as a trig substitution — the messy quarter-swing integral folds exactly into F(pi/2, k), which is K(k), with modulus k = sin(theta_0/2).

The exact period is therefore T = 4 square root of (L/g) times K(sin(theta_0/2)). Read what this says. When the amplitude theta_0 is tiny, k is near 0, K(0) = pi/2, and T collapses back to the familiar 2 pi square root of (L/g) — the small-angle answer falls out as the limiting case, not as an accident. But as you let the pendulum swing wider, k grows, K(k) grows, and the real period gets LONGER than the textbook value: a pendulum released from 90 degrees takes about 18 percent longer per swing than the small-angle formula predicts. As theta_0 approaches 180 degrees (balanced at the top), k approaches 1, K(k) diverges logarithmically, and the period runs off to infinity — exactly right, because a pendulum balanced upright never comes back.

The ellipse is the second-kind story. Its perimeter is 4 a times E(e), where a is the semi-major axis, e is the eccentricity, and E is the complete second-kind integral — the complete elliptic integral. A circle is the case e = 0, where E(0) = pi/2 and the perimeter is 4 a times pi/2 = 2 pi a, the circumference you already know. The arc length from the top of the ellipse down to a general point, on the other hand, is an INcomplete second-kind integral E(phi, e) — see the incomplete elliptic integral — because now the upper limit stops partway. "Complete" versus "incomplete" is just "the whole quarter" versus "as far as you've gotten."

Computing them, and not fearing the word "non-elementary"

It is tempting to feel that a non-elementary integral is somehow second-class — that you've failed if the answer isn't a tidy formula. Drop that feeling. K(k) is computed by one of the most beautiful algorithms in numerical mathematics: the arithmetic-geometric mean. You take two numbers, repeatedly replace them by their ordinary average and their geometric average (the square root of their product), and the two sequences rush toward a common limit with the number of correct digits roughly DOUBLING each step. Three or four iterations already give machine precision.

  1. Recognize the shape. Whenever an integral contains the square root of a cubic or quartic polynomial — or an expression you can massage into 1 over square root of (1 minus k^2 sin^2 theta) — suspect an elliptic integral, not a failure of your technique.
  2. Reduce to Legendre form. By standard substitutions, push the integral into one of the canonical F, E shapes and read off the amplitude phi and the modulus k. This is the real skill — after it, the work is done.
  3. Hand it to a routine. Call the built-in K, E, F, or the arithmetic-geometric mean, and collect fifteen digits. A named non-elementary function is no harder to evaluate than sin or log.

Inverting the integral: elliptic functions appear

Now the deep turn. Recall a Volume I fact you may not have framed this way: ordinary sine is the INVERSE of an integral. If you write u = integral from 0 to x of dt over square root of (1 minus t^2), that integral is just arcsin x, so x = sin u. Sine is what you get by inverting the simplest arc-length integral. So ask the obvious question: what do you get by inverting the ELLIPTIC arc-length integral instead?

What you get is a brand new pair of periodic functions. Set u = F(phi, k) and then invert: define sn(u, k) = sin phi, cn(u, k) = cos phi, and dn(u, k) = square root of (1 minus k^2 sin^2 phi). These are the Jacobi elliptic functions — see Jacobi elliptic functions. They are sine and cosine's richer cousins. They obey familiar-looking identities, sn^2 + cn^2 = 1 and k^2 sn^2 + dn^2 = 1, and clean derivatives, d(sn)/du = cn times dn. When k = 0 they collapse exactly back to sn = sin, cn = cos, dn = 1; when k = 1 they degenerate into the hyperbolic functions, sn = tanh, cn = dn = sech.

The headline property is double periodicity. Ordinary sine has one period, 2 pi, marching along the real line. Allow the argument of sn to be complex and a second, independent period appears in the imaginary direction. The function then repeats over an entire lattice of parallelograms tiling the complex plane — it is periodic in two directions at once, which no nonconstant elementary function can be. The cleanest embodiment of this lattice structure is the Weierstrass P-function, built directly from a lattice and satisfying the differential equation (P')^2 = 4 P^3 minus g_2 P minus g_3 — the very equation of an elliptic curve, the bridge from this corner of calculus to number theory and cryptography.

And the loop closes back on the pendulum. The exact angular motion of the nonlinear pendulum — not the small-angle fake, the real thing — is written in closed form as theta(t) involving sn. The same functions describe a spinning rigid body, the cnoidal and solitary waves of shallow water, and oscillations in nonlinear circuits. Wherever the small-angle linearization is too crude and you need the true nonlinear oscillation, sn, cn, and dn are the honest answer that ordinary sine and cosine simply cannot give.