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.

(1x2)d2ydx22xdydx+l(l+1)y=0 (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 Pl(x)P_{l}(x). The first few Legendre polynomials according to ll are as follows.

P0(x)= 1P1(x)= xP2(x)= 12(3x21)P3(x)= 12(5x33x)P4(x)= 18(35x430x2+3)P5(x)= 18(63x570x3+15x) \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.

ddx[(1x)2dydx]+l(l+1)y=0 \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.

(1x2)d2ydx22xdydx+(m21x2+l(l+1))y=0 (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=0m=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 xx, it can be solved.


(1x2)y2xy+l(l+1)y=0 \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=a0+a1(xx0)+a2(xx0)2+=n=0an(xx0)n 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=0x=0, the coefficient of yy^{\prime \prime} becomes (1x2)x=0=10(1-x^2)|_{x=0}=1\ne 0, so we assume it as x0=0x_{0}=0. Then the series solution is

y=a0+a1x+a2x2+=n=0anxn \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 yy are finite. Now, to substitute for (1)\eqref{1}, let’s find yy^{\prime} and yy^{\prime \prime}.

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

y=2a2+32a3x+43a4x2+=n=2n(n1)anxn2 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,yy, y^{\prime}, y^{\prime \prime} into (1)\eqref{1},

(1x2)n=2n(n1)anxn22xn=1nanxn1+l(l+1)n=0anxn=0 (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 (1x2)(1-x^2) and rearranging gives

n=2n(n1)anxn2x2n=2n(n1)anxn22xn=1nanxn1+l(l+1)n=0anxn=0 \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

    n=2n(n1)anxn2n=2n(n1)anxn2n=1nanxn+l(l+1)n=0anxn=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 xx. While the rest are expressed as xnx^n, only the first series is expressed as xn2x^{n-2}, so substituting n+2n+2 instead of nn,

n=0(n+2)(n+1)an+2xnn=2n(n1)anxn2n=1nanxn+l(l+1)n=0anxn=0 \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 x2x^2 term, taking out the term where n=0,1n=0,1 from the rest of the series and grouping constant terms with constant terms, and first-order terms with first-order terms,

[21a2+l(l+1)a0]+[32a32a1+l(l+1)a1]x+n=2[(n+2)(n+1)an+2n(n+1)an2nan+l(l+1)an]xn=0 \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 00.

21a2+l(l+1)a0=0 2\cdot 1 a_2+l(l+1)a_{0} =0

32a32a1+l(l+1)a1=0 3\cdot 2 a_{3}-2a_{1}+l(l+1)a_{1} =0

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

Organizing each gives

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

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

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

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

a4= (l+3)(l2)43a2=l(l2)(l+1)(l+3)4!a0a6= (l+5)(l4)65a4=l(l2)(l4)(l+1)(l+3)(l+5)6!a0 \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,)n=2m\ (m=1,2,3,\cdots),

an=a2m=(1)ml(l2)(l2m+4)(l2m+2)(l+1)(l+3)(l+2m3)(l+2m1)(2m)!a0 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 (4)\eqref{4} and (5)\eqref{5},

a5= (l+4)(l3)54a3=(l+2)(l+4)(l1)(l3)5!a1a7= (l+6)(l5)76a5=(l+2)(l+4)(l+6)(l1)(l3)(l5)7!a1 \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,)n=2m+1\ (m=1,2,3,\cdots),

an=a2m+1=(1)m(l+2)(l+4)(l+2m2)(l+2m)(l1)(l3)(l2m+3)(l2m+1)(2m+1)!a1 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 (2)\eqref{2} to find the solution,

y=\a0+a1xl(l+1)2!a0x2(l+2)(l1)3!a1x3+l(l2)(l+1)(l+3)4!a0x4+(l+2)(l+4)(l1)(l3)5!a1x5++(1)ml(l2)(l2m+4)(l2m+2)(l+1)(l+3)(l+2m3)(l+2m1)(2m)!a0x2m+(1)m(l+2)(l+4)(l+2m2)(l+2m)(l1)(l3)(l2m+3)(l2m+1)(2m+1)!a1x2m+1+ \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 a0a_{0} and odd-order terms as a1a_{1},

y=\a0[1l(l+1)2!x2+l(l2)(l+1)(l+3)4!x4+m=3(1)ml(l2)(l2m+4)(l2m+2)(l+1)(l+3)(l+2m3)(l+2m1)(2m)!x2m]+a1[x(l+2)(l1)3!x3+(l+2)(l+4)(l1)(l3)5!x5+m=3(1)m(l+2)(l+4)(l+2m2)(l+2m)(l1)(l3)(l2m+3)(l2m+1)(2m+1)!x2m+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 y0y_{0} and the second as y1y_{1}, the general solution to the Legendre equation is as follows.

y=a0y0+a1y1 y=a_{0}y_{0}+a_{1}y_{1}

The two series y0y_{0} and y1y_{1} converge in the interval of x<1|x|<1 according to the ratio test. By (5)\eqref{5}, since an+2an=(l+n+1)(ln)(n+2)(n+1)=(n+l+1)(nl)(n+2)(n+1)\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,

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

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

However, in many problems, x=cosθx=\cos \theta and ll 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=±1x=\pm 1. Fortunately, when ll is an integer, the desired solution exists, and depending on the value of ll, only one of y0,y1y_{0}, y_{1} exists. If ll is 00 or even, y1y_{1} diverges, and y0y_{0} becomes a finite-term polynomial with only even-order terms. If ll is odd, y0y_{0} diverges, and y1y_{1} becomes a finite-term polynomial with only odd-order terms. The summary is as follows.

Value of lly0y_{0}y1y_{1}Equation’s Solution
00 or evenFinite-term polynomialDivergey=a0y0y=a_{0}y_{0}
OddDivergeFinite-term polynomialy=a1y1y=a_{1}y_{1}
  • Case 1. If ll is 00 or even

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

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

    • For l=4l=4, from the 6th term, taking (l4)(l-4) as a factor, all become 00, so y0=110x2+353x4y_{0}= 1-10x^2+\dfrac{35}{3}x^4

    When l=0l=0, x2=1x^2=1 becomes y1=1+13+15+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 ll is 00 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 y0y_{0}.

  • Case 2. If ll is odd

    The opposite result appears compared to even cases.

    • For l=1l=1, from the 3rd term, taking (l1)(l-1) as a factor, all become 00, so y1=xy_{1}=x

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

    • For l=5l=5, from the 7th term, taking (l5)(l-5) as a factor, all become 00, so y1=x143x3+215x5y_{1}=x-\dfrac{14}{3}x^3+\dfrac{21}{5}x^5

    When l=1l=1, x2=1x^2=1 diverges, and the same applies to other odd numbers. Thus, when ll 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 y1y_{1}.

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

P0(x)= 1P1(x)= xP2(x)= 12(3x21)P3(x)= 12(5x33x)P4(x)= 18(35x430x2+3)P5(x)= 18(63x570x3+15x) \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 ↩︎