The functions described in this section are declared in the header file gsl_sf_ellint.h.  Further information about the elliptic integrals can be found in Abramowitz & Stegun, Chapter 17.

Definition of Legendre Forms
----------------------------

The Legendre forms of elliptic integrals F(\phi,k), E(\phi,k) and \Pi(\phi,k,n) are defined by,

       F(\phi,k) = \int_0^\phi dt 1/\sqrt((1 - k^2 \sin^2(t)))

       E(\phi,k) = \int_0^\phi dt   \sqrt((1 - k^2 \sin^2(t)))

     Pi(\phi,k,n) = \int_0^\phi dt 1/((1 + n \sin^2(t))\sqrt(1 - k^2 \sin^2(t)))

The complete Legendre forms are denoted by K(k) = F(\pi/2, k) and E(k) = E(\pi/2, k).

The notation used here is based on Carlson, Numerische Mathematik 33 (1979) 1 and differs slightly from that used by Abramowitz & Stegun, where the functions are given in terms of the parameter m = k^2 and n is replaced by -n.

Definition of Carlson Forms
---------------------------

The Carlson symmetric forms of elliptical integrals RC(x,y), RD(x,y,z), RF(x,y,z) and RJ(x,y,z,p) are defined by,

         RC(x,y) = 1/2 \int_0^\infty dt (t+x)^(-1/2) (t+y)^(-1)

       RD(x,y,z) = 3/2 \int_0^\infty dt (t+x)^(-1/2) (t+y)^(-1/2) (t+z)^(-3/2)

       RF(x,y,z) = 1/2 \int_0^\infty dt (t+x)^(-1/2) (t+y)^(-1/2) (t+z)^(-1/2)

     RJ(x,y,z,p) = 3/2 \int_0^\infty dt
                      (t+x)^(-1/2) (t+y)^(-1/2) (t+z)^(-1/2) (t+p)^(-1)

Legendre Form of Complete Elliptic Integrals
--------------------------------------------

 -- Function: double gsl_sf_ellint_Kcomp (double K, gsl_mode_t MODE)
 -- Function: int gsl_sf_ellint_Kcomp_e (double K, gsl_mode_t MODE, gsl_sf_result * RESULT)
     These routines compute the complete elliptic integral K(k) to the accuracy specified by the mode variable MODE. Note that Abramowitz & Stegun define this function in terms of the parameter m = k^2.

 -- Function: double gsl_sf_ellint_Ecomp (double K, gsl_mode_t MODE)
 -- Function: int gsl_sf_ellint_Ecomp_e (double K, gsl_mode_t MODE, gsl_sf_result * RESULT)
     These routines compute the complete elliptic integral E(k) to the accuracy specified by the mode variable MODE. Note that Abramowitz & Stegun define this function in terms of the parameter m = k^2.

 -- Function: double gsl_sf_ellint_Pcomp (double K, double N, gsl_mode_t MODE)
 -- Function: int gsl_sf_ellint_Pcomp_e (double K, double N, gsl_mode_t MODE, gsl_sf_result * RESULT)
     These routines compute the complete elliptic integral \Pi(k,n) to the accuracy specified by the mode variable MODE. Note that Abramowitz & Stegun define this function in terms of the parameters m = k^2 and \sin^2(\alpha) = k^2, with the change of sign n \to -n.

Legendre Form of Incomplete Elliptic Integrals
----------------------------------------------

 -- Function: double gsl_sf_ellint_F (double PHI, double K, gsl_mode_t MODE)
 -- Function: int gsl_sf_ellint_F_e (double PHI, double K, gsl_mode_t MODE, gsl_sf_result * RESULT)
     These routines compute the incomplete elliptic integral F(\phi,k) to the accuracy specified by the mode variable MODE. Note that Abramowitz & Stegun define this function in terms of the parameter m = k^2.

 -- Function: double gsl_sf_ellint_E (double PHI, double K, gsl_mode_t MODE)
 -- Function: int gsl_sf_ellint_E_e (double PHI, double K, gsl_mode_t MODE, gsl_sf_result * RESULT)
     These routines compute the incomplete elliptic integral E(\phi,k) to the accuracy specified by the mode variable MODE. Note that Abramowitz & Stegun define this function in terms of the parameter m = k^2.

 -- Function: double gsl_sf_ellint_P (double PHI, double K, double N, gsl_mode_t MODE)
 -- Function: int gsl_sf_ellint_P_e (double PHI, double K, double N, gsl_mode_t MODE, gsl_sf_result * RESULT)
     These routines compute the incomplete elliptic integral \Pi(\phi,k,n) to the accuracy specified by the mode variable MODE. Note that Abramowitz & Stegun define this function in terms of the parameters m = k^2 and \sin^2(\alpha) = k^2, with the change of sign n \to -n.

 -- Function: double gsl_sf_ellint_D (double PHI, double K, gsl_mode_t MODE)
 -- Function: int gsl_sf_ellint_D_e (double PHI, double K, gsl_mode_t MODE, gsl_sf_result * RESULT)
     These functions compute the incomplete elliptic integral D(\phi,k) which is defined through the Carlson form RD(x,y,z) by the following relation,

          D(\phi,k) = (1/3)(\sin(\phi))^3 RD (1-\sin^2(\phi), 1-k^2 \sin^2(\phi), 1).

Carlson Forms
-------------

 -- Function: double gsl_sf_ellint_RC (double X, double Y, gsl_mode_t MODE)
 -- Function: int gsl_sf_ellint_RC_e (double X, double Y, gsl_mode_t MODE, gsl_sf_result * RESULT)
     These routines compute the incomplete elliptic integral RC(x,y) to the accuracy specified by the mode variable MODE.

 -- Function: double gsl_sf_ellint_RD (double X, double Y, double Z, gsl_mode_t MODE)
 -- Function: int gsl_sf_ellint_RD_e (double X, double Y, double Z, gsl_mode_t MODE, gsl_sf_result * RESULT)
     These routines compute the incomplete elliptic integral RD(x,y,z) to the accuracy specified by the mode variable MODE.

 -- Function: double gsl_sf_ellint_RF (double X, double Y, double Z, gsl_mode_t MODE)
 -- Function: int gsl_sf_ellint_RF_e (double X, double Y, double Z, gsl_mode_t MODE, gsl_sf_result * RESULT)
     These routines compute the incomplete elliptic integral RF(x,y,z) to the accuracy specified by the mode variable MODE.

 -- Function: double gsl_sf_ellint_RJ (double X, double Y, double Z, double P, gsl_mode_t MODE)
 -- Function: int gsl_sf_ellint_RJ_e (double X, double Y, double Z, double P, gsl_mode_t MODE, gsl_sf_result * RESULT)
     These routines compute the incomplete elliptic integral RJ(x,y,z,p) to the accuracy specified by the mode variable MODE.