7.2: Legendre Polynomials (2024)

  1. Last updated
  2. Save as PDF
  • Page ID
    106238
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}}}\) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    In the last section we saw the Legendre polynomials in the context of orthogonal bases for a set of square integrable functions in \(L^{2}(-1,1)\). In your first course in differential equations, you saw these polynomials as one of the solutions of the differential equation

    \(\begin{array}{c|c|c|c}
    \text { Polynomial } & \text { Symbol } & \text { Interval } & \sigma(x) \\
    \hline \text { Hermite } & H_{n}(x) & (-\infty, \infty) & e^{-x^{2}} \\
    \text { Laguerre } & L_{n}^{\alpha}(x) & {[0, \infty)} & e^{-x} \\
    \text { Legendre } & P_{n}(x) & (-1,1) & 1 \\
    \text { Gegenbauer } & C_{n}^{\lambda}(x) & (-1,1) & \left(1-x^{2}\right)^{\lambda-1 / 2} \\
    \text { Tchebychef of the 1st kind } & T_{n}(x) & (-1,1) & \left(1-x^{2}\right)^{-1 / 2} \\
    \text { Tchebychef of the 2nd kind } & U_{n}(x) & (-1,1) & \left(1-x^{2}\right)^{-1 / 2} \\
    \text { Jacobi } & P_{n}^{(\nu, \mu)}(x) & (-1,1) & (1-x)^{\nu}(1-x)^{\mu}
    \end{array}\)

    Table 7.1. Common classical orthogonal polynomials with the interval and weight function used to define them.

    \(\begin{array}{c|c}
    \text { Polynomial } & \text { Differential Equation } \\
    \hline \text { Hermite } & y^{\prime \prime}-2 x y^{\prime}+2 n y=0 \\
    \text { Laguerre } & x y^{\prime \prime}+(\alpha+1-x) y^{\prime}+n y=0 \\
    \text { Legendre } & \left(1-x^{2}\right) y^{\prime \prime}-2 x y^{\prime}+n(n+1) y=0 \\
    \text { Gegenbauer } & \left(1-x^{2}\right) y^{\prime \prime}-(2 n+3) x y^{\prime}+\lambda y=0 \\
    & \left(1-x^{2}\right) y^{\prime \prime}-x y^{\prime}+n^{2} y=0 \\
    \text { Tchebychef of the 1st kind } & \left(1-x^{2}\right) y^{\prime \prime}+(\nu-\mu+(\mu+\nu+2) x) y^{\prime}+n(n+1+\mu+\nu) y=0 \\
    \text { Jacobi } & \mu+(n+1+2)
    \end{array}\)

    Table 7.2. Differential equations satisfied by some of the common classical orthogonal polynomials.

    \[\left(1-x^{2}\right) y^{\prime \prime}-2 x y^{\prime}+n(n+1) y=0, \quad n \in N_{0} . \label{7.11} \]

    Recall that these were obtained by using power series expansion methods. In this section we will explore a few of the properties of these functions.

    For completeness, we recall the solution of Equation (7.11) using the power series method. We assume that the solution takes the form

    \[y(x)=\sum_{k=0}^{\infty} a_{k} x^{k} \nonumber \]

    The goal is to determine the coefficients, \(a_{k}\). Inserting this series into Equation (7.11), we have

    \[\left(1-x^{2}\right) \sum_{k=0}^{\infty} k(k-1) a_{k} x^{k-2}-\sum_{k=0}^{\infty} 2 a_{k} k x^{k}+\sum_{k=0}^{\infty} n(n+1) a_{k} x^{k}=0 \nonumber \]

    or

    \[\sum_{k=2}^{\infty} k(k-1) a_{k} x^{k-2}-\sum_{k=2}^{\infty} k(k-1) a_{k} x^{k}+\sum_{k=0}^{\infty}[-2 k+n(n+1)] a_{k} x^{k}=0 \nonumber \]

    We can combine some of these terms:

    \[\sum_{k=2}^{\infty} k(k-1) a_{k} x^{k-2}+\sum_{k=0}^{\infty}[-k(k-1)-2 k+n(n+1)] a_{k} x^{k}=0. \nonumber \]

    Further simplification yields

    \[\sum_{k=2}^{\infty} k(k-1) a_{k} x^{k-2}+\sum_{k=0}^{\infty}[n(n+1)-k(k+1)] a_{k} x^{k}=0 \nonumber \]

    We need to collect like powers of \(x\). This can be done by reindexing each sum. In the first sum, we let \(m=k-2\), or \(k=m+2\). In the second sum we independently let \(k=m\). Then all powers of \(x\) are of the form \(x^{m}\). This gives

    \[\sum_{m=0}^{\infty}(m+2)(m+1) a_{m+2} x^{m}+\sum_{m=0}^{\infty}[n(n+1)-m(m+1)] a_{m} x^{m}=0 . \nonumber \]

    Combining these sums, we have

    \[\sum_{m=0}^{\infty}\left[(m+2)(m+1) a_{m+2}+(n(n+1)-m(m+1)) a_{m}\right] x^{m}=0 . \nonumber \]

    This has to hold for all \(x\). So, the coefficients of \(x^{m}\) must vanish:

    \[(m+2)(m+1) a_{m+2}+(n(n+1)-m(m+1)) a_{m} . \nonumber \]

    Solving for \(a_{m+2}\), we obtain the recursion relation

    \[a_{m+2}=\dfrac{n(n+1)-m(m+1)}{(m+2)(m+1)} a_{m}, \quad m \geq 0 . \nonumber \]

    Thus, \(a_{m+2}\) is proportional to \(a_{m}\). We can iterate and show that each coefficient is either proportional to \(a_{0}\) or \(a_{1}\). However, for \(n\) an integer, sooner, or later, \(m=n\) and the series truncates. \(a_{m}=0\) for \(m>n\). Thus, we obtain polynomial solutions. These polynomial solutions are the Legendre polynomials, which we designate as \(y(x)=P_{n}(x)\). Furthermore, for \(n\) an even integer, \(P_{n}(x)\) is an even function and for \(n\) an odd integer, \(P_{n}(x)\) is an odd function.

    Actually, this is a trimmed down version of the method. We would need to find a second linearly independent solution. We will not discuss these solutions and leave that for the interested reader to investigate.

    7.2.1 The Rodrigues Formula

    The first property that the Legendre polynomials have is the Rodrigues formula:

    \[P_{n}(x)=\dfrac{1}{2^{n} n !} \dfrac{d^{n}}{d x^{n}}\left(x^{2}-1\right)^{n}, \quad n \in N_{0} . \label{7.12} \]

    From the Rodrigues formula, one can show that \(P_{n}(x)\) is an \(n\)th degree polynomial. Also, for \(n\) odd, the polynomial is an odd function and for \(n\) even, the polynomial is an even function.

    As an example, we determine \(P_{2}(x)\) from Rodrigues formula:

    \[\begin{aligned}
    P_{2}(x) &=\dfrac{1}{2^{2} 2 !} \dfrac{d^{2}}{d x^{2}}\left(x^{2}-1\right)^{2} \\
    &=\dfrac{1}{8} \dfrac{d^{2}}{d x^{2}}\left(x^{4}-2 x^{2}+1\right) \\
    &=\dfrac{1}{8} \dfrac{d}{d x}\left(4 x^{3}-4 x\right) \\
    &=\dfrac{1}{8}\left(12 x^{2}-4\right) \\
    &=\dfrac{1}{2}\left(3 x^{2}-1\right) .
    \end{aligned} \label{7.13} \]

    Note that we get the same result as we found in the last section using orthogonalization.

    One can systematically generate the Legendre polynomials in tabular form as shown in Table 7.2.1. In Figure 7.4 we show a few Legendre polynomials.

    \(n\) \(\left(x^{2}-1\right)^{n}\) \(\dfrac{d^{n}}{d x^{n}}\left(x^{2}-1\right)^{n}\) \(\dfrac{1}{2 n_{n !}}\) \(P_{n}(x)\)
    0 1 1 1 1
    1 \(x^{2}-1\) \(2x\) \(\dfrac{1}{2}\) \(x\)
    2 \(x^{4}-2 x^{2}+1\) \(12 x^{2}-4\) \(\dfrac{1}{8}\) \(\dfrac{1}{2}\left(3 x^{2}-1\right)\)
    3 \(x^{6}-3 x^{4}+3 x^{2}-1\) \(120 x^{3}-72 x\) \(\dfrac{1}{48}\) \(\dfrac{1}{2}\left(5 x^{3}-3 x\right)\)

    Table 7.3. Tabular computation of the Legendre polynomials using the Rodrigues formula.

    7.2: Legendre Polynomials (2)

    7.2.2 Three Term Recursion Formula

    The classical orthogonal polynomials also satisfy three term recursion formulae. In the case of the Legendre polynomials, we have

    \[(2 n+1) x P_{n}(x)=(n+1) P_{n+1}(x)+n P_{n-1}(x), \quad n=1,2, \ldots \label{7.14} \]

    This can also be rewritten by replacing \(n\) with \(n-1\) as

    \[(2 n-1) x P_{n-1}(x)=n P_{n}(x)+(n-1) P_{n-2}(x), \quad n=1,2, \ldots \label{7.15} \]

    We will prove this recursion formula in two ways. First we use the orthogonality properties of Legendre polynomials and the following lemma.

    Lemma 7.2.

    The leading coefficient of \(x^{n}\) in \(P_{n}(x)\) is \(\dfrac{1}{2^{n} n !} \dfrac{(2 n) !}{n !}\).

    Proof. We can prove this using Rodrigues formula. first, we focus on the leading coefficient of \(\left(x^{2}-1\right)^{n}\), which is \(x^{2 n}\). The first derivative of \(x^{2 n}\) is \(2 n x^{2 n-1}\). The second derivative is \(2 n(2 n-1) x^{2 n-2}\). The \(j\)th derivative is

    \[\dfrac{d^{j} x^{2 n}}{d x^{j}}=[2 n(2 n-1) \ldots(2 n-j+1)] x^{2 n-j} \nonumber \]

    Thus, the \(n\)th derivative is given by

    \[\dfrac{d^{n} x^{2 n}}{d x^{n}}=[2 n(2 n-1) \ldots(n+1)] x^{n} \nonumber \]

    This proves that \(P_{n}(x)\) has degree \(n\). The leading coefficient of \(P_{n}(x)\) can now be written as

    \[\begin{aligned}
    \dfrac{1}{2^{n} n !}[2 n(2 n-1) \ldots(n+1)] &=\dfrac{1}{2^{n} n !}[2 n(2 n-1) \ldots(n+1)] \dfrac{n(n-1) \ldots 1}{n(n-1) \ldots 1} \\
    &=\dfrac{1}{2^{n} n !} \dfrac{(2 n) !}{n !} .
    \end{aligned} \label{7.16} \]

    In order to prove the three term recursion formula we consider the expression \((2 n-1) x P_{n-1}(x)-n P_{n}(x)\). While each term is a polynomial of degree \(n\), the leading order terms cancel. We need only look at the coefficient of the leading order term first expression. It is

    \[(2 n-1) \dfrac{1}{2^{n-1}(n-1) !} \dfrac{(2 n-2) !}{(n-1) !}=\dfrac{1}{2^{n-1}(n-1) !} \dfrac{(2 n-1) !}{(n-1) !}=\dfrac{(2 n-1) !}{2^{n-1}[(n-1) !]^{2}} . \nonumber \]

    The coefficient of the leading term for \(n P_{n}(x)\) can be written as

    \[n \dfrac{1}{2^{n} n !} \dfrac{(2 n) !}{n !}=n\left(\dfrac{2 n}{2 n^{2}}\right)\left(\dfrac{1}{2^{n-1}(n-1) !}\right) \dfrac{(2 n-1) !}{(n-1) !} \dfrac{(2 n-1) !}{2^{n-1}[(n-1) !]^{2}} . \nonumber \]

    It is easy to see that the leading order terms in \((2 n-1) x P_{n-1}(x)-n P_{n}(x)\) cancel.

    The next terms will be of degree \(n-2\). This is because the \(P_{n}\)'s are either even or odd functions, thus only containing even, or odd, powers of \(x\). We conclude that

    \[(2 n-1) x P_{n-1}(x)-n P_{n}(x)=\text { polynomial of degree } n-2 . \nonumber \]

    Therefore, since the Legendre polynomials form a basis, we can write this polynomial as a linear combination of of Legendre polynomials:

    \[(2 n-1) x P_{n-1}(x)-n P_{n}(x)=c_{0} P_{0}(x)+c_{1} P_{1}(x)+\ldots+c_{n-2} P_{n-2}(x) . \label{7.17} \]

    Multiplying Equation (7.17) by \(P_{m}(x)\) for \(m=0,1, \ldots, n-3\), integrating from -1 to 1 , and using orthogonality, we obtain

    \[0=c_{m}\left\|P_{m}\right\|^{2}, \quad m=0,1, \ldots, n-3 . \nonumber \]

    [Note: \(\int_{-1}^{1} x^{k} P_{n}(x) d x=0\) for \(k \leq n-1\). Thus, \(\int_{-1}^{1} x P_{n-1}(x) P_{m}(x) d x=0\) for \(m \leq n-3 .]\)

    Thus, all of these \(c_{m}\)'s are zero, leaving Equation (7.17) as

    \[(2 n-1) x P_{n-1}(x)-n P_{n}(x)=c_{n-2} P_{n-2}(x) . \nonumber \]

    The final coefficient can be found by using the normalization condition, \(P_{n}(1)=1\). Thus, \(c_{n-2}=(2 n-1)-n=n-1\).

    7.2.3 The Generating Function

    A second proof of the three term recursion formula can be obtained from the generating function of the Legendre polynomials. Many special functions have such generating functions. In this case it is given by

    \[g(x, t)=\dfrac{1}{\sqrt{1-2 x t+t^{2}}}=\sum_{n=0}^{\infty} P_{n}(x) t^{n}, \quad|x|<1,|t|<1 \label{7.18} \]

    This generating function occurs often in applications. In particular, it arises in potential theory, such as electromagnetic or gravitational potentials. These potential functions are \(\dfrac{1}{r}\) type functions. For example, the gravitational potential between the Earth and the moon is proportional to the reciprocal of the magnitude of the difference between their positions relative to some coordinate system. An even better example, would be to place the origin at the center of the Earth and consider the forces on the non-pointlike Earth due to the moon. Consider a piece of the Earth at position \(\mathbf{r}_{1}\) and the moon at position \(\mathbf{r}_{2}\) as shown in Figure 7.5. The tidal potential \(\Phi\) is proportional to

    \[\Phi \propto \dfrac{1}{\left|\mathbf{r}_{2}-\mathbf{r}_{1}\right|}=\dfrac{1}{\sqrt{\left(\mathbf{r}_{2}-\mathbf{r}_{1}\right) \cdot\left(\mathbf{r}_{2}-\mathbf{r}_{1}\right)}}=\dfrac{1}{\sqrt{r_{1}^{2}-2 r_{1} r_{2} \cos \theta+r_{2}^{2}}}, \nonumber \]

    7.2: Legendre Polynomials (3)

    where \(\theta\) is the angle between \(\mathbf{r}_{1}\) and \(\mathbf{r}_{2}\).

    Typically, one of the position vectors is much larger than the other. Let's assume that \(r_{1} \ll r_{2}\). Then, one can write

    \[\Phi \propto \dfrac{1}{\sqrt{r_{1}^{2}-2 r_{1} r_{2} \cos \theta+r_{2}^{2}}}=\dfrac{1}{r_{2}} \dfrac{1}{\sqrt{1-2 \dfrac{r_{1}}{r_{2}} \cos \theta+\left(\dfrac{r_{1}}{r_{2}}\right)^{2}}} \nonumber \]

    Now, define \(x=\cos \theta\) and \(t=\dfrac{r_{1}}{r_{2}}\). We then have the tidal potential is proportional to the generating function for the Legendre polynomials! So, we can write the tidal potential as

    \[\Phi \propto \dfrac{1}{r_{2}} \sum_{n=0}^{\infty} P_{n}(\cos \theta)\left(\dfrac{r_{1}}{r_{2}}\right)^{n}. \nonumber \]

    The first term in the expansion is the gravitational potential that gives the usual force between the Earth and the moon. [Recall that the force is the gradient of the potential, \(\mathbf{F}=\nabla\left(\dfrac{1}{r}\right)\).] The next terms will give expressions for the tidal effects.

    Now that we have some idea as to where this generating function might have originated, we can proceed to use it. First of all, the generating function can be used to obtain special values of the Legendre polynomials.

    Example 7.3. Evaluate \(P_n(0). P_n(0)\) is found by considering \(g(0,t)\). Setting \(x=0\) in Equation (7.18), we have

    \[g(0, t)=\dfrac{1}{\sqrt{1+t^{2}}}=\sum_{n=0}^{\infty} P_{n}(0) t^{n} . \label{7.19} \]

    We can use the binomial expansion to find our final answer. [See the last section of this chapter for a review.] Namely, we have

    \[\dfrac{1}{\sqrt{1+t^{2}}}=1-\dfrac{1}{2} t^{2}+\dfrac{3}{8} t^{4}+\ldots \nonumber \]

    Comparing these expansions, we have the \(P_{n}(0)=0\) for \(n\) odd and for even integers one can show (see Problem 7.10) that

    \[P_{2 n}(0)=(-1)^{n} \dfrac{(2 n-1) ! !}{(2 n) ! !}, \label{7.20} \]

    where \(n!!\) is the double factorial,

    \(n ! !=\left\{\begin{array}{cc}
    n(n-2) \ldots(3) 1, & n>0, \text { odd } \\
    n(n-2) \ldots(4) 2, & n>0, \text { even } . \\
    1 & n=0,-1
    \end{array}\right.\)

    Example 7.4. Evaluate \(P_n(-1)\). This is a simpler problem. In this case we have

    \[g(-1, t)=\dfrac{1}{\sqrt{1+2 t+t^{2}}}=\dfrac{1}{1+t}=1-t+t^{2}-t^{3}+\ldots \nonumber \]

    Therefore, \(P_{n}(-1)=(-1)^{n}\).

    We can also use the generating function to find recursion relations. To prove the three term recursion (7.14) that we introduced above, then we need only differentiate the generating function with respect to \(t\) in Equation (7.18) and rearrange the result. First note that

    \[\dfrac{\partial g}{\partial t}=\dfrac{x-t}{\left(1-2 x t+t^{2}\right)^{3 / 2}}=\dfrac{x-t}{1-2 x t+t^{2}} g(x, t) \nonumber \]

    Combining this with

    \[\dfrac{\partial g}{\partial t}=\sum_{n=0}^{\infty} n P_{n}(x) t^{n-1} \nonumber \]

    we have

    \[(x-t) g(x, t)=\left(1-2 x t+t^{2}\right) \sum_{n=0}^{\infty} n P_{n}(x) t^{n-1} . \nonumber \]

    Inserting the series expression for \(g(x, t)\) and distributing the sum on the right side, we obtain

    \[(x-t) \sum_{n=0}^{\infty} P_{n}(x) t^{n}=\sum_{n=0}^{\infty} n P_{n}(x) t^{n-1}-\sum_{n=0}^{\infty} 2 n x P_{n}(x) t^{n}+\sum_{n=0}^{\infty} n P_{n}(x) t^{n+1} . \nonumber \]

    Rearranging leads to three separate sums:

    \[\sum_{n=0}^{\infty} n P_{n}(x) t^{n-1}-\sum_{n=0}^{\infty}(2 n+1) x P_{n}(x) t^{n}+\sum_{n=0}^{\infty}(n+1) P_{n}(x) t^{n+1}=0 \label{7.21} \]

    Each term contains powers of \(t\) that we would like to combine into a single sum. This is done by reindexing. For the first sum, we could use the new index \(k=n-1\). Then, the first sum can be written

    \[\sum_{n=0}^{\infty} n P_{n}(x) t^{n-1}=\sum_{k=-1}^{\infty}(k+1) P_{k+1}(x) t^{k} \nonumber \]

    Using different indices is just another way of writing out the terms. Note that

    \[\sum_{n=0}^{\infty} n P_{n}(x) t^{n-1}=0+P_{1}(x)+2 P_{2}(x) t+3 P_{3}(x) t^{2}+\ldots \nonumber \]

    and

    \[\sum_{k=-1}^{\infty}(k+1) P_{k+1}(x) t^{k}=0+P_{1}(x)+2 P_{2}(x) t+3 P_{3}(x) t^{2}+\ldots \nonumber \]

    actually give the same sum. The indices are sometimes referred to as dummy indices because they do not show up in the expanded expression and can be replaced with another letter.

    If we want to do so, we could now replace all of the \(k\)'s with \(n\)'s. However, we will leave the \(k\)'s in the first term and now reindex the next sums in Equation (7.21). The second sum just needs the replacement \(n=k\) and the last sum we reindex using \(k=n+1\). Therefore, Equation (7.21) becomes

    \[\sum_{k=-1}^{\infty}(k+1) P_{k+1}(x) t^{k}-\sum_{k=0}^{\infty}(2 k+1) x P_{k}(x) t^{k}+\sum_{k=1}^{\infty} k P_{k-1}(x) t^{k}=0 \label{7.22} \]

    We can now combine all of the terms, noting the \(k=-1\) term is automatically zero and the \(k=0\) terms give

    \[P_{1}(x)-x P_{0}(x)=0 . \label{7.23} \]

    Of course, we know this already. So, that leaves the \(k>0\) terms:

    \[\sum_{k=1}^{\infty}\left[(k+1) P_{k+1}(x)-(2 k+1) x P_{k}(x)+k P_{k-1}(x)\right] t^{k}=0 \label{7.24} \]

    Since this is true for all \(t\), the coefficients of the \(t^{k}\)'s are zero, or

    \[(k+1) P_{k+1}(x)-(2 k+1) x P_{k}(x)+k P_{k-1}(x)=0, \quad k=1,2, \ldots \nonumber \]

    There are other recursion relations. For example,

    \[P_{n+1}^{\prime}(x)-P_{n-1}^{\prime}(x)=(2 n+1) P_{n}(x) . \label{7.25} \]

    This can be proven using the generating function by differentiating \(g(x, t)\) with respect to \(x\) and rearranging the resulting infinite series just as in this last manipulation. This will be left as Problem 7.4.

    Another use of the generating function is to obtain the normalization constant. Namely, \(\left\|P_{n}\right\|^{2}\). Squaring the generating function, we have

    \[\dfrac{1}{1-2 x t+t^{2}}=\left[\sum_{n=0}^{\infty} P_{n}(x) t^{n}\right]^{2}=\sum_{n=0}^{\infty} \sum_{m=0}^{\infty} P_{n}(x) P_{m}(x) t^{n+m} \label{7.26} \]

    Integrating from -1 to 1 and using the orthogonality of the Legendre polynomials, we have

    \[\begin{aligned}
    \int_{-1}^{1} \dfrac{d x}{1-2 x t+t^{2}} &=\sum_{n=0}^{\infty} \sum_{m=0}^{\infty} t^{n+m} \int_{-1}^{1} P_{n}(x) P_{m}(x) d x \\
    &=\sum_{n=0}^{\infty} t^{2 n} \int_{-1}^{1} P_{n}^{2}(x) d x
    \end{aligned} \label{7.27} \]

    However, one can show that

    \[\int_{-1}^{1} \dfrac{d x}{1-2 x t+t^{2}}=\dfrac{1}{t} \ln \left(\dfrac{1+t}{1-t}\right) . \nonumber \]

    Expanding this expression about \(t=0\), we obtain

    \[\dfrac{1}{t} \ln \left(\dfrac{1+t}{1-t}\right)=\sum_{n=0}^{\infty} \dfrac{2}{2 n+1} t^{2 n} \nonumber \]

    Comparing this result with Equation (7.27), we find that

    \[\left\|P_{n}\right\|^{2}=\int_{-1}^{1} P_{n}(x) P_{m}(x) d x=\dfrac{2}{2 n+1} . \label{7.28} \]

    7.2.4 Eigenfunction Expansions

    Finally, we can expand other functions in this orthogonal basis. This is just a generalized Fourier series. A Fourier-Legendre series expansion for \(f(x)\) on \([-1,1]\) takes the form

    \[f(x) \sim \sum_{n=0}^{\infty} c_{n} P_{n}(x) . \label{7.29} \]

    As before, we can determine the coefficients by multiplying both sides by \(P_{m}(x)\) and integrating. Orthogonality gives the usual form for the generalized Fourier coefficients. In this case, we have

    \[c_{n}=\dfrac{<f, P_{n}>}{\left\|P_{n}\right\|^{2}}, \nonumber \]

    where

    \[<f, P_{n}>=\int_{-1}^{1} f(x) P_{n}(x) d x . \nonumber \]

    We have just found \(\left\|P_{n}\right\|^{2}=\dfrac{2}{2 n+1}\). Therefore, the Fourier-Legendre coefficients are

    \[c_{n}=\dfrac{2 n+1}{2} \int_{-1}^{1} f(x) P_{n}(x) d x . \label{7.30} \]

    Example 7.5. Expand \(f(x) = x^3\) in a Fourier-Legendre series.

    We simply need to compute

    \[c_{n}=\dfrac{2 n+1}{2} \int_{-1}^{1} x^{3} P_{n}(x) d x \label{7.31} \]

    We first note that

    \[\int_{-1}^{1} x^{m} P_{n}(x) d x=0 \quad \text { for } m<n . \nonumber \]

    This is simply proven using Rodrigues formula. Inserting Equation (7.12), we have

    \[\int_{-1}^{1} x^{m} P_{n}(x) d x=\dfrac{1}{2^{n} n !} \int_{-1}^{1} x^{m} \dfrac{d^{n}}{d x^{n}}\left(x^{2}-1\right)^{n} d x . \nonumber \]

    Since \(m<n\), we can integrate by parts $m$-times to show the result, using \(P_{n}(1)=1\) and \(P_{n}(-1)=(-1)^{n}\). As a result, we will have for this example that \(c_{n}=0\) for \(n>3\).

    We could just compute \(\int_{-1}^{1} x^{3} P_{m}(x) d x\) for \(m=0,1,2, \ldots\) outright. But, noting that \(x^{3}\) is an odd function, we easily confirm that \(c_{0}=0\) and \(c_{2}=0\). This leaves us with only two coefficients to compute. These are

    \[c_{1}=\dfrac{3}{2} \int_{-1}^{1} x^{4} d x=\dfrac{3}{5} \nonumber \]

    and

    \[c_{3}=\dfrac{7}{2} \int_{-1}^{1} x^{3}\left[\dfrac{1}{2}\left(5 x^{3}-3 x\right)\right] d x=\dfrac{2}{5} \nonumber \]

    Thus,

    \[x^{3}=\dfrac{3}{5} P_{1}(x)+\dfrac{2}{5} P_{3}(x) . \nonumber \]

    Of course, this is simple to check using Table 7.2.1:

    \[\dfrac{3}{5} P_{1}(x)+\dfrac{2}{5} P_{3}(x)=\dfrac{3}{5} x+\dfrac{2}{5}\left[\dfrac{1}{2}\left(5 x^{3}-3 x\right)\right]=x^{3} . \nonumber \]

    Well, maybe we could have guessed this without doing any integration. Let's see,

    \[\begin{aligned}
    x^{3} &=c_{1} x+\dfrac{1}{2} c_{2}\left(5 x^{3}-3 x\right) \\
    &=\left(c_{1}-\dfrac{3}{2} c_{2}\right) x+\dfrac{5}{2} c_{2} x^{3} .
    \end{aligned} \label{7.32} \]

    Equating coefficients of like terms, we have that \(c_{2}=\dfrac{2}{5}\) and \(c_{1}=\dfrac{3}{2} c_{2}=\dfrac{3}{5}\).

    Example7.6. Expand the Heaviside function in a Fourier-Legendre series.

    The Heaviside function is defined as

    \[H(x)=\left\{\begin{array}{l}
    1, x>0 \\
    0, x<0
    \end{array}\right. \label{7.33} \]

    In this case, we cannot find the expansion coefficients without some integration. We have to compute

    \[\begin{aligned}
    c_{n} &=\dfrac{2 n+1}{2} \int_{-1}^{1} f(x) P_{n}(x) d x \\
    &=\dfrac{2 n+1}{2} \int_{0}^{1} P_{n}(x) d x, \quad n=0,1,2, \ldots
    \end{aligned} \label{7.34} \]

    For \(n=0\), we have

    \[c_{0}=\dfrac{1}{2} \int_{0}^{1} d x=\dfrac{1}{2} . \nonumber \]

    For \(n>1\), we make use of the identity (7.25) to find

    \[c_{n}=\dfrac{1}{2} \int_{0}^{1}\left[P_{n+1}^{\prime}(x)-P_{n-1}^{\prime}(x)\right] d x=\dfrac{1}{2}\left[P_{n-1}(0)-P_{n+1}(0)\right] . \nonumber \]

    Thus, the Fourier-Bessel series for the Heaviside function is

    \[f(x) \sim \dfrac{1}{2}+\dfrac{1}{2} \sum_{n=1}^{\infty}\left[P_{n-1}(0)-P_{n+1}(0)\right] P_{n}(x) . \nonumber \]

    We need to evaluate \(P_{n-1}(0)-P_{n+1}(0)\). Since \(P_{n}(0)=0\) for \(n\) odd, the \(c_{n}\)'s vanish for \(n\) even. Letting \(n=2 k-1\), we have

    \[f(x) \sim \dfrac{1}{2}+\dfrac{1}{2} \sum_{k=1}^{\infty}\left[P_{2 k-2}(0)-P_{2 k}(0)\right] P_{2 k-1}(x) . \nonumber \]

    We can use Equation (7.20),

    \[P_{2 k}(0)=(-1)^{k} \dfrac{(2 k-1) ! !}{(2 k) ! !}, \nonumber \]

    to compute the coefficients:

    \[\begin{aligned}
    f(x) & \sim \dfrac{1}{2}+\dfrac{1}{2} \sum_{k=1}^{\infty}\left[P_{2 k-2}(0)-P_{2 k}(0)\right] P_{2 k-1}(x) \\
    &=\dfrac{1}{2}+\dfrac{1}{2} \sum_{k=1}^{\infty}\left[(-1)^{k-1} \dfrac{(2 k-3) ! !}{(2 k-2) ! !}-(-1)^{k} \dfrac{(2 k-1) ! !}{(2 k) ! !}\right] P_{2 k-1}(x) \\
    &=\dfrac{1}{2}-\dfrac{1}{2} \sum_{k=1}^{\infty}(-1)^{k} \dfrac{(2 k-3) ! !}{(2 k-2) ! !}\left[1+\dfrac{2 k-1}{2 k}\right] P_{2 k-1}(x) \\
    &=\dfrac{1}{2}-\dfrac{1}{2} \sum_{k=1}^{\infty}(-1)^{k} \dfrac{(2 k-3) ! !}{(2 k-2) ! !} \dfrac{4 k-1}{2 k} P_{2 k-1}(x) .
    \end{aligned} \label{7.35} \]

    The sum of the first 21 terms are shown in Figure 7.6. We note the slow convergence to the Heaviside function. Also, we see that the Gibbs phenomenon is present due to the jump discontinuity at \(x = 0\).

    7.2: Legendre Polynomials (4)
    7.2: Legendre Polynomials (2024)
    Top Articles
    Latest Posts
    Article information

    Author: Horacio Brakus JD

    Last Updated:

    Views: 5950

    Rating: 4 / 5 (51 voted)

    Reviews: 82% of readers found this page helpful

    Author information

    Name: Horacio Brakus JD

    Birthday: 1999-08-21

    Address: Apt. 524 43384 Minnie Prairie, South Edda, MA 62804

    Phone: +5931039998219

    Job: Sales Strategist

    Hobby: Sculling, Kitesurfing, Orienteering, Painting, Computer programming, Creative writing, Scuba diving

    Introduction: My name is Horacio Brakus JD, I am a lively, splendid, jolly, vivacious, vast, cheerful, agreeable person who loves writing and wants to share my knowledge and understanding with you.