Prove that $$\vert \tan^{-1}x-\tan^{-1}y \vert ≤ \vert x-y\vert \quad \forall x,y \in \mathbb{R}. $$
What I did was to put $x \to x+h$ and $y \to x$ and then take $\lim_{h \to 0}$. This gives $$\lim_{h \to 0} \frac{\vert \tan^{-1}(x+h)-\tan^{-1}x\vert}{\vert h \vert} \le 1$$ which gives $$\frac{d \tan^{-1}x}{dx} = \frac{1}{1+x^2} \le 1.$$ But this proves it only for $x$ and another value $x+h$ very close to it and not $\forall x,y$. Please help.
The comments from Bumblebee and Maximilian Janisch are right. The mean value theorem states that given $[x,y]$, there is $c \in (x,y)$ such that $\arctan'(c) = \frac{\arctan(y) - \arctan(x)}{y - x}$. Since $\arctan'(x) = \frac{1}{1 + x^2}$, you have $\frac{1}{1 + c^2} = \frac{\arctan(y) - \arctan(x)}{y - x}$. Now, $\frac{1}{1 + c^2} \leq 1$, $\frac{\arctan(y) - \arctan(x)}{y - x} \leq 1$, which rearranges to $\arctan(y) - \arctan(x) \leq y - x$. The inequality still holds when you take the absolute value of both sides.