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

Theorem

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