Why is that $\int_{-L}^{L} \cos{\left(\frac{m\pi x}{L}\right)}\cos{\left(\frac{n\pi x}{L}\right)}dx=\delta_{mn}L$ does not work for $m=0$?

216 Views Asked by At

I have this expression $$\int_{-L}^{L} \cos{\left(\frac{m\pi x}{L}\right)}\cos{\left(\frac{n\pi x}{L}\right)}dx$$ my book says that this is equal to $$\int_{-L}^{L} \cos{\left(\frac{m\pi x}{L}\right)}\cos{\left(\frac{n\pi x}{L}\right)}dx=\delta_{mn}L$$ except when $m=0$. In this case, it says, we have $$\int_{-L}^{L} \cos{\left(\frac{n\pi x}{L}\right)}dx=2L\delta_{0n}$$

Why is that?

If I put $m=0$ I will have $$\int_{-L}^{L} \cos{\left(\frac{n\pi x}{L}\right)}dx=\left[\frac{L\sin{(\frac{n\pi x}{L})}}{n\pi}\right]_{-L}^L=\frac{L}{n\pi}[\sin{(n\pi)}-\sin{(-n\pi)}]=\frac{2L(-1)^n}{n\pi}$$ how do they obtain that?

1

There are 1 best solutions below

4
On BEST ANSWER

For $n=0$ we have

$$\int_{-L}^L \cos(n\pi x/L)\,dx=\int_{-L}^L (1)\,dx=2L \tag 1$$

And for $n\ne 0$, we have

$$\begin{align} \int_{-L}^L \cos(n\pi x/L)\,dx&=\left.\left(\frac{\sin(n\pi x/L)}{n\pi /L}\right)\right|_{-L}^L \\\\ &=\frac{\sin(n\pi )-\sin(-n\pi)}{n\pi/L}\\\\ &=0\tag 2 \end{align}$$

since $\sin(n\pi )=0\ne (-1)^n$ for all integer $n$.

Putting $(1)$ and $(2)$ together, we find that

$$\int_{-L}^L \cos(n\pi x/L)\,dx=2L\delta_{n,0}$$

as was to be shown!