scipy.special.

ellipk#

scipy.special.ellipk(m,out=None)#

Complete elliptic integral of the first kind.

This function is defined as

\[K(m) = \int_0^{\pi/2} [1 - m \sin(t)^2]^{-1/2} dt\]
Parameters:
marray_like

The parameter of the elliptic integral.

outndarray, optional

Optional output array for the function values

Returns:
Kscalar or ndarray

Value of the elliptic integral.

See also

ellipkm1

Complete elliptic integral of the first kind around m = 1

ellipkinc

Incomplete elliptic integral of the first kind

ellipe

Complete elliptic integral of the second kind

ellipeinc

Incomplete elliptic integral of the second kind

elliprf

Completely-symmetric elliptic integral of the first kind.

Notes

For more precision around point m = 1, useellipkm1, which thisfunction calls.

The parameterization in terms of\(m\) follows that of section17.2 in[1]. Other parameterizations in terms of thecomplementary parameter\(1 - m\), modular angle\(\sin^2(\alpha) = m\), or modulus\(k^2 = m\) are alsoused, so be careful that you choose the correct parameter.

The Legendre K integral is related to Carlson’s symmetric R_Ffunction by[2]:

\[K(m) = R_F(0, 1-k^2, 1) .\]

Array API Standard Support

ellipk has experimental support for Python Array API Standard compatiblebackends in addition to NumPy. Please consider testing these featuresby setting an environment variableSCIPY_ARRAY_API=1 and providingCuPy, PyTorch, JAX, or Dask arrays as array arguments. The followingcombinations of backend and device (or other capability) are supported.

Library

CPU

GPU

NumPy

n/a

CuPy

n/a

PyTorch

JAX

⚠️ no JIT

Dask

n/a

SeeSupport for the array API standard for more information.

References

[1]

Milton Abramowitz and Irene A. Stegun, eds.Handbook of Mathematical Functions with Formulas,Graphs, and Mathematical Tables. New York: Dover, 1972.

[2]

NIST Digital Library of MathematicalFunctions.http://dlmf.nist.gov/, Release 1.0.28 of2020-09-15. See Sec. 19.25(i)https://dlmf.nist.gov/19.25#i

On this page