3
$\begingroup$

How to show that $\displaystyle\frac{1}{\pi} \int_{-\pi}^{\pi} \cos(mx)\cos(nx) \,dx = \delta_{mn}$?

If you use $\cos(x)\cos(y)=\cos(x-y)+\cos(x-y)$, you get that

$$\begin{align} \frac{1}{\pi} \int_{-\pi}^{\pi} \cos(mx)\cos(nx) \,dx &= \frac{1}{\pi}\left( \int_{-\pi}^{\pi} \cos((m-n)x)\,dx+\int_{-\pi}^{\pi} \cos((m+n)x) \,dx \right) \\ &= \frac{1}{\pi}\left(\left[\frac{1}{m-n}\sin((m-n)x)\right]_{x=-\pi}^{x=\pi}+\left[\frac{1} {m+n}\sin((m+n)x)\right]_{x=-\pi}^{x=\pi}\right) \\ &= \frac{1}{\pi}\frac{2((n-m)\sin(\pi n+\pi m)+(n+m)\sin(\pi n-\pi m))}{2 n^2-2 m^2 }. \end{align}$$

But now if I consider $m=n=k$, then integral goes to $0$ and if I consider $m \neq n$, then it still goes to $0$. $\delta_{mn}$ is Kronecker delta.

  • 2
    If $m=n$, you can't write the second line in your align.2012-09-10
  • 0
    Too much work. Look at the graph and realize that if $k\ne0$, $\int_{-\pi}^\pi\cos(kx)dx=0$: there’s as much above the axis as below. On the other hand, the integral of $\cos^2(kx)$ over the same interval is clearly $1/2$ times the length, ’cause there’s as much below the line $y=1/2$ as above.2012-09-10
  • 1
    Better explanation for $\cos^2(kx)$: this function is $\cos(2kx)+1/2$, and the previous argument applies.2012-09-10
  • 0
    Your conclusion that the integral goes to $0$ when $m = n$ is wrong. You actually get $0/0$, which tells you that the formula is not valid when $m = n$.2012-09-10

1 Answers 1

6

When you integrate, be cautious about inadvertently dividing by $0$. Treat such situations entirely separately.