User Tools

Site Tools


math121b:prob9-1

Chapter 12 Problem 9.1

Expand the following function into Legendre series. $$ f(x) = \begin{cases} -1 & -1 < x < 0 \cr 1 & 0 < x < 1 \end{cases} $$

Solution: We need to compute $$ c_n = \frac{2n+1}{2} \int_{-1}^1 f(x) P_n (x) dx $$ Then we can find that $$ f(x) \approx \sum_{n=0}^\infty c_n P_n(x). $$

To evaluate the integral, we will use the Rodrigue formula, which says $$ P_n(x) = \frac{1}{2^n n!} \frac{d^n}{dx^n} (x^2-1)^n. $$

Let's use this and apply integration by part $$ \begin{aligned} \int_{-1}^1 f(x) P_n (x) dx &= - \int_{-1}^0 P_n (x) dx + \int_0^1 P_n(x) dx \cr &= \frac{1}{2^n n!} [ -\frac{d^{n-1}}{dx^{n-1}} (x^2-1)^n|^0_{-1} + \frac{d^{n-1}}{dx^{n-1}} (x^2-1)^n|^1_0 ] \cr &= \frac{1}{2^n n!} (-2) \frac{d^{n-1}}{dx^{n-1}} (x^2-1)^n (0) \end{aligned} $$ In one of the steps, we used $\frac{d^{n-1}}{dx^{n-1}} (x^2-1)^n$ equals 0 when $x=\pm 1$.

Now, we need to figure out, what is $\frac{d^{n-1}}{dx^{n-1}} (x^2-1)^n (0)$. This is looking for $x^{n-1}$'s coefficient in $(x^2-1)^n$. Thus, we see this is only nonzero if $n-1=2m$ is an even number. That would be the binomial coefficient of $(x^2-1)^n$'s $m$-th term $$ (x^2-1)^n = (x^2)^n + {n \choose n-1} (x^2)^{n-1} (-1)^1 + \cdots + {n \choose m} (x^2)^{m} (-1)^{n-m} + \cdots $$ Hence, we have (using $n-1=2m$) $$ (d/dx)^{2m} (x^2-1)^n (0) = (2m)! {n \choose m} (-1)^{n-m} = (2m)! {2m+1 \choose m} (-1)^{m+1} $$ Hence, we get, for $n=2m+1$) $$ \int_{-1}^1 f(x) P_n (x) dx = \frac{1}{2^n n!} (-2) (2m)! {2m+1 \choose m} (-1)^{m+1} = \frac{(-1)^{m}}{2^{2m} (2m+1)} {2m+1 \choose m} $$

All in all, we have coefficient $$ c_n = \frac{2n+1}{2} \cdot \begin{cases} 0 & n \text{ even } \cr \frac{(-1)^{m}}{2^{2m} (2m+1)} {2m+1 \choose m} & n = 2m+1 \end{cases} $$

By the way, if you can find the first few terms, that would be enough.

math121b/prob9-1.txt · Last modified: 2020/03/14 13:51 by pzhou