Primitive of Reciprocal of Sine of a x plus Cosine of a x/Proof 2

Theorem

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