\section{Primitive of Reciprocal of square of p plus q by Cosine of a x}
Tags: Primitives involving Cosine Function

\begin{theorem}
:$\ds \int \frac {\d x} {\paren {p + q \cos a x}^2} = \frac {q \sin a x} {a \paren {q^2 - p^2} \paren {p + q \cos a x} } - \frac p {q^2 - p^2} \int \frac {\d x} {p + q \cos a x}$
\end{theorem}

\begin{proof}
{{begin-eqn}}
{{eqn | l = \map {\dfrac \d {\d x} } {\dfrac {\sin a x} {p + q \cos a x} }
      | r = \dfrac {\paren {p + q \cos a x} \map {\frac \d {\d x} } {\sin a x} - \sin a x \map {\frac \d {\d x} } {p + q \sin a x} } {\paren {p + q \cos a x}^2}
      | c = Quotient Rule for Derivatives
}}
{{eqn | r = \dfrac {\paren {p + q \cos a x} \paren {a \cos a x} - \sin a x \paren {-a q \sin a x} } {\paren {p + q \cos a x}^2}
      | c = Derivative of Cosine Function, Derivative of Sine Function
}}
{{eqn | r = a \dfrac {p \cos a x + q \paren {\cos^2 a x + \sin^2 a x} } {\paren {p + q \cos a x}^2}
      | c = simplification
}}
{{eqn | r = a \dfrac {p \cos a x + q} {\paren {p + q \cos a x}^2}
      | c = Sum of Squares of Sine and Cosine
}}
{{eqn | r = a \dfrac {p q \cos a x + q^2} {q \paren {p + q \cos a x}^2}
      | c = 
}}
{{eqn | r = a \dfrac {p q \cos a x + q^2 + p^2 - p^2} {q \paren {p + q \cos a x}^2}
      | c = 
}}
{{eqn | r = a \dfrac {q^2 - p^2} {q \paren {p + q \cos a x}^2} + a \dfrac {p q \cos a x + p^2} {q \paren {p + q \cos a x}^2}
      | c = 
}}
{{eqn | r = a \dfrac {q^2 - p^2} {q \paren {p + q \cos a x}^2} + a \dfrac {p \paren {p + q \cos a x} } {q \paren {p + q \cos a x}^2}
      | c = 
}}
{{eqn | r = \dfrac {a \paren {q^2 - p^2} } {q \paren {p + q \cos a x}^2} + \dfrac {a p} q \dfrac 1 {p + q \cos a x}
      | c = 
}}
{{eqn | ll= \leadsto
      | l = \dfrac q {a \paren {q^2 - p^2} } \map {\dfrac \d {\d x} } {\dfrac {\sin a x} {p + q \cos a x} }
      | r = \dfrac 1 {\paren {p + q \cos a x}^2} + \dfrac p {\paren {q^2 - p^2} } \dfrac 1 {p + q \cos a x}
      | c = 
}}
{{eqn | ll= \leadsto
      | l = \dfrac q {a \paren {q^2 - p^2} } {\dfrac {\sin a x} {p + q \cos a x} }
      | r = \int \dfrac {\d x} {\paren {p + q \cos a x}^2} + \dfrac p {\paren {q^2 - p^2} } \int \dfrac {\d x} {p + q \cos a x}
      | c = 
}}
{{end-eqn}}
Hence the result.
{{qed}}
\end{proof}

