Primitive of x by Tangent of a x

Theorem

 * $\displaystyle \int x \tan a x \ \mathrm d x = \frac 1 {a^2} \left({\frac {\left({a x}\right)^3} 3 + \frac {\left({a x}\right)^5} {15} + \frac {2 \left({a x}\right)^7} {105} + \cdots + \frac {2^{2 n} \left({2^{2 n} - 1}\right) B_n \left({a x}\right)^{2 n + 1} } {\left({2 n + 1}\right)!} + \cdots}\right) + C$

where $B_n$ denotes the $n$th Bernoulli number.

Also see

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