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

Theorem

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

Proof
Let $u = p^2 + q^2$ and $v = q^2 - p^2$.

Then:

Also:

Therefore: