How to calculate this integral $\int_{-\pi}^\pi \cos(rx) \cos(kx)dx$

by hichewness   Last Updated July 12, 2019 10:20 AM - source

How should I calculate this integral? $$\int_{-\pi}^\pi \cos(rx) \cos(kx)dx$$

[My attempt] $$\int_{-\pi}^\pi \cos(rx) \cos(kx)dx=2\int_0^\pi \frac{1}{2}\cos(r+k)x +\cos(r-k)xdx \\=[\frac{1}{r+k}\sin(r+k)x+\frac{1}{r-k}sin(r-k)x]_0^\pi \\ =\frac{1}{r+k}\sin(r+k)\pi+\frac{1}{r-k}\sin(r-k)\pi$$ I have calculated so far, but I do not know the steps ahead. What should I do?



Answers 3


Hint: Use that $$\cos(x)\cos(y)=\frac{1}{2}\left(\cos(x-y)+\cos(x+y)\right)$$ Your result should be $$2\,{\frac {k\sin \left( \pi\,k \right) \cos \left( \pi\,r \right) -r \cos \left( \pi\,k \right) \sin \left( \pi\,r \right) }{{k}^{2}-{r}^{2 }}} $$

Dr. Sonnhard Graubner
Dr. Sonnhard Graubner
July 12, 2019 09:44 AM

$\cos (rx)\cos (kx)=\frac {\cos((r+k)x) +\cos((r-k)x)} 2$. Can you now compute the integral?

Kavi Rama Murthy
Kavi Rama Murthy
July 12, 2019 09:44 AM

Note that $\cos(u)\cos(v)=\frac{1}{2}[\cos(u+v)+\cos(u-v)]$

Therefore, $\int_{a}^{b}\cos(u)\cos(v)dx=\frac{1}{2}\int_{a}^{b}[\cos(u+v)+\cos(u-v)]dx$

Putting $a=-\pi$, $b=\pi$, $u=rx$, $v=kx$, we get

$\int_{-\pi}^{\pi}\cos(rx)\cos(kx)dx=\frac{1}{2}\int_{-\pi}^{\pi}[\cos(rx+kx)+\cos(rx-kx)]dx$

$=\frac{1}{2}\int_{-\pi}^{\pi}[\cos((r+k)x)+\cos((r-k))]dx$

$=\frac{1}{2}[\frac{\sin((r+k)x)}{r+k}+\frac{\sin((r-k)x)}{r-k}]_{-\pi}^{\pi}$

$=\frac{1}{2}[\frac{\sin((r+k)\pi)}{r+k}+\frac{\sin((r-k)\pi)}{r-k}]-\frac{1}{2}[\frac{-\sin((r+k)\pi)}{r+k}+\frac{-\sin((r-k)\pi)}{r-k}]$

$=\frac{1}{2}[\frac{\sin((r+k)\pi)}{r+k}+\frac{\sin((r-k)\pi)}{r-k}]+\frac{1}{2}[\frac{\sin((r+k)\pi)}{r+k}+\frac{\sin((r-k)\pi)}{r-k}]$

$=\frac{\sin((r+k)\pi)}{r+k}+\frac{\sin((r-k)\pi)}{r-k}$

Hussain-Alqatari
Hussain-Alqatari
July 12, 2019 10:03 AM

Related Questions


Show that $f_n\to f$ uniformly on $\mathbb{R}$

Updated March 09, 2019 10:20 AM