Answer
Using trig identities it can be proved that
$$\int_{-\pi}^\pi{\cos mx \cos nx}dx $$
equal $\pi$ if $ m=n$
and equal 0 if $m\ne n$
Work Step by Step
$$\int_{-\pi}^\pi{\cos mx \cos nx}dx $$
Using the trig identity
$$\int_{-\pi}^\pi{\cos mx \cos nx}dx = \frac{1}{2}\int_{-\pi}^\pi{(\cos (m-n)x +\cos (m+n)x) dx}$$
since Cosine is an even function we can write $\int_{-\pi}^\pi{\cos x dx}=2\int_{0}^\pi{\cos x dx} $ the integral becomes
$$ \int_{0}^\pi{\cos (m-n)xdx} +\int_{0}^\pi{\cos (m+n)xdx}$$
hence solving the integrals give us
$$[\frac{1}{m-n}\sin(m-n)x +\frac{1}{m+n}\sin(m+n)x]^{\pi}_{0}$$
which equal
$$\frac{1}{m-n}\sin(m-n)\pi + \frac{1}{m+n}\sin(m+n)\pi$$
Since $\sin k \pi x =0$ where k is any integer
then the integral equals zero
but this argument doesn't work when m=n
we know that the limit
$$\lim\limits_{x \to 0}{\frac{\sin x}{x}}=1$$
then
if m=n then m-n=0 hence we can write
$$\lim\limits_{(m-n)\pi \to 0}\pi(\frac{1}{(m-n)\pi}\sin(m-n)\pi )=\pi$$
then if m=n the integral equal $\pi$
and if $m\ne n$ the integral equal 0