integrate (cos3x)^2/(1-2pcos(2x)+p^2) dx from x=0 to 2pi for 0<p<1