gives the complete elliptic integral of the first kind .


  • Mathematical function, suitable for both symbolic and numerical manipulation.
  • EllipticK is given in terms of the incomplete elliptic integral of the first kind by .
  • EllipticK[m] has a branch cut discontinuity in the complex m plane running from to .
  • For certain special arguments, EllipticK automatically evaluates to exact values.
  • EllipticK can be evaluated to arbitrary numerical precision.
  • EllipticK automatically threads over lists.
  • EllipticK can be used with Interval and CenteredInterval objects. »


open allclose all

Basic Examples  (5)

Evaluate numerically:

Plot over a subset of the reals:

Plot over a subset of the complexes:

Series expansion at the origin:

Series expansion at Infinity:

Scope  (38)

Numerical Evaluation  (5)

Evaluate to high precision:

The precision of the output tracks the precision of the input:

Evaluate numerically for complex arguments:

Evaluate EllipticK efficiently at high precision:

EllipticK threads elementwise over lists:

EllipticK can be used with Interval and CenteredInterval objects:

Specific Values  (5)

Simple exact values are generated automatically:

Some exact values in terms of Gamma after applying FunctionExpand:

Find directional limiting values at branch cuts:

Value at infinity:

Find the root of the equation TemplateBox[{m}, EllipticK]=2:

Visualization  (2)

Plot EllipticK:

Plot the real part of TemplateBox[{{x, +, {ⅈ,  , y}}}, EllipticK]:

Plot the imaginary part of TemplateBox[{{x, +, {ⅈ,  , y}}}, EllipticK]:

Function Properties  (9)

EllipticK is defined for all real values less than 1:

EllipticK takes all real positive values:

EllipticK is not an analytic function:

Has both singularities and discontinuities:

EllipticK is not a meromorphic function:

EllipticK is nondecreasing on its domain:

EllipticK is injective:

EllipticK is not surjective:

EllipticK is non-negative on its domain:

EllipticK is convex on its domain:

Differentiation  (3)

First derivative:

Higher derivatives:

Formula for the ^(th) derivative:

Integration  (3)

Indefinite integral of EllipticK:

Definite integral over an interval lying on the branch cut:

More integrals:

Series Expansions  (3)

Taylor expansion for EllipticK:

Plot the first three approximations for EllipticK around :

Series expansions at branch points:

EllipticK can be applied to power series:

Integral Transforms  (3)

Compute the Laplace transform using LaplaceTransform:



Function Representations  (5)

Relation to other elliptic integrals:

Relation to the LegendreP:

Represent in terms of MeijerG using MeijerGReduce:

EllipticK can be represented as a DifferentialRoot:

TraditionalForm formatting:

Applications  (5)

Small-angle approximation to the period of a pendulum:

Plot the period versus the initial angle:

Vector potential due to a circular current flow, in cylindrical coordinates:

The components of the magnetic field:

Plot the magnitude of the magnetic field:

Resistance between the origin and the point in an infinite 3D lattice of unit resistors:

Energy for the Onsager solution of the Ising model:

Plot of the specific heat:

Find the critical temperature:

Calculate a singular value:

Properties & Relations  (4)

This shows the branch cuts of the EllipticK function:

Numerically find a root of a transcendental equation:

Solve a differential equation:

EllipticK is a particular case of various mathematical functions:

Possible Issues  (3)

Machine-precision evaluation can result in numerically inaccurate answers near branch cuts:

The defining integral converges only under additional conditions:

Different argument conventions exist that result in modified results:

Neat Examples  (1)

Probability that a random walker in a 3D cubic lattice returns to the origin:

Carry out a modeling run of 1000 walks and count how many it returns to the origin:

Compare with the expected count at :

Wolfram Research (1988), EllipticK, Wolfram Language function, https://reference.wolfram.com/language/ref/EllipticK.html (updated 2022).


Wolfram Research (1988), EllipticK, Wolfram Language function, https://reference.wolfram.com/language/ref/EllipticK.html (updated 2022).


Wolfram Language. 1988. "EllipticK." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/EllipticK.html.


Wolfram Language. (1988). EllipticK. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/EllipticK.html


@misc{reference.wolfram_2022_elliptick, author="Wolfram Research", title="{EllipticK}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/EllipticK.html}", note=[Accessed: 18-August-2022 ]}


@online{reference.wolfram_2022_elliptick, organization={Wolfram Research}, title={EllipticK}, year={2022}, url={https://reference.wolfram.com/language/ref/EllipticK.html}, note=[Accessed: 18-August-2022 ]}