Derivative of arctan

The following formula holds: $$\dfrac{\mathrm{d}}{\mathrm{d}z} \mathrm{arctan}(z) = \dfrac{1}{z^2+1},$$ where $\mathrm{arctan}$ denotes the inverse tangent function.
If $\theta=\mathrm{arctan}(z)$ then $\tan \theta = z$. Now implicit differentiation with respect to $z$ yields $$\sec^2(\theta)\theta'=1.$$ The following triangle shows that $\sec^2(\mathrm{arctan}(z))=z^2+1$:
Substituting back in $\theta=\mathrm{arccos(z)}$ yields the formula $$\dfrac{\mathrm{d}}{\mathrm{d}z} \mathrm{arccos(z)} = \dfrac{1}{\sec^2(\mathrm{arctan(z)})} = \dfrac{1}{z^2+1},$$ as was to be shown. █