Legendre polynomials

In physical science and mathematics, Legendre polynomials (named after Adrien-Marie Legendre, who discovered them in 1782) are a system of complete and orthogonal polynomials, with a vast number of mathematical properties, and numerous applications. They can be defined in many ways, and the various definitions highlight different aspects as well as suggest generalizations and connections to different mathematical structures and physical and numerical applications.
Closely related to the Legendre polynomials are associated Legendre polynomials, Legendre functions, Legendre functions of the second kind, and associated Legendre functions.
Definition by construction as an orthogonal system.
In this approach, the polynomials are defined as an orthogonal system with respect to the weight function formula_1 over the interval formula_2. That is, formula_3 is a polynomial of degree formula_4, such that
This determines the polynomials completely up to an overall scale factor, which is fixed by the standardization
formula_6. That this is a constructive definition is seen thus: formula_7 is the only correctly standardized polynomial of degree 0. formula_8 must be orthogonal to formula_9, leading to formula_10, and formula_11 is determined by demanding orthogonality to formula_9 and formula_13, and so on. formula_14 is fixed by demanding orthogonality to all formula_15 with formula_16. This gives formula_17 conditions, which, along with the standardization formula_18 fixes all formula_19 coefficients in formula_20. With work, all the coefficients of every polynomial can be systematically determined, leading to the explicit representation in powers of formula_21 given below.
This definition of the formula_14's is the simplest one. It does not appeal to the theory of differential equations. Second, the completeness of the polynomials follows immediately from the completeness of the powers 1, formula_23. Finally, by defining them via orthogonality with respect to the most obvious weight function on a finite interval, it sets up the Legendre polynomials as one of the three classical orthogonal polynomial systems. The other two are the Laguerre polynomials, which are orthogonal over the half line formula_24, and the Hermite polynomials, orthogonal over the full line formula_25, with weight functions that are the most natural analytic functions that ensure convergence of all integrals.
Definition via generating function.
The Legendre polynomials can also be defined as the coefficients in a formal expansion in powers of formula_26 of the generating function
The coefficient of formula_27 is a polynomial in formula_28 of degree formula_4. Expanding up to formula_30 gives
Expansion to higher orders gets increasingly cumbersome, but is possible to do systematically, and again leads to one of the explicit forms given below.
It is possible to obtain the higher formula_14's without resorting to direct expansion of the Taylor series, however. Eq.  is differentiated with respect to on both sides and rearranged to obtain
Replacing the quotient of the square root with its definition in Eq. , and equating the coefficients of powers of in the resulting expansion gives "Bonnet’s recursion formula"
This relation, along with the first two polynomials and , allows all the rest to be generated recursively.
The generating function approach is directly connected to the multipole expansion in electrostatics, as explained below, and is how the polynomials were first defined by Legendre in 1782.
Definition via differential equation.
A third definition is in terms of solutions to Legendre's differential equation
This differential equation has regular singular points at so if a solution is sought using the standard Frobenius or power series method, a series about the origin will only converge for in general. When is an integer, the solution that is regular at is also regular at , and the series for this solution terminates (i.e. it is a polynomial). The orthogonality and completeness of these solutions is best seen from the viewpoint of Sturm–Liouville theory. We rewrite the differential equation as an eigenvalue problem,
with the eigenvalue formula_36 in lieu of formula_37. If we demand that the solution be regular at
formula_38, the differential operator on the left is Hermitian. The eigenvalues are found to be of the form 
, with formula_39, and the eigenfunctions are the formula_3. The orthogonality and completeness of this set of solutions follows at once from the larger framework of Sturm–Liouville theory.
The differential equation admits another, non-polynomial solution, the Legendre functions of the second kind formula_41.
A two-parameter generalization of (Eq. ) is called Legendre's "general" differential equation, solved by the Associated Legendre polynomials. Legendre functions are solutions of Legendre's differential equation (generalized or not) with "non-integer" parameters.
In physical settings, Legendre's differential equation arises naturally whenever one solves Laplace's equation (and related partial differential equations) by separation of variables in spherical coordinates. From this standpoint, the eigenfunctions of the angular part of the Laplacian operator are the spherical harmonics, of which the Legendre polynomials are (up to a multiplicative constant) the subset that is left invariant by rotations about the polar axis. The polynomials appear as formula_42 where formula_43 is the polar angle. This approach to the Legendre polynomials provides a deep connection to rotational symmetry. Many of their properties which are found laboriously through the methods of analysis — for example the addition theorem — are more easily found using the methods of symmetry and group theory, and acquire profound physical and geometrical meaning.
Orthogonality and completeness.
The standardization formula_6 fixes the normalization of the Legendre polynomials
(with respect to the norm on the interval ). Since they are also orthogonal with respect to the same norm, the two statements can be combined into the single equation,
(where denotes the Kronecker delta, equal to 1 if and to 0 otherwise).
This normalization is most readily found by employing Rodrigues' formula, given below.
That the polynomials are complete means the following. Given any piecewise continuous function formula_46 with finitely many discontinuities in the interval [−1,1], the sequence of sums
converges in the mean to formula_46 as formula_49, provided we take
This completeness property underlies all the expansions discussed in this article, and is often stated in the form
with and .
Rodrigues' formula and other explicit formulas.
An especially compact expression for the Legendre polynomials is given by Rodrigues' formula:
This formula enables derivation of a large number of properties of the formula_14's. Among these are
explicit representations such as
where the last, which is also immediate from the recursion formula, expresses the Legendre polynomials by simple monomials and involves the generalized form of the binomial coefficient.
The first few Legendre polynomials are:
The graphs of these polynomials (up to ) are shown below:
Applications of Legendre polynomials.
Expanding a 1/"r" potential.
The Legendre polynomials were first introduced in 1782 by Adrien-Marie Legendre as the coefficients in the expansion of the Newtonian potential
where and are the lengths of the vectors and respectively and is the angle between those two vectors. The series converges when . The expression gives the gravitational potential associated to a point mass or the Coulomb potential associated to a point charge. The expansion using Legendre polynomials might be useful, for instance, when integrating this expression over a continuous mass or charge distribution.
Legendre polynomials occur in the solution of Laplace's equation of the static potential, , in a charge-free region of space, using the method of separation of variables, where the boundary conditions have axial symmetry (no dependence on an azimuthal angle). Where is the axis of symmetry and is the angle between the position of the observer and the axis (the zenith angle), the solution for the potential will be
 and are to be determined according to the boundary condition of each problem.
They also appear when solving the Schrödinger equation in three dimensions for a central force.
Legendre polynomials in multipole expansions.
Legendre polynomials are also useful in expanding functions of the form (this is the same as before, written a little differently):
which arise naturally in multipole expansions. The left-hand side of the equation is the generating function for the Legendre polynomials.
As an example, the electric potential (in spherical coordinates) due to a point charge located on the -axis at (see diagram right) varies as
If the radius of the observation point is greater than , the potential may be expanded in the Legendre polynomials
where we have defined and . This expansion is used to develop the normal multipole expansion.
Conversely, if the radius of the observation point is smaller than , the potential may still be expanded in the Legendre polynomials as above, but with and exchanged. This expansion is the basis of interior multipole expansion.
Legendre polynomials in trigonometry.
The trigonometric functions , also denoted as the Chebyshev polynomials , can also be multipole expanded by the Legendre polynomials . The first several orders are as follows:
Another property is the expression for , which is
Legendre polynomials in recurrent neural networks.
A recurrent neural network that contains a -dimensional memory vector, formula_63, can be optimized such that its neural activities obey the linear time-invariant system given by the following state-space representation:
In this case, the sliding window of formula_66 across the past formula_43 units of time is best approximated by a linear combination of the first formula_68 shifted Legendre polynomials, weighted together by the elements of formula_69 at time formula_26:
When combined with deep learning methods, these networks can be trained to outperform long short-term memory units and related architectures, while using fewer computational resources.
Additional properties of Legendre polynomials.
Legendre polynomials have definite parity. That is, they are even or odd, according to
Another useful property is
which follows from considering the orthogonality relation with formula_7. It is convenient when a Legendre series formula_75 is used to approximate a function or experimental data: the "average" of the series over the interval is simply given by the leading expansion coefficient formula_76.
Since the differential equation and the orthogonality property are independent of scaling, the Legendre polynomials' definitions are "standardized" (sometimes called "normalization", but the actual norm is not 1) by being scaled so that
The derivative at the end point is given by
The Askey–Gasper inequality for Legendre polynomials reads
The Legendre polynomials of a scalar product of unit vectors can be expanded with spherical harmonics using
where the unit vectors and have spherical coordinates and , respectively.
Recurrence relations.
As discussed above, the Legendre polynomials obey the three-term recurrence relation known as Bonnet’s recursion formula
and
or, with the alternative expression, which also holds at the endpoints
Useful for the integration of Legendre polynomials is
From the above one can see also that
or equivalently
where is the norm over the interval 
Asymptotics.
Asymptotically for formula_88
and for arguments of magnitude greater than 1
where and are Bessel functions.
Zeros.
All formula_91 zeros of formula_3 are real, distinct from each other, and lie in the interval formula_93. Further, if we regard them as dividing the interval formula_94 into formula_95 subintervals, each subinterval will contain exactly one zero of formula_96. This is known as the interlacing property. Because of the parity property it is evident that if formula_97 is a zero of formula_3, so is formula_99. These zeros play an important role in numerical integration based on Gaussian quadrature. The specific quadrature based on the formula_14's is known as Gauss-Legendre quadrature.
From this property and the facts that formula_101, it follows that formula_102 has formula_103 local minima and
maxima in formula_104. Equivalently, formula_105 has formula_106 zeros in formula_104.
Pointwise evaluations.
The parity and normalization implicate the values at the boundaries formula_108 to be 
At the origin formula_110 one can show that the values are given by
Legendre polynomials with transformed argument.
Shifted Legendre polynomials.
The shifted Legendre polynomials are defined as
Here the "shifting" function is an affine transformation that bijectively maps the interval to the interval , implying that the polynomials are orthogonal on :
An explicit expression for the shifted Legendre polynomials is given by
The analogue of Rodrigues' formula for the shifted Legendre polynomials is
The first few shifted Legendre polynomials are:
Legendre rational functions.
The Legendre rational functions are a sequence of orthogonal functions on [0, ∞). They are obtained by composing the Cayley transform with Legendre polynomials.
A rational Legendre function of degree "n" is defined as:
They are eigenfunctions of the singular Sturm–Liouville problem:
with eigenvalues