logo

Series Solution of Legendre Differential Equation: Legendre Polynomial 📂Odinary Differential Equations

Series Solution of Legendre Differential Equation: Legendre Polynomial

Definition1

The following differential equation is called the Legendre differential equation.

$$ (1-x^2)\dfrac{d^2 y}{dx^2} -2x\dfrac{dy}{dx}+l(l+1) y=0 $$

The solution to the Legendre differential equation is called the Legendre polynomial, commonly denoted as $P_{l}(x)$. The first few Legendre polynomials according to $l$ are as follows.

$$ \begin{align*} P_{0}(x) =&\ 1 \\ P_{1}(x) =&\ x \\ P_2(x) =&\ \dfrac{1}{2}(3x^2-1) \\ P_{3}(x) =&\ \dfrac{1}{2}(5x^3-3x) \\ P_{4}(x) =&\ \dfrac{1}{8}(35x^4-30x^2+3) \\ P_{5}(x) =&\ \dfrac{1}{8}(63x^5-70x^3+15x) \\ \vdots& \end{align*} $$

Description

The Legendre differential equation is also introduced in the following form.

$$ \dfrac{d}{dx}\left[ (1-x)^2 \dfrac{dy}{dx} \right] +l(l+1)y=0 $$

This is expressed in terms of Sturm-Liouville theory. Expanding and rearranging the first term yields the same equation. The generalized form of the Legendre differential equation as below is called the associated Legendre differential equation.

$$ (1-x^2)\dfrac{d^2 y}{dx^2} -2x\dfrac{dy}{dx}+\left( \dfrac{-m^2}{1-x^2} +l(l+1) \right) y=0 $$

Here, if $m=0$, it becomes the Legendre differential equation.

The Legendre equation appears in physics and engineering, especially when solving the Laplace equation in spherical coordinates. Physics majors may encounter it when calculating potential in spherical coordinates in electromagnetism, or when solving the Schrödinger equation in spherical coordinates in quantum mechanics. Because the solution process is lengthy, textbooks usually only write down the solution expressed by Rodrigues’ formula. In fact, physics students do not necessarily need to be too curious about the solution.

Solution

Assuming the solution has the form of a power series with the independent variable $x$, it can be solved.


$$ \begin{equation} (1-x^2)y^{\prime \prime} -2xy^{\prime}+l(l+1) y=0 \label{1} \end{equation} $$

Assume the solution to the Legendre differential equation is as follows.

$$ y=a_{0}+a_{1}(x-x_{0})+a_2(x-x_{0})^2+\cdots=\sum \limits_{n=0}^\infty a_{n}(x-x_{0})^n $$

When $x=0$, the coefficient of $y^{\prime \prime}$ becomes $(1-x^2)|_{x=0}=1\ne 0$, so we assume it as $x_{0}=0$. Then the series solution is

$$ \begin{equation} y=a_{0}+a_{1}x+a_2x^2+\cdots=\sum \limits_{n=0}^\infty a_{n}x^n \label{2} \end{equation} $$

Although we assumed the solution as a series, at the end of the solution, we find that the terms of $y$ are finite. Now, to substitute for $\eqref{1}$, let’s find $y^{\prime}$ and $y^{\prime \prime}$.

$$ y^{\prime}=a_{1}+2a_2x+3a_{3}x^2+\cdots=\sum \limits_{n=1}^\infty na_{n}x^{n-1} $$

$$ y^{\prime \prime}=2a_2+3\cdot 2a_{3}x+4\cdot 3 a_{4}x^2 +\cdots = \sum \limits_{n=2} n(n-1)a_{n}x^{n-2} $$

Now, substituting $y, y^{\prime}, y^{\prime \prime}$ into $\eqref{1}$,

$$ (1-x^2)\sum \limits_{n=2}^\infty n(n-1)a_{n}x^{n-2} -2x\sum \limits_{n=1}^\infty na_{n}x^{n-1}+l(l+1) \sum \limits_{n=0}^\infty a_{n}x^n=0 $$

Expanding the coefficient of the first term $(1-x^2)$ and rearranging gives

$$ \sum \limits_{n=2}^\infty n(n-1)a_{n}x^{n-2} -x^2\sum \limits_{n=2}^\infty n(n-1)a_{n}x^{n-2} -2x\sum \limits_{n=1}^\infty na_{n}x^{n-1}+l(l+1) \sum \limits_{n=0}^\infty a_{n}x^n=0 $$

$$ \implies \sum \limits_{n=2} ^\infty n(n-1)a_{n}x^{n-2} -\sum \limits_{n=2}^\infty n(n-1)a_{n}x^{n} -2\sum \limits_{n=1}^\infty na_{n}x^{n}+l(l+1) \sum \limits_{n=0}^\infty a_{n}x^n=0 $$

The key here is matching the order of $x$. While the rest are expressed as $x^n$, only the first series is expressed as $x^{n-2}$, so substituting $n+2$ instead of $n$,

$$ \sum \limits_{n=0} ^\infty (n+2)(n+1)a_{n+2}x^{n} -\sum \limits_{n=2}^\infty n(n-1)a_{n}x^{n} -2\sum \limits_{n=1}^\infty na_{n}x^{n}+l(l+1) \sum \limits_{n=0}^\infty a_{n}x^n=0 $$

Since the second series starts from the $x^2$ term, taking out the term where $n=0,1$ from the rest of the series and grouping constant terms with constant terms, and first-order terms with first-order terms,

$$ \left[ 2\cdot 1 a_2+l(l+1)a_{0} \right]+\left[ 3\cdot 2 a_{3}-2a_{1}+l(l+1)a_{1} \right]x \\ + \sum \limits_{n=2}^\infty \left[ (n+2)(n+1)a_{n+2}-n(n+1)a_{n}-2na_{n}+l(l+1)a_{n} \right] x^n=0 $$

For the above equation to hold, all coefficients must be $0$.

$$ 2\cdot 1 a_2+l(l+1)a_{0} =0 $$

$$ 3\cdot 2 a_{3}-2a_{1}+l(l+1)a_{1} =0 $$

$$ (n+2)(n+1)a_{n+2}-n(n+1)a_{n}-2na_{n}+l(l+1)a_{n}=0 $$

Organizing each gives

$$ \begin{equation} a_2=-\dfrac{l(l+1)}{2 \cdot 1}a_{0} \label{3} \end{equation} $$

$$ \begin{equation} a_{3}=-\dfrac{(l+2)(l-1)}{3\cdot 2} a_{1} \label{4} \end{equation} $$

$$ \begin{equation} a_{n+2}=-\dfrac{(l+n+1)(l-n)}{(n+2)(n+1)}a_{n} \label{5} \end{equation} $$

Using $\eqref{3}, \eqref{4}, \eqref{5}$, knowing just the values of $a_{0}$ and $a_{1}$ allows us to determine all coefficients. Calculating the coefficients of even-order terms with $\eqref{3}$ and $\eqref{5}$,

$$ \begin{align*} a_{4} =&\ - \dfrac{(l+3)(l-2)}{ 4 \cdots 3}a_2 = \dfrac{l(l-2)(l+1)(l+3)}{4!}a_{0} \\ a_{6} =&\ -\dfrac{(l+5)(l-4)}{6\cdot5} a_{4} = -\dfrac{ l(l-2)(l-4)(l+1)(l+3)(l+5)}{6!} a_{0} \\ \vdots& \end{align*} $$

If we set $n=2m\ (m=1,2,3,\cdots)$,

$$ a_{n}=a_{2m}=(-1)^m \dfrac{l(l-2)\cdots (l-2m+4)(l-2m+2)(l+1)(l+3)\cdots(l+2m-3)(l+2m-1)}{(2m)!}a_{0} $$

Similarly, calculating the coefficients of odd-order terms with $\eqref{4}$ and $\eqref{5}$,

$$ \begin{align*} a_{5} =&\ -\dfrac{(l+4)(l-3)}{5\cdot 4}a_{3} = \dfrac{(l+2)(l+4)(l-1)(l-3)}{5!}a_{1} \\ a_{7} =&\ -\dfrac{(l+6)(l-5)}{7\cdot 6}a_{5} = -\dfrac{(l+2)(l+4)(l+6)(l-1)(l-3)(l-5)}{7!}a_{1} \\ \vdots& \end{align*} $$

If we set $n=2m+1\ (m=1,2,3,\cdots)$,

$$ a_{n}=a_{2m+1}=(-1)^m\dfrac{(l+2)(l+4)\cdots(l+2m-2)(l+2m)(l-1)(l-3)\cdots(l-2m+3)(l-2m+1)}{(2m+1)!}a_{1} $$

Substituting these coefficients into $\eqref{2}$ to find the solution,

$$ \begin{align*} y =&\a_{0}+a_{1}x -\dfrac{l(l+1)}{2!}a_{0}x^2-\dfrac{(l+2)(l-1)}{3!}a_{1}x^3 + \dfrac{l(l-2)(l+1)(l+3)}{4!}a_{0}x^4+\dfrac{(l+2)(l+4)(l-1)(l-3)}{5!}a_{1}x^5 \\ &+ \cdots +(-1)^m \dfrac{l(l-2)\cdots (l-2m+4)(l-2m+2)(l+1)(l+3)\cdots(l+2m-3)(l+2m-1)}{(2m)!}a_{0}x^{2m} \\ &+ (-1)^m\dfrac{(l+2)(l+4)\cdots(l+2m-2)(l+2m)(l-1)(l-3)\cdots(l-2m+3)(l-2m+1)}{(2m+1)!}a_{1}x^{2m+1} +\cdots \end{align*} $$

Grouping even-order terms as $a_{0}$ and odd-order terms as $a_{1}$,

$$ \begin{align*} y =&\a_{0}\left[1-\dfrac{l(l+1)}{2!}x^2+\dfrac{l(l-2)(l+1)(l+3)}{4!}x^4 \right. \\ &\left.+\sum \limits_{m=3}^\infty (-1)^m \dfrac{l(l-2)\cdots (l-2m+4)(l-2m+2)(l+1)(l+3)\cdots(l+2m-3)(l+2m-1)}{(2m)!} x^{2m} \right] \\ &+ a_{1}\left[x- \dfrac{(l+2)(l-1)}{3!}x^3+\dfrac{(l+2)(l+4)(l-1)(l-3)}{5!}x^5 \right. \\ & \left. +\sum \limits_{m=3}^\infty (-1)^m\dfrac{(l+2)(l+4)\cdots(l+2m-2)(l+2m)(l-1)(l-3)\cdots(l-2m+3)(l-2m+1)}{(2m+1)!} x^{2m+1} \right] \end{align*} $$

Setting the first parenthesis as $y_{0}$ and the second as $y_{1}$, the general solution to the Legendre equation is as follows.

$$ y=a_{0}y_{0}+a_{1}y_{1} $$

The two series $y_{0}$ and $y_{1}$ converge in the interval of $|x|<1$ according to the ratio test. By $\eqref{5}$, since $\dfrac{a_{n+2}}{a_{n}}=-\dfrac{(l+n+1)(l-n)}{(n+2)(n+1)}=\dfrac{(n+l+1)(n-l)}{(n+2)(n+1)}$, using the ratio test,

$$ \lim \limits_{n \rightarrow \infty} \dfrac{(n+l+1)(n-l)}{(n+2)(n+1)}x^2=x^2<1 $$

$$ \implies -1<x<1 $$

However, in many problems, $x=\cos \theta$ and $l$ appear as non-negative integers, and the goal is to find solutions that converge for all $\theta$. That is, to find solutions that also converge at $x=\pm 1$. Fortunately, when $l$ is an integer, the desired solution exists, and depending on the value of $l$, only one of $y_{0}, y_{1}$ exists. If $l$ is $0$ or even, $y_{1}$ diverges, and $y_{0}$ becomes a finite-term polynomial with only even-order terms. If $l$ is odd, $y_{0}$ diverges, and $y_{1}$ becomes a finite-term polynomial with only odd-order terms. The summary is as follows.

Value of $l$$y_{0}$$y_{1}$Equation’s Solution
$0$ or evenFinite-term polynomialDiverge$y=a_{0}y_{0}$
OddDivergeFinite-term polynomial$y=a_{1}y_{1}$
  • Case 1. If $l$ is $0$ or even

    • For $l=0$, from the 2nd term, taking $l$ as a factor, all become $0$, so $y_{0}=1$

    • For $l=2$, from the 4th term, taking $(l-2)$ as a factor, all become $0$, so $y_{0}=1-3x^2$

    • For $l=4$, from the 6th term, taking $(l-4)$ as a factor, all become $0$, so $y_{0}= 1-10x^2+\dfrac{35}{3}x^4$

    When $l=0$, $x^2=1$ becomes $y_{1}=1+\frac{1}{3}+\frac{1}{5}+\cdots$, which diverges by the integral test. The same applies to other even numbers. Thus, when $l$ is $0$ or even, the solution is a finite-term polynomial with only even-order terms. That is, we obtain a solution that only retains specific terms of the series $y_{0}$.

  • Case 2. If $l$ is odd

    The opposite result appears compared to even cases.

    • For $l=1$, from the 3rd term, taking $(l-1)$ as a factor, all become $0$, so $y_{1}=x$

    • For $l=3$, from the 5th term, taking $(l-3)$ as a factor, all become $0$, so $y_{1}=x-\dfrac{5}{3}x^3$

    • For $l=5$, from the 7th term, taking $(l-5)$ as a factor, all become $0$, so $y_{1}=x-\dfrac{14}{3}x^3+\dfrac{21}{5}x^5$

    When $l=1$, $x^2=1$ diverges, and the same applies to other odd numbers. Thus, when $l$ is odd, the solution is a finite-term polynomial with only odd-order terms. That is, we obtain a solution that only retains specific terms of the series $y_{1}$.

And if $l$ is negative, it is the same as when $l$ is a non-zero integer, as can be seen by examining $y_{0}$ and $y_{1}$. For example, the case of $l=2$ is the same as that of $l=-3$, and the case of $l=1$ is the same as that of $l=-2$. Therefore, it suffices to consider only when $l$ is a non-negative integer. Choosing the values of $a_{0}$ and $a_{1}$ wisely to make the solution $x=1$ when $y(x)=1$, this is called the Legendre polynomial, denoted as $P_{l}(x)$. The first few Legendre polynomials are as follows.

$$ \begin{align*} P_{0}(x) =&\ 1 \\ P_{1}(x) =&\ x \\ P_2(x) =&\ \dfrac{1}{2}(3x^2-1) \\ P_{3}(x) =&\ \dfrac{1}{2}(5x^3-3x) \\ P_{4}(x) =&\ \dfrac{1}{8}(35x^4-30x^2+3) \\ P_{5}(x) =&\ \dfrac{1}{8}(63x^5-70x^3+15x) \end{align*} $$

The above result can also be obtained directly using Rodrigues’ formula.


  1. Mary L. Boas, Mathematical Methods in the Physical Sciences, translated by Jun-gon Choi (3rd Edition, 2008), p577-580 ↩︎