TITLE: Lipschitz continuity of $f(x) \to x^2$
QUESTION [6 upvotes]: Is it legitimate to show the Lipshitz continuity of $f(x)=x^2$ as I did below?
$$|x^2-y^2| \leq L|x-y|  $$
w.l.o.g. $x>y.$
$$\Rightarrow x^2-y^2 \leq L|x-y|$$
$$\Leftrightarrow \ \dfrac {x^2-y^2}{x-y} \leq L\\
\Leftrightarrow \ \dfrac {(x-y) \cdot (x+y) }{x-y} \leq L\\
\Leftrightarrow \ x+y \leq L.$$
Define $n=x+y$, then we get: $n \leq L$.
After Archimedes' principle we are able to find an $n$ which violates the relation between $n$ and $L$.
EDIT: The function isn't Lipschitz continous after my calculation.
Greetings.

REPLY [10 votes]: The function $f(x)=x^2$ is Lipschitz continuous on compact sets. For example, on $[-L,L]$, we have
$$
\begin{align}
|x^2-y^2|
&=|x+y|\,|x-y|\\
&\le2L|x-y|
\end{align}
$$
$f$ is not Lipschitz continuous on all of $\mathbb{R}$:
$$
|(x+1)^2-x^2|=|2x+1|\,|(x+1)-x|
$$
shows that there is no single bound that works over all $\mathbb{R}$.