# Integration of $\cos(2x)\cos(nx)$

I'm struggling to integrate $\int \cos(2x)\cos(nx)\,\mathrm{ d}x$

I seem to be going round in circles and would be grateful if someone could help? I think I need to use a trig expansion or identity but I'm not sure which one?

Thanks =)

-
Are you familiar with the product-to-sum formulas? – Qiaochu Yuan May 4 '11 at 9:32
It would be nice if you accept an answer, so that this question is not in the unanswered list. – user9413 May 6 '11 at 2:52

As Qiaochu said please convert the product into sum. You know that $2 \cos A \cdot \cos B = \cos (A +B) + \cos (A -B)$. So you integral is:

\begin{align*} \int \cos{2x} \cdot \cos{nx} \ \text{dx} &= \frac{1}{2} \int 2 \cos{x} \cdot \cos{nx} \ \text{dx} \\ &= \frac{1}{2} \int \Bigl[\cos{(n+2)x} + \cos{(n-2)x} \Bigr] \ \text{dx} \end{align*}

-
Thats great, thanks very much for both of your help! =)does the product to sums formula apply for sin as well? – SJT May 4 '11 at 9:58
@SJT: Yes, it does. Please refer this link ilovemaths.com/3productsum.asp – user9413 May 4 '11 at 9:59

Here is how I think about or do this kind of a problem.

Let $\displaystyle I = \int \cos{2x}\cos{nx}\;{dx}$, and $\displaystyle J = \int\sin{2x}\sin{nx}\;{dx}$, then $\displaystyle I+J = \int \cos{2x}\cos{nx}+\sin{2x}\sin{nx}\;{dx} = \int \cos(2x-nx)\;{dx}$ and $\displaystyle I-J = \int \cos{2x}\cos{nx}-\sin{2x}\sin{nx}\;{dx} = \int \cos(2x+nx)\;{dx}$ so

$\displaystyle (I+J)+(I-J) = \frac{1}{2-n}\sin\left(2x-nx\right)+\frac{1}{2+n}\sin\left(2x+nx\right)+k$ and thus $\displaystyle I = \frac{1}{4-2n}\sin\left(2x-nx\right)+\frac{1}{4+2n}\sin\left(2x+nx\right)+K.$

-