We have to integrate (cos 3x)^2 dx.

We know that cos 2x = 2*(cos x)^2 - 1

=> (cos x)^2 = (1 + cos 2x)/2

The expressions we have can be written as (1 + cos 6x)/2

Int [ (cos 3x)^2 dx)

=> Int [ (1 + cos 6x)/2 dx]

let u = 6x

=> du/6 = dx

Int [ (1 + cos 6x)/2 dx]

=> (1/2)(1/6)*Int [ (1 + cos u) du ]

=> (1/12)* (u + sin u)

substituting u = 6x

=> (1/12)(6x + sin 6x) + C

**The required integral is (1/12)(6x + sin 6x) + C**