# Primitive of x by Cotangent of a x

## Theorem

$\displaystyle \int x \cot a x \rd x = \frac 1 {a ^ 2} \paren {a x - \frac {\paren {a x}^3} 9 - \frac {\paren {a x}^5} {225} - \cdots + \frac {\paren {-1}^n 2^{2 n} B_{2 n} \paren {a x}^{2 n + 1} } {\paren {2 n + 1} !} + \cdots} + C$

where $B_{2 n}$ denotes the $2 n$th Bernoulli number.

## Proof

 $\displaystyle \cot x$ $=$ $\displaystyle \sum_{n \mathop = 0}^\infty \frac {\paren {-1}^n 2^{2 n} B_{2 n} \, x^{2 n - 1} } {\paren {2 n}!}$ $\displaystyle$ $=$ $\displaystyle \frac 1 x - \frac x 3 - \frac {x^3} {45} - \frac {2 x^5} {945} + \cdots$

where $B_{2 n}$ denotes the Bernoulli numbers.

This converges for $0 < \size x < \pi$.

 $\displaystyle x \cot ax$ $=$ $\displaystyle \sum_{n \mathop = 0}^\infty \frac {\paren {-1}^n 2^{2 n} B_{2 n} a^{2 n - 1} x^{2 n} } {\paren {2 n}!}$ $\displaystyle \leadsto \ \$ $\displaystyle \int x \cot a x \rd x$ $=$ $\displaystyle \int \sum_{n \mathop = 0}^\infty \frac {\paren {-1}^n 2^{2 n} B_{2 n} a^{2 n - 1} x^{2 n} } {\paren {2 n}!} \rd x$ $\displaystyle$ $=$ $\displaystyle \sum_{n \mathop = 0}^\infty \paren {\int \frac {\paren {-1}^n 2^{2 n} B_{2 n} a^{2 n - 1} x^{2 n} } {\paren {2 n}!} \rd x}$ $\displaystyle$ $=$ $\displaystyle \sum_{n \mathop = 0}^\infty \paren {\frac {\paren {-1}^n 2^{2 n} B_{2 n} a^{2 n - 1} } {\paren {2 n}!} \times \int x^{2 n} \rd x}$ $\displaystyle$ $=$ $\displaystyle \sum_{n \mathop = 0}^\infty \paren {\frac {\paren {-1}^n 2^{2 n} B_{2 n} a^{2 n - 1} } {\paren {2 n}!} \times \frac {x^{2 n + 1} } {2 n + 1} + C}$ Primitive of Power $\displaystyle$ $=$ $\displaystyle \sum_{n \mathop = 0}^\infty \frac {\paren {-1}^n 2^{2 n} B_{2 n} a^{2 n - 1} x^{2 n + 1} } {\paren {2 n + 1}!} + C$ $\displaystyle \leadsto \ \$ $\displaystyle \int x \cot a x \rd x$ $=$ $\displaystyle \frac 1 {a^2} \sum_{n \mathop = 0}^\infty \frac {\paren {-1}^n 2^{2 n} B_{2 n} \paren {a x}^{2 n + 1} } {\paren {2 n + 1}!} + C$

$\blacksquare$