using tangent half substitution show that integral of

sec(x)=ln(secx+tanx)

If tan(x/2)=u then

dx=2du/(1+u^2), sec(x)=(1+u^2)/(1-u^2)

Integral of sec(x)dx=Integral of 2du/(1-u^2)=ln((1+u)/(1-u))

(1+tan(x/2))/(1-tan(x/2))=
(cos(x/2)+sin(x/2))/(cos(x/2)-sin(x/2))=

Multiply numerator and denominator by
cos(x/2)+sin(x/2)

=(1+sin(x))/cos(x)=sec(x)+tan(x)