We have,
I=∫1−cosx1+cosxdx …… (1)
Since,
cosx=2cos2x2−1=1−2sin2x2
Therefore,
I=∫1−(1−2sin2x2)1+2cos2x2−1dx
I=∫sin2x2cos2x2dx
I=∫tan2x2dx
I=∫(sec2x2−1)dx
I=tanx212−x+C
I=2tanx2−x+C
Hence, this is the answer.