Antiderivative of arctan
Theorem
The following formula holds: $$\displaystyle\int \mathrm{arctan}(z) \mathrm{d}z = z\mathrm{arctan}(z) - \dfrac{1}{2}\log \left(z^2+1 \right)+C,$$ where $\mathrm{arctan}$ denotes the inverse tangent and $\log$ denotes the logarithm.
Proof
Let $u=\mathrm{arctan}(z)$ and $\mathrm{d}v=1$. Then $v=z$ and because of the derivative of arctan, $\mathrm{d}u=\dfrac{1}{z^2+1} \mathrm{d}z$. Therefore using integration by parts, $$\displaystyle\int \mathrm{arctan}(z) \mathrm{d}z = z \mathrm{arctan}(z) - \displaystyle\int \dfrac{z}{z^2+1} \mathrm{d}z.$$ To evaluate the remaining integral, let $w=z^2+1$ so that $\mathrm{d}w=2z \mathrm{d}z$, i.e. $\dfrac{1}{2} \mathrm{d} w = z \mathrm{d}z$ and we see $$\displaystyle\int \mathrm{arctan}(z) \mathrm{d}z = z \mathrm{arctan}(z) - \dfrac{1}{2}\displaystyle\int \dfrac{1}{w} \mathrm{d}w = z \mathrm{arctan}(z) - \dfrac{1}{2} \log(z^2+1) + C,$$ as was to be shown.