I am working on existence and uniqueness of nonlinear systems and one of the prerequisites is the notion of Lipschitz continuity. I am a little bit confused on how we use the definitions to actually show that a function is Lipschitz continuous or not.
First, I'll provide the definitions that I am aware of:
A function $f$ is locally Lipschitz on an open and connected subset $D\subset\mathbb R^n$ if each point of $D$ has a neighborhood $D_0$ such that
$$||f(x)-f(y)||\leq L||x-y||\qquad (1)$$
for all point in $D_0$ with some Lipschitz constant $L_0$. We say that $f$ is globally Lipschitz if $f$ satisfies condition $(1)$ for all points in a set $W$ with the same constant $L$.
Now, a simple example is to consider $f(x)=x^2+|x|$. One way to determine if $f$ is Lipschitz continuous is to write $f=g+h$ where $g(x)=x^2$ and $h(x)=|x|$.
Now $g$ is locally Lipschitz, thus continuous, and continuously differentiable but not globally Lipscitz. In a similar manner, $h$ is not continuously differentiable, but locally and globally Lipschitz and thus continuous. From these arguments, one may conclude that $f$ is not continuously differentiable, but it is locally Lipschitz and continuous.
Why is that? Why are we allowed to argue Lipschitz continuity of $f$ by studying the functions $g,h$?