# Legendre polynomials

Legendre polynomials (also known as Legendre functions of the first kind, Legendre coefficients, or zonal harmonics) are solutions of the Legendre differential equation. The Legendre polynomial, ${\displaystyle P_{n}(z)}$ can be defined by the contour integral

${\displaystyle P_{n}(z)={\frac {1}{2\pi i}}\oint (1-2tz+t^{2})^{1/2}~t^{-n-1}{\rm {d}}t}$

Legendre polynomials can also be defined (Ref 1) using Rodrigues formula, used for producing a series of orthogonal polynomials, as:

${\displaystyle P_{n}(x)={\frac {1}{2^{n}n!}}{\frac {d^{n}}{dx^{n}}}(x^{2}-1)^{n}}$

Legendre polynomials form an orthogonal system in the range [-1:1], i.e.:

${\displaystyle \int _{-1}^{1}P_{n}(x)P_{m}(x)dx=0,}$ for ${\displaystyle m\neq n}$

whereas

${\displaystyle \int _{-1}^{1}P_{n}(x)P_{n}(x)dx={\frac {2}{2n+1}}}$

The first seven Legendre polynomials are:

${\displaystyle \left.P_{0}(x)\right.=1}$

${\displaystyle \left.P_{1}(x)\right.=x}$

${\displaystyle P_{2}(x)={\frac {1}{2}}(3x^{2}-1)}$

${\displaystyle P_{3}(x)={\frac {1}{2}}(5x^{3}-3x)}$

${\displaystyle P_{4}(x)={\frac {1}{8}}(35x^{4}-30x^{2}+3)}$

${\displaystyle P_{5}(x)={\frac {1}{8}}(63x^{5}-70x^{3}+15x)}$

${\displaystyle P_{6}(x)={\frac {1}{16}}(231x^{6}-315x^{4}+105x^{2}-5)}$

"shifted" Legendre polynomials (which obey the orthogonality relationship in the range [0:1]):

${\displaystyle {\overline {P}}_{0}(x)=1}$

${\displaystyle {\overline {P}}_{1}(x)=2x-1}$

${\displaystyle {\overline {P}}_{2}(x)=6x^{2}-6x+1}$

${\displaystyle {\overline {P}}_{3}(x)=20x^{3}-30x^{2}+12x-1}$

Powers in terms of Legendre polynomials:

${\displaystyle \left.x\right.=P_{1}(x)}$

${\displaystyle x^{2}={\frac {1}{3}}[P_{0}(x)+2P_{2}(x)]}$

${\displaystyle x^{3}={\frac {1}{5}}[3P_{1}(x)+2P_{3}(x)]}$

${\displaystyle x^{4}={\frac {1}{35}}[7P_{0}(x)+20P_{2}(x)+8P_{4}(x)]}$

${\displaystyle x^{5}={\frac {1}{63}}[27P_{1}(x)+28P_{3}(x)+8P_{5}(x)]}$

${\displaystyle x^{6}={\frac {1}{231}}[33P_{0}(x)+110P_{2}(x)+72P_{4}(x)+16P_{6}(x)]}$