If the solve the problem
Question:

$\int \cos m x \cos n x d x, m \neq n$

Solution:

We know $2 \cos A \cos B=\cos (A-B)+\cos (A+B)$

$\therefore \cos m x \cos n x=\frac{\cos (m-n) x+\cos (m+n) x}{2}$

$\therefore$ The above equation becomes

$\Rightarrow \int \frac{1}{2}(\cos (\mathrm{m}-\mathrm{n}) \mathrm{x}+\cos (\mathrm{m}+\mathrm{n}) \mathrm{x}) \mathrm{d} \mathrm{x}$

We know $\int \cos a x d x=\frac{1}{a} \sin a x+c$

$\Rightarrow \frac{1}{2}\left(\frac{1}{m-n} \sin (m-n) x+\frac{1}{m+n} \sin (m+n) x\right)$

$\Rightarrow \frac{1}{2}\left(\frac{(m+n) \sin (m-n) x+(m-n) \sin (m+n) x}{m^{2}-n^{2}}\right)+c$