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
From Power Series Expansion for Cotangent Function:

Also see

 * Primitive of $x \sin a x$
 * Primitive of $x \cos a x$
 * Primitive of $x \tan a x$
 * Primitive of $x \sec a x$
 * Primitive of $x \csc a x$