Primitive of Cosine of a x over Sine of a x plus phi

Theorem

 * $\ds \int \frac {\cos a x \rd x} {\map \sin {a x + \phi} } = \frac {\ln \size {\map \sin {a x + \phi} } } {a \cos \phi} + \tan \phi \int \frac {\sin a x \rd x} {\map \sin {a x + \phi} } + C$

Proof
First note that:

Then: