Consider the following integral .
I=∫12+cosxdx
Using a given formula. and differentiate both side w.r.t x
I=∫12+cosxdx
u=tanx2
cosx=1−u21+u2
dx=2du1+u2
=∫12+1−u21+u22du1+u2
=∫2du3+u2
=2∫du(√3)2+u2
I=23tan−1(u√3)+C
I=23tan−1⎛⎜ ⎜⎝tanx2√3⎞⎟ ⎟⎠+C
Hence, this is the correct answer.