To finalise let us consider the derivative of the inverse function $$f^{-1}$$ (such as $$\arctan x$$). The function is called inverse in case its composition with the direct function results into the initial argument:

\[ f^{-1} \circ f =x\]

The rule for derivative here is:

\[ (f^{-1}(y))'=\frac{1}{f'(x)}\]

Let us use it, e.g., for $$\arctan x$$:

\[ (\arctan x)'=\frac{1}{(\tan(y))'} =\cos^2 y\]

This is nice, but we were hoping for the answer in terms of $$x$$, not $$y$$, right? Let us remember the main trigonometric mantra:

\[ \sin^2y+\cos^2y=1 \quad \Rightarrow \quad \tan^2y+1=\frac{1}{\cos^2y} \quad \Rightarrow \quad \cos^2y=\frac{1}{1+\tan^2y}\]

Since $$y=\arctan x$$, $$\tan y=\tan\arctan x=x$$. Thus

\[(\arctan x)'=\frac{1}{1+x^2}\]