Primitive of Reciprocal of p by Sine of a x plus q by Cosine of a x

Theorem

 * $\displaystyle \int \frac {\mathrm d x} {p \sin a x + q \cos a x} = \frac 1 {a \sqrt {p^2 + q^2} } \ln \tan \left\vert{\frac {a x + \arctan \dfrac q p} 2}\right\vert + C$

Also see

 * Primitive of $\dfrac 1 {p \sin a x + q \cos a x + r}$