Primitive of Reciprocal of square of p plus q by Sine of a x/Lemma

Lemma for Primitive of $\dfrac 1 {\paren {p + q \sin a x}^2}$
Let $u = \tan \dfrac \theta 2$.

Then:
 * $\dfrac 1 {p + q \sin a x} = \dfrac {u^2 + 1} {p u^2 + 2 q u + p}$

Proof
From Tangent Half-Angle Substitution for Sine: