Navigation

Operators and Keywords

Function List:

C++ API

: k = ellipke (m)
: k = ellipke (m, tol)
: [k, e] = ellipke (…)

Compute complete elliptic integrals of the first K(m) and second E(m) kind.

m must be a scalar or real array with -Inf ≤ m ≤ 1.

The optional input tol controls the stopping tolerance of the algorithm and defaults to eps (class (m)). The tolerance can be increased to compute a faster, less accurate approximation.

When called with one output only elliptic integrals of the first kind are returned.

Mathematical Note:

Elliptic integrals of the first kind are defined as

         1
        /               dt
K (m) = |------------------------------
        / sqrt ((1 - t^2)*(1 - m*t^2))
       0

Elliptic integrals of the second kind are defined as

         1
        /  sqrt (1 - m*t^2)
E (m) = | ------------------ dt
        /  sqrt (1 - t^2)
       0

Reference: Milton Abramowitz and Irene A. Stegun, Handbook of Mathematical Functions, Chapter 17, Dover, 1965.

See also: ellipj.

Package: octave