# 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 {\d x} {p^2 \sin^2 a x + q^2 \cos^2 a x} = \frac 1 {a p q} \map \arctan {\frac {p \tan a x} q} + C$

## Proof 1

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

Then:

 $\text {(1)}: \quad$ $\displaystyle u + v$ $=$ $\displaystyle 2 q^2$ $\text {(2)}: \quad$ $\displaystyle u - v$ $=$ $\displaystyle 2 p ^2$

Also:

 $\displaystyle u^2 - v^2$ $=$ $\displaystyle \paren {u + v} \paren {u - v}$ $\displaystyle u^2 - v^2$ $=$ $\displaystyle \paren {2 q^2} \paren {2 p^2}$ from $\paren 1$ and $\paren 2$ $\text {(3)}: \quad$ $\displaystyle u^2 - v^2$ $=$ $\displaystyle 4 p^2 q^2$

Therefore:

 $\displaystyle \int \frac {\d x} {p^2 \sin^2 a x + q^2 \cos^2 a x}$ $=$ $\displaystyle \int \frac {\d x} {p^2 \paren {\frac {1 - \cos 2 a x} 2} + q^2 \cos^2 a x}$ Square of Sine $\displaystyle$ $=$ $\displaystyle \int \frac {\d x} {p^2 \paren {\frac {1 - \cos 2 a x} 2} + q^2 \paren {\frac {1 + \cos 2 a x} 2} }$ Square of Cosine $\displaystyle$ $=$ $\displaystyle \int \frac {2 \d x} {p^2 - p^2 \cos 2 a x + q^2 + q^2 \cos 2 a x}$ $\displaystyle$ $=$ $\displaystyle \int \frac {2 \d x} {p^2 + q^2 + \paren {q^2 - p^2} \cos 2 a x}$ $\displaystyle$ $=$ $\displaystyle 2 \paren { \frac 2 {\paren {2 a} \sqrt{u^2 - v^2} } } \map \arctan {\sqrt{ \frac {u - v} {u + v} } \tan \frac {\paren {2 a} x} 2} + C$ Primitive of $\dfrac 1 {p + q \cos a x}$ $\displaystyle$ $=$ $\displaystyle 2 \paren {\frac 1 {a \sqrt{4 p^2 q^2} } } \map \arctan {\sqrt{ \frac {2 p^2} {2 q^2} } \tan a x} + C$ from $\paren 3$ $\displaystyle$ $=$ $\displaystyle \paren {\frac 2 {2 a p q} } \map \arctan {\sqrt{ \frac {p^2} {q^2} } \tan a x} + C$ $\displaystyle$ $=$ $\displaystyle \paren {\frac 1 {a p q} } \map \arctan {\frac p q \tan a x} + C$ $\displaystyle$ $=$ $\displaystyle \frac 1 {a p q} \map \arctan {\frac {p \tan a x} q} + C$

$\blacksquare$

## Proof 2

 $\displaystyle \int \frac {\d x} {p^2 \sin^2 a x + q^2 \cos^2 a x}$ $=$ $\displaystyle \int \frac {\sec^2 a x \d x} {p^2 \tan^2 a x + q^2}$ multiplying by $\dfrac {\sec^2 a x} {\sec^2 a x}$ $\displaystyle$ $=$ $\displaystyle \frac 1 a \int \frac {\d t} {p^2 t^2 + q^2}$ substituting $t = \tan a x$ $\displaystyle$ $=$ $\displaystyle \frac 1 {a p^2} \int \frac {\d t} {t^2 + \paren {\frac q p}^2}$ $\displaystyle$ $=$ $\displaystyle \frac 1 {a p^2} \times \frac p q \map \arctan {\frac {p t} q} + C$ Primitive of $\dfrac 1 {x^2 + a^2}$ $\displaystyle$ $=$ $\displaystyle \frac 1 {a p q} \map \arctan {\frac {p \tan a x} q} + C$ substituting back for $t$

$\blacksquare$