Solution:
By standard trigonometric identity, we have,
1+cosx1−cosx=2cos22x2sin22x
We know that, (sinx/cosx)=tanx
=tan22x
Also, we know that, tan2x=sec2x−1
=(sec22x−1)
Integrating both the sides, we get,
∴∫1+cosx1−cosxdx=∫(sec22x−1)dx=[21tan2x−x]+C=2tan2x−x+C