Primitive of Reciprocal of p plus q by Cotangent of a x

Theorem

 * $\displaystyle \int \frac {\mathrm d x}{p + q \cot a x} = \frac {p x} {p^2 + q^2} - \frac q {a \left({p^2 + q^2}\right)} \ln \left\vert{p \sin a x + q \cos a x}\right\vert + C$

Also see

 * Primitive of $\dfrac 1 {p + q \tan a x}$