Primitive of Secant of a x/Tangent Form

Theorem

 * $\displaystyle \int \sec a x \ \mathrm d x = \frac 1 a \ln \left \vert {\tan \left({\frac \pi 4 + \frac {a x} 2}\right)} \right \vert + C$

where $\tan \left({\dfrac \pi 4 + \dfrac {a x} 2}\right) \ne 0$.