Solution:
By standard trigonometric identity, we have,
1+cosxcosx=2cos22xcos22x−sin22x
We know that, (sinx/cosx)=tanx and takeout 21 as common, we get
=21[1−tan22x]
Integrating both the sides, we get,
∫1+cosxcosxdx=∫21[1−tan22x]dx
Using standard trigonometric identity tan2x+1=sec2(x)
=21∫[2−sec22x]dx
On integrating, we get,
=21[2x−21tan2x]+C=x−tan2x+C