# §22.20 Methods of Computation

## §22.20(i) Via Theta Functions

A powerful way of computing the twelve Jacobian elliptic functions for real or complex values of both the argument and the modulus is to use the definitions in terms of theta functions given in §22.2, obtaining the theta functions via methods described in §20.14.

## §22.20(ii) Arithmetic-Geometric Mean

Given real or complex numbers , with not real and negative, define

for , where the square root is chosen so that , where and are chosen so that their difference is numerically less than . Then as sequences , converge to a common limit , the arithmetic-geometric mean of . And since

22.20.2

convergence is very rapid.

For real and , use (22.20.1) with , , , and continue until is zero to the required accuracy. Next, compute , where

22.20.3

and the inverse sine has its principal value (§4.23(ii)). Then

and the subsidiary functions can be found using (22.2.10).

### ¶ Example

To compute , , to 10D when , .

Four iterations of (22.20.1) lead to . From (22.20.3) and (22.20.4) we obtain and . Then from (22.20.5), , , .

## §22.20(iii) Landen Transformations

By application of the transformations given in §§22.7(i) and 22.7(ii), or can always be made sufficently small to enable the approximations given in §22.10(ii) to be applied. The rate of convergence is similar to that for the arithmetic-geometric mean.

### ¶ Example

To compute to 6D for , , .

From (22.7.1), and . From the first two terms in (22.10.6) we find . Then by using (22.7.4) we have .

If needed, the corresponding values of and can be found subsequently by applying (22.10.4) and (22.7.2), followed by (22.10.5) and (22.7.3).

## §22.20(iv) Lattice Calculations

If either or is given, then we use , , , and , obtaining the values of the theta functions as in §20.14.

If are given with and , then can be found from

using the arithmetic-geometric mean.

### ¶ Example 1

If , then three iterations of (22.20.1) give , and from (22.20.6) —in agreement with the value of ; compare (23.17.3) and (23.22.2).

### ¶ Example 2

If , then four iterations of (22.20.1) give .

## §22.20(v) Inverse Functions

See Wachspress (2000).

## §22.20(vi) Related Functions

can be computed from its definition (22.16.1) or from its Fourier series (22.16.9). Alternatively, Sala (1989) shows how to apply the arithmetic-geometric mean to compute .

Jacobi’s epsilon function can be computed from its representation (22.16.30) in terms of theta functions and complete elliptic integrals; compare §20.14. Jacobi’s zeta function can then be found by use of (22.16.32).

## §22.20(vii) Further References

For additional information on methods of computation for the Jacobi and related functions, see the introductory sections in the following books: Lawden (1989), Curtis (1964b), Milne-Thomson (1950), and Spenceley and Spenceley (1947).