# Primitive of Square of Cosine of a x over Sine of a x

## Theorem

$\displaystyle \int \frac {\cos^2 a x \ \mathrm d x} {\sin a x} = \frac {\cos a x} a + \frac 1 a \ln \left\vert{\tan \frac {a x} 2}\right\vert + C$

## Proof

 $\displaystyle \int \frac {\cos^2 a x \ \mathrm d x} {\sin a x}$ $=$ $\displaystyle \int \frac {\left({1 - \sin^2 a x}\right) \ \mathrm d x} {\sin a x}$ Sum of Squares of Sine and Cosine $\displaystyle$ $=$ $\displaystyle \int \frac {\mathrm d x} {\sin a x} - \int \sin a x \ \mathrm d x$ Linear Combination of Integrals $\displaystyle$ $=$ $\displaystyle \int \csc a x \ \mathrm d x - \int \sin a x \ \mathrm d x$ Cosecant is Reciprocal of Sine $\displaystyle$ $=$ $\displaystyle \frac {\cos a x} a + \int \csc a x \ \mathrm d x + C$ Primitive of $\sin a x$ $\displaystyle$ $=$ $\displaystyle \frac {\cos a x} a + \frac 1 a \ln \left\vert{\tan \frac {a x} 2}\right\vert + C$ Primitive of $\csc a x$

$\blacksquare$