# problem in integration

• September 23rd 2008, 09:37 AM
panda
problem in integration
I'm supposed to integrate
pi
∫ (cos nx)(cosx)^2 dx
0

how do i integrate this?
• September 23rd 2008, 09:55 AM
Jameson
My first guess would be convert $\cos^2(x)$ to $1-\sin^2(x)$ and then it becomes a trivial integral plus a u-sub one.
• September 23rd 2008, 09:55 AM
Chop Suey
First, use the half angle identity to get rid of the cos^2(x).

$\cos^2{x} = \frac{1}{2}(1+\cos{2x})$

Multiplying this with \cos{nx} will get you

$\frac{1}{2} \int (\cos{nx} + \cos{nx}\cos{2x}) dx$

First one should be easy. For the second one, you can use either integration by parts or the product to sum identity:

$\cos{a}\cos{b} = \frac{1}{2}(\cos{(a-b)}+\cos{(a+b)})$
• September 23rd 2008, 09:59 AM
Jameson
I didn't see the (nx) term. Sorry. Obviously the above substitution is the one to go with now.