How can the sum of a series with $\sin(n\pi)$ as a multiplicative term not be $0$?

46 Views Asked by At

I'm sure I'm just being silly here, but this has me really stumped. I'm doing PDEs and frequently either the integral of $\sin(x)\sin(nx)$ or that of $\cos(x)\cos(nx)$ will come up. When the limits are $0$ to $\pi$, I don't understand how both of these aren't $0$ for any $n$. You'd get $-\frac{\sin(\pi n)}{n^2-1}$ for the first, and $-\frac{n\sin(\pi n)}{n^2-1}$ for the second. To me it seems like these terms should be $0$ for every integer value of $n$, but that's not the case. The infinite series for both is $\frac{\pi}{2}$. How?

To make the question clearer, what I can't understand is the second equality here: $$\sum_{n=1}^{\infty}\int_0^\pi \sin(x)\sin(nx)dx=\sum_{n=1}^{\infty}-\frac{\sin(\pi n)}{n^2-1}=\frac{\pi}{2}.$$

1

There are 1 best solutions below

0
On BEST ANSWER

Notice that

$$\frac{\sin(n\pi)}{n^2 -1}$$

isn't defined when $n=1$, and similar for your other expression. Yes, $\sin(n\pi) = 0$, but with the $n^2-1$, when $n=1$, you get a $0/0$ expression.

You'll need to do something to handle the $n=1$ case specifically as a result, e.g. find $\int_0^\pi \sin^2(x) \, d x$ instead.