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

$\displaystyle \int \frac {\d x} {p^2 \sin^2 a x - q^2 \cos^2 a x} = \frac 1 {2 a p q} \ln \size {\frac {p \tan a x - q} {p \tan a x + q} } + C$
 $\displaystyle \int \frac {\d x} {p^2 \sin^2 a x - q^2 \cos^2 a x}$ $=$ $\displaystyle \int \frac {\sec^2 a x} {p^2 \tan^2 a x - q^2} \rd x$ multiplying by $\dfrac {\sec^2 a x} {\sec^2 a x}$ $\displaystyle$ $=$ $\displaystyle \frac 1 a \int \frac 1 {p^2 t^2 - q^2} \rd t$ substituting $t = \tan a x$ $\displaystyle$ $=$ $\displaystyle \frac 1 {a p^2} \int \frac 1 {t^2 - \paren {\frac q p}^2} \rd t$ $\displaystyle$ $=$ $\displaystyle \frac 1 {2 a \frac {p^2} p q} \ln \size {\frac {t - \frac q p} {t + \frac q p} } + C$ Primitive of $\dfrac 1 {x^2 - a^2}$: Logarithm Form $\displaystyle$ $=$ $\displaystyle \frac 1 {2 a p q} \ln \size {\frac {p t - q} {p t + q} } + C$ $\displaystyle$ $=$ $\displaystyle \frac 1 {2 a p q} \ln \size {\frac {p \tan a x - q} {p \tan a x + q} } + C$ substituting back for $t$
$\blacksquare$