ellipticIntegralK

Evaluates the complete elliptic integral of the kind K(x).

Synopsis

ellipticIntegralK (x)

Required Arguments

float x (Input)
Argument for which the function value is desired.

Return Value

The complete elliptic integral K(x).

Description

The complete elliptic integral of the first kind is defined to be

K(x)=π/20dθ[1xsin2θ]1/2 for 0x<1

The argument x must satisfy 0x<1; otherwise, ellipticIntegralK returns machine(2), the largest representable floating-point number. For more information, see the description for machine.

The function K(x) is computed using the routine ellipticIntegralRF and the relation K(x)=RF(0,1x,1).

Example

The integral K(0) is evaluated.

from __future__ import print_function
from numpy import *
from pyimsl.math.ellipticIntegralK import ellipticIntegralK

x = 0.0
x = ellipticIntegralK(x)
print("K(0.0) = %f" % (x))

Output

K(0.0) = 1.570796