\section{Primitive of x over 1 minus Cosine of a x}
Tags: Primitives involving Cosine Function

\begin{theorem}
:$\ds \int \frac {x \rd x} {1 - \cos a x} = \frac {-x} a \cot \frac {a x} 2 + \frac 2 {a^2} \ln \size {\sin \frac {a x} 2} + C$
\end{theorem}

\begin{proof}
With a view to expressing the primitive in the form:
:$\ds \int u \frac {\d v} {\d x} \rd x = u v - \int v \frac {\d u} {\d x} \rd x$
let:
{{begin-eqn}}
{{eqn | l = u
      | r = x
      | c = 
}}
{{eqn | ll= \leadsto
      | l = \frac {\d u} {\d x}
      | r = 1
      | c = Primitive of Power
}}
{{end-eqn}}
and let:
{{begin-eqn}}
{{eqn | l = \frac {\d v} {\d x}
      | r = \frac 1 {1 - \cos a x}
      | c = 
}}
{{eqn | ll= \leadsto
      | l = v
      | r = \frac {-1} a \cot \frac {a x} 2
      | c = Primitive of $\dfrac 1 {1 - \cos a x}$
}}
{{end-eqn}}
Then:
{{begin-eqn}}
{{eqn | l = \int \frac {x \rd x} {1 - \cos a x}
      | r = \int u \rd v
      | c = 
}}
{{eqn | r = x \paren {\frac {-1} a \cot \frac {a x} 2} - \int \paren {\frac {-1} a \cot \frac {a x} 2} \rd x + C
      | c = Integration by Parts
}}
{{eqn | r = \frac {-x} a \cot \frac {a x} 2 - \frac {-1} a \paren {\frac 2 a \ln \size {\sin \frac {a x} 2} } + C
      | c = Primitive of $\cot a x$
}}
{{eqn | r = \frac {-x} a \cot \frac {a x} 2 + \frac 2 {a^2} \ln \size {\sin \frac {a x} 2} + C
      | c = simplifying
}}
{{end-eqn}}
{{qed}}
\end{proof}

