# Legendre function

In physical science and mathematics, the Legendre functions P$_λ$, Q$_λ$ and associated Legendre functions P$^μ$ $_λ$, Q$^μ$ $_λ$, and Legendre functions of the second kind, Q$_n$, are all solutions of Legendre's differential equation. The Legendre polynomials and the associated Legendre polynomials are also solutions of the differential equation in special cases, which, by virtue of being polynomials, have a large number of additional properties, mathematical structure, and applications. For these polynomial solutions, see the separate Wikipedia articles.

## Legendre's differential equation

The general Legendre equation reads $\left(1-x^{2}\right)y''-2xy'+\left[\lambda (\lambda +1)-{\frac {\mu ^{2}}{1-x^{2}}}\right]y=0,$ where the numbers λ and μ may be complex, and are called the degree and order of the relevant function, respectively. The polynomial solutions when λ is an integer (denoted n), and μ = 0 are the Legendre polynomials P$_n$; and when λ is an integer (denoted n), and μ = m is also an integer with |m| < n are the associated Legendre polynomials. All other cases of λ and μ can be discussed as one, and the solutions are written P$^μ$ $_λ$, Q$^μ$ $_λ$. If μ = 0, the superscript is omitted, and one writes just P$_λ$, Q$_λ$. However, the solution Q$_λ$ when λ is an integer is often discussed separately as Legendre's function of the second kind, and denoted Q$_n$.
This is a second order linear equation with three regular singular points (at 1, −1, and ∞). Like all such equations, it can be converted into a hypergeometric differential equation by a change of variable, and its solutions can be expressed using hypergeometric functions.

## Solutions of the differential equation

Since the differential equation is linear, homogeneous (the right hand side =zero) and of second order, it has two linearly independent solutions, which can both be expressed in terms of the hypergeometric function, $_{2}F_{1}$. With $\Gamma$ being the gamma function, the first solution is $P_{\lambda }^{\mu }(z)={\frac {1}{\Gamma (1-\mu )}}\left[{\frac {z+1}{z-1}}\right]^{\mu /2}\,_{2}F_{1}\left(-\lambda ,\lambda +1;1-\mu ;{\frac {1-z}{2}}\right),\qquad {\text{for }}\ |1-z|<2,$ and the second is $Q_{\lambda }^{\mu }(z)={\frac {{\sqrt {\pi }}\ \Gamma (\lambda +\mu +1)}{2^{\lambda +1}\Gamma (\lambda +3/2)}}{\frac {e^{i\mu \pi }(z^{2}-1)^{\mu /2}}{z^{\lambda +\mu +1}}}\,_{2}F_{1}\left({\frac {\lambda +\mu +1}{2}},{\frac {\lambda +\mu +2}{2}};\lambda +{\frac {3}{2}};{\frac {1}{z^{2}}}\right),\qquad {\text{for}}\ \ |z|>1.$
These are generally known as Legendre functions of the first and second kind of noninteger degree, with the additional qualifier 'associated' if μ is non-zero. A useful relation between the P and Q solutions is Whipple's formula.

### Positive integer order

For positive integer $\mu =m\in \mathbb {N} ^{+}$ the evaluation of $P_{\lambda }^{\mu }$ above involves cancellation of singular terms. We can find the limit valid for $m\in \mathbb {N} _{0}$ as
$P_{\lambda }^{m}(z)=\lim _{\mu \to m}P_{\lambda }^{\mu }(z)={\frac {(-\lambda )_{m}(\lambda +1)_{m}}{m!}}\left[{\frac {1-z}{1+z}}\right]^{m/2}\,_{2}F_{1}\left(-\lambda ,\lambda +1;1+m;{\frac {1-z}{2}}\right),$
with $(\lambda )_{n}$ the (rising) Pochhammer symbol.

## Legendre functions of the second kind (Q$_n$)

The nonpolynomial solution for the special case of integer degree $\lambda =n\in \mathbb {N} _{0}$, and $\mu =0$, is often discussed separately. It is given by $Q_{n}(x)={\frac {n!}{1\cdot 3\cdots (2n+1)}}\left(x^{-(n+1)}+{\frac {(n+1)(n+2)}{2(2n+3)}}x^{-(n+3)}+{\frac {(n+1)(n+2)(n+3)(n+4)}{2\cdot 4(2n+3)(2n+5)}}x^{-(n+5)}+\cdots \right)$
This solution is necessarily singular when $x=\pm 1$.
The Legendre functions of the second kind can also be defined recursively via Bonnet's recursion formula $Q_{n}(x)={\begin{cases}{\frac {1}{2}}\log {\frac {1+x}{1-x}}&n=0\\P_{1}(x)Q_{0}(x)-1&n=1\\{\frac {2n-1}{n}}xQ_{n-1}(x)-{\frac {n-1}{n}}Q_{n-2}(x)&n\geq 2\,.\end{cases}}$

## Associated Legendre functions of the second kind

The nonpolynomial solution for the special case of integer degree $\lambda =n\in \mathbb {N} _{0}$, and $\mu =m\in \mathbb {N} _{0}$ is given by $Q_{n}^{m}(x)=(-1)^{m}(1-x^{2})^{\frac {m}{2}}{\frac {d^{m}}{dx^{m}}}Q_{n}(x)\,.$

## Integral representations

The Legendre functions can be written as contour integrals. For example, $P_{\lambda }(z)=P_{\lambda }^{0}(z)={\frac {1}{2\pi i}}\int _{1,z}{\frac {(t^{2}-1)^{\lambda }}{2^{\lambda }(t-z)^{\lambda +1}}}dt$ where the contour winds around the points 1 and z in the positive direction and does not wind around −1. For real x, we have $P_{s}(x)={\frac {1}{2\pi }}\int _{-\pi }^{\pi }\left(x+{\sqrt {x^{2}-1}}\cos \theta \right)^{s}d\theta ={\frac {1}{\pi }}\int _{0}^{1}\left(x+{\sqrt {x^{2}-1}}(2t-1)\right)^{s}{\frac {dt}{\sqrt {t(1-t)}}},\qquad s\in \mathbb {C}$

## Legendre function as characters

The real integral representation of $P_{s}$ are very useful in the study of harmonic analysis on $L^{1}(G//K)$ where $G//K$ is the double coset space of $SL(2,\mathbb {R} )$ (see Zonal spherical function). Actually the Fourier transform on $L^{1}(G//K)$ is given by $L^{1}(G//K)\ni f\mapsto {\hat {f}}$ where ${\hat {f}}(s)=\int _{1}^{\infty }f(x)P_{s}(x)dx,\qquad -1\leq \Re (s)\leq 0$

## Singularities of Legendre functions of the first kind (P$_λ$) as a consequence of symmetry

Legendre functions P$_λ$ of non-integer degree are unbounded at the interval [-1, 1] . In applications in physics, this often provides a selection criterion. Indeed, because Legendre functions Q$_λ$ of the second kind are always unbounded, in order to have a bounded solution of Legendre's equation at all, the degree must be integer valued: only for integer degree, Legendre functions of the first kind reduce to Legendre polynomials, which are bounded on [-1, 1] . It can be shown that the singularity of the Legendre functions P$_λ$ for non-integer degree is a consequence of the mirror symmetry of Legendre's equation. Thus there is a symmetry under the selection rule just mentioned.