Special functions

Jacobi Elliptic Functions: Sine and Cosine, Generalized

The sine function can be defined by inverting an integral: \( z = \int_0^w\frac{dt}{\sqrt{1 - t^2}} \) gives \( z = \arcsin w \), so \( w = \sin z \). Put an extra factor under the root, \( \sqrt{(1 - t^2)(1 - k^2t^2)} \), and the same trick produces the Jacobi elliptic functions \(\operatorname{sn}\), \(\operatorname{cn}\), \(\operatorname{dn}\). They behave like sine and cosine, with addition theorems, derivative rules and periods, but with one spectacular difference: in the complex plane they have two independent periods. And they are not exotic: the exact motion of a pendulum is described by them.

1. The elliptic integral of the first kind

1° Elliptic integral of the first kind The integral \[ z = \int_0^w\frac{dt}{\sqrt{(1 - t^2)(1 - k^2t^2)}} \qquad (|k| < 1) \tag{1} \] is called the elliptic integral of the first kind. It exists for real \(w\) with \(|w| \le 1\), and can be continued analytically to other values of \(w\). With \( t = \sin\theta \) and \( w = \sin\varphi \) it takes the form \[ z = \int_0^\varphi\frac{d\theta}{\sqrt{1 - k^2\sin^2\theta}}. \tag{2} \]

The number \(k\) is the modulus. The name "elliptic" comes from the arc length of an ellipse, which leads to integrals of this kind (of the second kind, strictly speaking; see the post on arc length). Such integrals are not elementary: no combination of logarithms, trigonometric and algebraic functions has derivative \( \frac{1}{\sqrt{(1 - t^2)(1 - k^2t^2)}} \). So instead of trying to evaluate them, we accept them as new functions.

(Form (2) follows from (1) by \( dt = \cos\theta\,d\theta \) and \( \sqrt{1 - t^2} = \cos\theta \). The singularity at \(t = 1\) in (1) is integrable, like \(\frac{1}{\sqrt{1 - t}}\), which is why \(w = 1\) is allowed.)

2. Inverting it: amplitude and sn, cn, dn

The key idea, due to Abel and Jacobi: study the integral not as a function of its upper limit, but its inverse, the upper limit as a function of the value \(z\). This is exactly how \(\sin\) arises from \(\arcsin\), and the inverse functions turn out to be far nicer than the integrals.

Definitions For a fixed \(k\):
  • the function \( \varphi = f(z) \) defined by (2) is the amplitude: \( \varphi = \operatorname{am}z = \operatorname{am}(z, k) \);
  • the function \( w = g(z) \) defined by (1) is the elliptic sine: \( w = \operatorname{sn}z = \operatorname{sn}(z, k) \). So \( \operatorname{sn}z = \sin(\operatorname{am}z) \).
By analogy with trigonometric functions, one also introduces \[ \operatorname{cn}z = \sqrt{1 - \operatorname{sn}^2z}, \qquad \operatorname{dn}z = \sqrt{1 - k^2\operatorname{sn}^2z}. \]

Since \(\operatorname{sn}z = \sin\varphi\), we have \( \operatorname{cn}z = \cos(\operatorname{am}z) \) and \( \operatorname{dn}z = \sqrt{1 - k^2\sin^2\varphi} = \frac{d\varphi}{dz} \). The square roots are taken with \( \operatorname{cn}0 = \operatorname{dn}0 = 1 \), and then continued continuously; so \(\operatorname{cn}\) does become negative (just as \(\cos\) is \(+\sqrt{1 - \sin^2}\) only on part of its domain). In this sense, the basic identities are

\[ \operatorname{sn}^2z + \operatorname{cn}^2z = 1, \qquad k^2\operatorname{sn}^2z + \operatorname{dn}^2z = 1. \]
1 −1 K 2K 3K 4K sn cn dn sin
Figure 1. \(\operatorname{sn}z\) (blue), \(\operatorname{cn}z\) (red) and \(\operatorname{dn}z\) (green) for real \(z\) and \(k = 0.8\), over one full period \(4K \approx 7.98\). For comparison, \(\sin z\) (dashed grey) has period \(2\pi \approx 6.28\). \(\operatorname{sn}\) and \(\operatorname{cn}\) look like a slightly "squared-off" sine and cosine; \(\operatorname{dn}\) oscillates between \(k' = 0.6\) and \(1\).

3. The limiting cases \(k = 0\) and \(k = 1\)

\(k = 0\)\(k = 1\)
integral (1)\( \int_0^w\frac{dt}{\sqrt{1 - t^2}} = \arcsin w \)\( \int_0^w\frac{dt}{1 - t^2} = \operatorname{artanh}w \)
\(\operatorname{sn}z\)\(\sin z\)\(\tanh z\)
\(\operatorname{cn}z\)\(\cos z\)\( \frac{1}{\cosh z} \)
\(\operatorname{dn}z\)\(1\)\( \frac{1}{\cosh z} \)
\(K\)\(\frac\pi2\)\(\infty\)

So the elliptic functions interpolate between the trigonometric functions (\(k = 0\)) and the hyperbolic functions (\(k = 1\)). As \(k\) grows from \(0\) to \(1\), the period \(4K\) grows from \(2\pi\) to infinity, and the graph of \(\operatorname{sn}\) gets flatter at the top, spending longer near \(\pm1\).

4. Double periodicity

2° Periods The function \(\operatorname{sn}z\) has two fundamental periods, \(4K\) and \(2iK'\), where \[ K = \int_0^1\frac{dt}{\sqrt{(1 - t^2)(1 - k^2t^2)}}, \qquad K' = \int_0^1\frac{dt}{\sqrt{(1 - t^2)(1 - k'^2t^2)}}, \] and \(k\) and \(k'\) are related by \( k' = \sqrt{1 - k^2} \) (the complementary modulus).
  • \(\operatorname{cn}z\) has the periods \(4K\) and \(2K + 2iK'\);
  • \(\operatorname{dn}z\) has the fundamental periods \(2K\) and \(4iK'\).

The real period. \(K\) is the value of the integral up to \(w = 1\): the "quarter period", the analogue of \(\frac\pi2\). As \(z\) goes from \(0\) to \(K\), \(\operatorname{sn}\) rises from \(0\) to \(1\); then, as for the sine, it comes back down, goes to \(-1\) at \(3K\), and returns to \(0\) at \(4K\). In terms of the amplitude: \( \operatorname{am}(z + 2K) = \operatorname{am}z + \pi \), which flips the sign of \(\sin\) and \(\cos\) (so they need \(4K\)) but not of \(\sqrt{1 - k^2\sin^2}\) (so \(\operatorname{dn}\) needs only \(2K\)).

The imaginary period is the new feature. In the complex plane, \(\operatorname{sn}\) also repeats when \(z\) moves by \(2iK'\). The values of \(\operatorname{sn}\) on the whole plane are thus determined by its values on one period parallelogram (here a rectangle with sides \(4K\) and \(2K'\)), and the plane is tiled by copies of it. A function with two independent periods, analytic except for poles, is called elliptic; Jacobi's functions are the classical examples. (Theorem of Jacobi: a nonconstant analytic function cannot have three independent periods, and a nonconstant elliptic function must have poles; \(\operatorname{sn}\) has simple poles at \(iK'\) and \(2K + iK'\) in each parallelogram.)

Example 1 · Numbers for \(k = 0.6\) Then \(k' = 0.8\), \( K \approx 1.7508 \), \( K' \approx 1.9953 \). The periods of \(\operatorname{sn}\) are \( 4K \approx 7.003 \) and \( 2iK' \approx 3.991i \). At the quarter period: \( \operatorname{sn}K = 1 \), \( \operatorname{cn}K = 0 \), \( \operatorname{dn}K = k' = 0.8 \). (All periods were also checked numerically at a complex point.)

5. Addition theorems and derivatives

3° 1) Addition theorems With the common denominator \( \Delta = 1 - k^2\operatorname{sn}^2z_1\operatorname{sn}^2z_2 \): \[ \operatorname{sn}(z_1 + z_2) = \frac{\operatorname{sn}z_1\operatorname{cn}z_2\operatorname{dn}z_2 + \operatorname{cn}z_1\operatorname{dn}z_1\operatorname{sn}z_2}{\Delta}, \] \[ \operatorname{cn}(z_1 + z_2) = \frac{\operatorname{cn}z_1\operatorname{cn}z_2 - \operatorname{sn}z_1\operatorname{sn}z_2\operatorname{dn}z_1\operatorname{dn}z_2}{\Delta}, \] \[ \operatorname{dn}(z_1 + z_2) = \frac{\operatorname{dn}z_1\operatorname{dn}z_2 - k^2\operatorname{sn}z_1\operatorname{sn}z_2\operatorname{cn}z_1\operatorname{cn}z_2}{\Delta}. \]

Set \(k = 0\): \(\operatorname{dn} = 1\), \(\Delta = 1\), and these become \( \sin(z_1 + z_2) = \sin z_1\cos z_2 + \cos z_1\sin z_2 \) and the cosine formula. The elliptic versions have the extra \(\operatorname{dn}\) factors and the denominator. (Check at \(k = 0.6\), \(z_1 = 0.4\), \(z_2 = 0.9\): both sides of the \(\operatorname{sn}\) formula equal \(0.93416\).)

3° 2) Derivatives \[ (\operatorname{sn}z)' = \operatorname{cn}z\operatorname{dn}z, \qquad (\operatorname{cn}z)' = -\operatorname{sn}z\operatorname{dn}z, \qquad (\operatorname{dn}z)' = -k^2\operatorname{sn}z\operatorname{cn}z. \]
Sign error in the book The book has \( (\operatorname{dn}z)' = k^2\operatorname{sn}z\operatorname{cn}z \), without the minus sign. Differentiate \( \operatorname{dn}^2z = 1 - k^2\operatorname{sn}^2z \): \( 2\operatorname{dn}\cdot\operatorname{dn}' = -2k^2\operatorname{sn}\cdot\operatorname{cn}\operatorname{dn} \), so \( \operatorname{dn}' = -k^2\operatorname{sn}\operatorname{cn} \). It must be negative: on \( (0, K) \), \(\operatorname{dn}\) decreases from \(1\) to \(k'\) (Figure 1) while \(\operatorname{sn}, \operatorname{cn} > 0\). (Numerically at \(k = 0.6\), \(z = 0.7\): \(\operatorname{dn}'(0.7) = -0.1761\).)

Why the derivatives look like this. By (1), \( \frac{dz}{dw} = \frac{1}{\sqrt{(1 - w^2)(1 - k^2w^2)}} \), so

\[ \frac{d}{dz}\operatorname{sn}z = \sqrt{(1 - \operatorname{sn}^2z)(1 - k^2\operatorname{sn}^2z)} = \operatorname{cn}z\operatorname{dn}z. \]

The other two follow by differentiating \( \operatorname{cn}^2 = 1 - \operatorname{sn}^2 \) and \( \operatorname{dn}^2 = 1 - k^2\operatorname{sn}^2 \). Note how they mirror \( (\sin)' = \cos \), \( (\cos)' = -\sin \), with the third function \(\operatorname{dn}\) as an extra factor. In particular \( \operatorname{am}'z = \operatorname{dn}z \).

6. Application: the pendulum

For small swings, a pendulum of length \(L\) is a harmonic oscillator with period \( T_0 = 2\pi\sqrt{L/g} \). For large swings the equation \( \ddot\theta + \frac gL\sin\theta = 0 \) is nonlinear, and its exact solution uses elliptic functions. With amplitude \(\theta_0\) and modulus \( k = \sin\frac{\theta_0}{2} \):

\[ \sin\frac{\theta(t)}{2} = k\,\operatorname{sn}\Big(\sqrt{\tfrac gL}\,t + K,\ k\Big), \qquad T = 4K(k)\sqrt{\frac Lg}. \]

(Energy conservation gives \( \dot\theta^2 = \frac{2g}{L}(\cos\theta - \cos\theta_0) \); the substitution \( \sin\frac\theta2 = k\sin\phi \) turns the time integral into exactly form (2).)

Example 2 · A pendulum released from horizontal \( \theta_0 = 90^\circ \): \( k = \sin45^\circ = \frac{1}{\sqrt2} \), \( K \approx 1.8541 \). So \[ \frac{T}{T_0} = \frac{4K}{2\pi} = \frac{2K}{\pi} \approx 1.180: \] the period is 18% longer than the small-angle formula predicts. As \(\theta_0 \to 180^\circ\), \(k \to 1\), \(K \to \infty\): a pendulum balanced upside down takes forever to fall.

7. Summary

ConceptFormula
Elliptic integral (1st kind)\( z = \int_0^w\frac{dt}{\sqrt{(1 - t^2)(1 - k^2t^2)}} = \int_0^\varphi\frac{d\theta}{\sqrt{1 - k^2\sin^2\theta}} \)
Inverse functions\( \varphi = \operatorname{am}z \), \( \operatorname{sn}z = \sin\operatorname{am}z = w \), \( \operatorname{cn}z = \cos\operatorname{am}z \), \( \operatorname{dn}z = \sqrt{1 - k^2\operatorname{sn}^2z} \)
Identities\( \operatorname{sn}^2 + \operatorname{cn}^2 = 1 \), \( k^2\operatorname{sn}^2 + \operatorname{dn}^2 = 1 \)
Quarter periods\( K = K(k) \), \( K' = K(k') \), \( k' = \sqrt{1 - k^2} \)
Periodssn: \(4K, 2iK'\); cn: \(4K, 2K + 2iK'\); dn: \(2K, 4iK'\)
Derivatives\( \operatorname{sn}' = \operatorname{cn}\operatorname{dn} \), \( \operatorname{cn}' = -\operatorname{sn}\operatorname{dn} \), \( \operatorname{dn}' = -k^2\operatorname{sn}\operatorname{cn} \)
Limits\(k = 0\): \(\sin, \cos, 1\); \(k = 1\): \(\tanh, \operatorname{sech}, \operatorname{sech}\)

8. Practice problems

Try each one before opening the solution. More solved problems from this topic are in Complex Numbers.

Problem 1: Find \(\operatorname{sn}\), \(\operatorname{cn}\), \(\operatorname{dn}\) at \(z = 2K\) and \(z = 0\).

\(z = 0\): \(0, 1, 1\). \(z = 2K\) (amplitude \(\pi\)): \( \operatorname{sn} = 0 \), \( \operatorname{cn} = -1 \), \( \operatorname{dn} = 1 \).

Problem 2: Show that \(\operatorname{sn}\) is odd and \(\operatorname{cn}\), \(\operatorname{dn}\) are even.

The integrand in (1) is even in \(t\), so the integral is odd in \(w\); its inverse \(\operatorname{sn}\) is odd. Then \(\operatorname{cn}\) and \(\operatorname{dn}\), which depend on \(\operatorname{sn}^2\) and equal \(1\) at \(0\), are even.

Problem 3: Show that \(y = \operatorname{sn}z\) satisfies \( y'^2 = (1 - y^2)(1 - k^2y^2) \) and \( y'' = -(1 + k^2)y + 2k^2y^3 \).

The first is \( (\operatorname{cn}\operatorname{dn})^2 \) rewritten. Differentiating it: \( 2y'y'' = y'\big(-2(1 + k^2)y + 4k^2y^3\big) \); divide by \(2y'\).

Problem 4: Use the addition theorem to find \( \operatorname{sn}(z + K) \).

With \( \operatorname{sn}K = 1 \), \( \operatorname{cn}K = 0 \), \( \operatorname{dn}K = k' \): numerator \( \operatorname{cn}z\operatorname{dn}z \), denominator \( 1 - k^2\operatorname{sn}^2z = \operatorname{dn}^2z \). So \( \operatorname{sn}(z + K) = \frac{\operatorname{cn}z}{\operatorname{dn}z} \), the analogue of \( \sin(z + \frac\pi2) = \cos z \).

Problem 5: What is \(K\) for \(k \to 0\), to first correction?

\( K = \int_0^{\pi/2}(1 - k^2\sin^2\theta)^{-1/2}d\theta \approx \int_0^{\pi/2}\big(1 + \tfrac12k^2\sin^2\theta\big)d\theta = \frac\pi2\big(1 + \frac{k^2}{4}\big) \).

Problem 6: By how much does the period of a pendulum with amplitude \(30^\circ\) exceed \(T_0\)?

\( k = \sin15^\circ \approx 0.259 \). By Problem 5, \( \frac{T}{T_0} = \frac{2K}{\pi} \approx 1 + \frac{k^2}{4} \approx 1.017 \): about 1.7%.

Final thoughts

Jacobi's elliptic functions come from one idea: invert the integral. The elliptic integral of the first kind cannot be expressed in elementary terms, but its inverse \(\operatorname{sn}\) behaves like a sine, with companions \(\operatorname{cn}\) and \(\operatorname{dn}\), addition theorems and derivative rules that reduce to the trigonometric ones at \(k = 0\). What is genuinely new appears in the complex plane: two independent periods, \(4K\) and \(2iK'\), which make these functions doubly periodic. And they describe real physics, such as the pendulum at large amplitude.

Related posts: arc length (the ellipse and elliptic integrals), the Gamma and Beta functions, and the hypergeometric function (\(K = \frac\pi2 F(\frac12, \frac12, 1, k^2)\)).