The Legendre Functions and Legendre Polynomials are described in Abramowitz & Stegun, Chapter 8.  These functions are declared in the header file gsl_sf_legendre.h.

Legendre Polynomials
--------------------

 -- Function: double gsl_sf_legendre_P1 (double X)
 -- Function: double gsl_sf_legendre_P2 (double X)
 -- Function: double gsl_sf_legendre_P3 (double X)
 -- Function: int gsl_sf_legendre_P1_e (double X, gsl_sf_result * RESULT)
 -- Function: int gsl_sf_legendre_P2_e (double X, gsl_sf_result * RESULT)
 -- Function: int gsl_sf_legendre_P3_e (double X, gsl_sf_result * RESULT)
     These functions evaluate the Legendre polynomials $P_l(x)$ P_l(x) using explicit representations for l=1, 2, 3.

 -- Function: double gsl_sf_legendre_Pl (int L, double X)
 -- Function: int gsl_sf_legendre_Pl_e (int L, double X, gsl_sf_result * RESULT)
     These functions evaluate the Legendre polynomial $P_l(x)$ P_l(x) for a specific value of L, X subject to $l \ge 0$ l >= 0, $|x| \le 1$ |x| <= 1

 -- Function: int gsl_sf_legendre_Pl_array (int LMAX, double X, double RESULT_ARRAY[])
 -- Function: int gsl_sf_legendre_Pl_deriv_array (int LMAX, double X, double RESULT_ARRAY[], double RESULT_DERIV_ARRAY[])

     These functions compute arrays of Legendre polynomials P_l(x) and derivatives dP_l(x)/dx, for l = 0, \dots, lmax, $|x| \le 1$ |x| <= 1

 -- Function: double gsl_sf_legendre_Q0 (double X)
 -- Function: int gsl_sf_legendre_Q0_e (double X, gsl_sf_result * RESULT)
     These routines compute the Legendre function Q_0(x) for x > -1, $x \ne 1$ x != 1.

 -- Function: double gsl_sf_legendre_Q1 (double X)
 -- Function: int gsl_sf_legendre_Q1_e (double X, gsl_sf_result * RESULT)
     These routines compute the Legendre function Q_1(x) for x > -1, $x \ne 1$ x != 1.

 -- Function: double gsl_sf_legendre_Ql (int L, double X)
 -- Function: int gsl_sf_legendre_Ql_e (int L, double X, gsl_sf_result * RESULT)
     These routines compute the Legendre function Q_l(x) for x > -1, $x \ne 1$ x != 1 and $l \ge 0$ l >= 0.

Associated Legendre Polynomials and Spherical Harmonics
-------------------------------------------------------

The following functions compute the associated Legendre Polynomials P_l^m(x).  Note that this function grows combinatorially with l and can overflow for l larger than about 150.  There is no trouble for small m, but overflow occurs when m and l are both large.  Rather than allow overflows, these functions refuse to calculate P_l^m(x) and return GSL_EOVRFLW when they can sense that l and m are too big.

If you want to calculate a spherical harmonic, then do not use these functions.  Instead use gsl_sf_legendre_sphPlm below, which uses a similar recursion, but with the normalized functions.

 -- Function: double gsl_sf_legendre_Plm (int L, int M, double X)
 -- Function: int gsl_sf_legendre_Plm_e (int L, int M, double X, gsl_sf_result * RESULT)
     These routines compute the associated Legendre polynomial P_l^m(x) for $m \ge 0$ m >= 0, $l \ge m$ l >= m, $|x| \le 1$ |x| <= 1.

 -- Function: int gsl_sf_legendre_Plm_array (int LMAX, int M, double X, double RESULT_ARRAY[])
 -- Function: int gsl_sf_legendre_Plm_deriv_array (int LMAX, int M, double X, double RESULT_ARRAY[], double RESULT_DERIV_ARRAY[])
     These functions compute arrays of Legendre polynomials
     P_l^m(x) and derivatives dP_l^m(x)/dx,
     for $m \ge 0$
     m >= 0, $l = |m|, \dots, lmax$
     l = |m|, ..., lmax, $|x| \le 1$
     |x| <= 1.

 -- Function: double gsl_sf_legendre_sphPlm (int L, int M, double X)
 -- Function: int gsl_sf_legendre_sphPlm_e (int L, int M, double X, gsl_sf_result * RESULT)
     These routines compute the normalized associated Legendre polynomial $\sqrt(2l+1)/(4\pi) \sqrt(l-m)!/(l+m)! P_l^m(x)$ \sqrt{(2l+1)/(4\pi)} \sqrt{(l-m)!/(l+m)!} P_l^m(x) suitable for use in spherical harmonics.  The parameters must satisfy $m \ge 0$ m >= 0, $l \ge m$ l >= m, $|x| \le 1$ |x| <= 1. Theses routines avoid the overflows that occur for the standard normalization of P_l^m(x).

 -- Function: int gsl_sf_legendre_sphPlm_array (int LMAX, int M, double X, double RESULT_ARRAY[])
 -- Function: int gsl_sf_legendre_sphPlm_deriv_array (int LMAX, int M, double X, double RESULT_ARRAY[], double RESULT_DERIV_ARRAY[])
     These functions compute arrays of normalized associated Legendre functions $\sqrt(2l+1)/(4\pi) \sqrt(l-m)!/(l+m)! P_l^m(x)$ \sqrt{(2l+1)/(4\pi)} \sqrt{(l-m)!/(l+m)!} P_l^m(x), and derivatives, for $m \ge 0$ m >= 0, $l = |m|, \dots, lmax$ l = |m|, ..., lmax, $|x| \le 1$ |x| <= 1.0

 -- Function: int gsl_sf_legendre_array_size (const int LMAX, const int M)
     This function returns the size of RESULT_ARRAY[] needed for the array versions of P_l^m(x), LMAX - M + 1.  inlinefn

Conical Functions
-----------------

The Conical Functions $P^\mu_-(1/2)+i\lambda(x)$ P^\mu_{-(1/2)+i\lambda}(x) and $Q^\mu_-(1/2)+i\lambda$ Q^\mu_{-(1/2)+i\lambda} are described in Abramowitz & Stegun, Section 8.12.

 -- Function: double gsl_sf_conicalP_half (double LAMBDA, double X)
 -- Function: int gsl_sf_conicalP_half_e (double LAMBDA, double X, gsl_sf_result * RESULT)
     These routines compute the irregular Spherical Conical Function $P^1/2_-1/2 + i \lambda(x)$ P^{1/2}_{-1/2 + i \lambda}(x) for x > -1.

 -- Function: double gsl_sf_conicalP_mhalf (double LAMBDA, double X)
 -- Function: int gsl_sf_conicalP_mhalf_e (double LAMBDA, double X, gsl_sf_result * RESULT)
     These routines compute the regular Spherical Conical Function $P^-1/2_-1/2 + i \lambda(x)$ P^{-1/2}_{-1/2 + i \lambda}(x) for x > -1.

 -- Function: double gsl_sf_conicalP_0 (double LAMBDA, double X)
 -- Function: int gsl_sf_conicalP_0_e (double LAMBDA, double X, gsl_sf_result * RESULT)
     These routines compute the conical function $P^0_-1/2 + i \lambda(x)$ P^0_{-1/2 + i \lambda}(x) for x > -1.

 -- Function: double gsl_sf_conicalP_1 (double LAMBDA, double X)
 -- Function: int gsl_sf_conicalP_1_e (double LAMBDA, double X, gsl_sf_result * RESULT)
     These routines compute the conical function $P^1_-1/2 + i \lambda(x)$ P^1_{-1/2 + i \lambda}(x) for x > -1.

 -- Function: double gsl_sf_conicalP_sph_reg (int L, double LAMBDA, double X)
 -- Function: int gsl_sf_conicalP_sph_reg_e (int L, double LAMBDA, double X, gsl_sf_result * RESULT)
     These routines compute the Regular Spherical Conical Function $P^-1/2-l_-1/2 + i \lambda(x)$ P^{-1/2-l}_{-1/2 + i \lambda}(x) for x > -1, $l \ge -1$ l >= -1.

 -- Function: double gsl_sf_conicalP_cyl_reg (int M, double LAMBDA, double X)
 -- Function: int gsl_sf_conicalP_cyl_reg_e (int M, double LAMBDA, double X, gsl_sf_result * RESULT)
     These routines compute the Regular Cylindrical Conical Function $P^-m_-1/2 + i \lambda(x)$ P^{-m}_{-1/2 + i \lambda}(x) for x > -1, $m \ge -1$ m >= -1.

Radial Functions for Hyperbolic Space
-------------------------------------

The following spherical functions are specializations of Legendre functions which give the regular eigenfunctions of the Laplacian on a 3-dimensional hyperbolic space H3d.  Of particular interest is the flat limit, \lambda \to \infty, \eta \to 0, \lambda\eta fixed.

 -- Function: double gsl_sf_legendre_H3d_0 (double LAMBDA, double ETA)
 -- Function: int gsl_sf_legendre_H3d_0_e (double LAMBDA, double ETA, gsl_sf_result * RESULT)
     These routines compute the zeroth radial eigenfunction of the Laplacian on the 3-dimensional hyperbolic space, $$L^H3d_0(\lambda,\eta) := \sin(\lambda\eta) \over \lambda\sinh(\eta)$$ L^{H3d}_0(\lambda,\eta) := \sin(\lambda\eta)/(\lambda\sinh(\eta)) for $\eta \ge 0$ \eta >= 0. In the flat limit this takes the form $L^H3d_0(\lambda,\eta) = j_0(\lambda\eta)$ L^{H3d}_0(\lambda,\eta) = j_0(\lambda\eta).

 -- Function: double gsl_sf_legendre_H3d_1 (double LAMBDA, double ETA)
 -- Function: int gsl_sf_legendre_H3d_1_e (double LAMBDA, double ETA, gsl_sf_result * RESULT)
     These routines compute the first radial eigenfunction of the Laplacian on the 3-dimensional hyperbolic space, $$L^H3d_1(\lambda,\eta) := 1\over\sqrt\lambda^2 + 1 \left(\sin(\lambda \eta)\over \lambda \sinh(\eta)\right) \left(\coth(\eta) - \lambda \cot(\lambda\eta)\right)$$ L^{H3d}_1(\lambda,\eta) := 1/\sqrt{\lambda^2 + 1} \sin(\lambda \eta)/(\lambda \sinh(\eta)) (\coth(\eta) - \lambda \cot(\lambda\eta)) for $\eta \ge 0$ \eta >= 0. In the flat limit this takes the form $L^H3d_1(\lambda,\eta) = j_1(\lambda\eta)$ L^{H3d}_1(\lambda,\eta) = j_1(\lambda\eta).

 -- Function: double gsl_sf_legendre_H3d (int L, double LAMBDA, double ETA)
 -- Function: int gsl_sf_legendre_H3d_e (int L, double LAMBDA, double ETA, gsl_sf_result * RESULT)
     These routines compute the L-th radial eigenfunction of the Laplacian on the 3-dimensional hyperbolic space $\eta \ge 0$ \eta >= 0, $l \ge 0$ l >= 0. In the flat limit this takes the form $L^H3d_l(\lambda,\eta) = j_l(\lambda\eta)$ L^{H3d}_l(\lambda,\eta) = j_l(\lambda\eta).

 -- Function: int gsl_sf_legendre_H3d_array (int LMAX, double LAMBDA, double ETA, double RESULT_ARRAY[])
     This function computes an array of radial eigenfunctions $L^H3d_l( \lambda, \eta)$ L^{H3d}_l(\lambda, \eta) for $0 \le l \le lmax$ 0 <= l <= lmax.