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

Theorem

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

Proof
First, let $\arctan \dfrac p q = \phi$.

Let $z = a x + \phi$.

Then:

Also see

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


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


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


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


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