# Elliptic Integrals and Jacobi Elliptic Functions

*Elliptic integrals* originally appeared in the calculation of arc lengths of ellipses.
Later it was found that a larger class of integrals could be reduced to three
kinds of elliptic integrals in *Legendre form*.

The *Jacobi elliptic functions* are the inverses of the elliptic
integrals. There are three Jacobi functions, *sn*, *cn*, and
*dn*. There are also 9 *minor* Jacobi functions
that are defined in terms of the first three.

## Elliptic Integrals

The Special class provides an implementation of complete and incomplete elliptic integrals of the first, second and third kind.

Some ambiguity exists in the definition of these functions.
For functions that take one parameter, the parameter is the *elliptic modulus*.
For functions that takes two arguments, the additional parameter is the *amplitude*.

Method | Description |
---|---|

Complete elliptic integral of the first kind | |

Incomplete elliptic integral of the first kind | |

Complete elliptic integral of the second kind | |

Incomplete elliptic integral of the second kind | |

Complete elliptic integral of the third kind | |

Incomplete elliptic integral of the third kind |

## Jacobi Elliptic Functions

The Special class
provides an implementation of the three major an nine minor Jacobi elliptic functions.
The second parameter of these functions has multiple definitions.
We use the modulus, *k*. The squared modulus, usually named *m*,
is also used, where *m = k ^{2}*.
The relationship between the parameterizations is as follows:

*sn(u, k) = sn(u | m) = sn(u | k ^{2})*,

*cn(u, k) = cn(u | m) = cn(u | k*,

^{2})*dn(u, k) = dn(u | m) = dn(u | k*.

^{2})The Jacobi elliptic functions have the form JacobiPQ, where P and Q are one of the 4 letters, S, C, D, N. The main functions are JacobiSN(Double, Double), JacobiCN(Double, Double), and JacobiDN(Double, Double). The minor functions are JacobiNS(Double, Double), JacobiNC(Double, Double), JacobiND(Double, Double) (reciprocals of the main functions), JacobiSC(Double, Double), JacobiCS(Double, Double), JacobiSD(Double, Double), JacobiDS(Double, Double), JacobiCD(Double, Double), and JacobiDC(Double, Double).