IMSL C Math Library
elliptic_integral_K
Evaluates the complete elliptic integral of the kind K(x).
Synopsis
#include <imsl.h>
float imsl_f_elliptic_integral_K (float x)
The type double function is imsl_d_elliptic_integral_K.
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
The argument x must satisfy 0 â‰¤ x < 1; otherwise, imsl_f_elliptic_integral_K returns imsl_f_machine(2), the largest representable floating-point number. For more information, see the description for machine (float).
The function K(x) is computed using the routine imsl_f_elliptic_integral_RF and the relation K(x) = RF(0, 1 - x, 1).
Example
The integral K(0) is evaluated.
 
#include <imsl.h>
#include <stdio.h>
 
int main()
{
float x = 0.0;
float ans;
 
x = imsl_f_elliptic_integral_K (x);
printf ("K(0.0) = %f\n", x);
}
Output
 
K(0.0) = 1.570796