Solution:
By standard trigonometric identity, we have,
1+cosxsin2x=2cos22x(2sin2xcos2x)2=2cos22x4sin22xcos22x
On simplifying, we get,
=2sin22x
From the standard trigonometric identity, we have, 1−cosx=2sin22x
=1−cosx
On integrating both the sides, we get,
∫1+cosxsin2xdx=∫(1−cosx)dx=x−sinx+C