# How do we show Lipschitz continuity?

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$$?

Proof: Let $$f$$ and $$g$$ be locally Lipschitz. Choose a point $$z$$. There is a neighborhood $$D_f$$ of $$z$$ such that $$|f(x)-f(y)|\le L_f|x-y|$$ for all $$x,y\in D_f$$, and a neighborhood $$D_g$$ such that $$|g(x)-g(y)|\le L_g|x-y|$$ for all $$x,y\in D_g$$. Then, on the neighborhood $$D_f\cap D_g$$, $$|af(x)-af(y)|\le aL_f|x-y|$$ and $$|(f(x)+g(x))-(f(y)+g(y))|\le (L_f+L_g)|x-y|$$.
This can be done everywhere. Every point has a neighborhood on which $$af$$ and $$f+g$$ are Lipschitz, so the definition holds and $$af$$ and $$f+g$$ are locally Lipschitz. Done.
So then, we can break things down. We wrote $$f=g+h$$, and showed $$g$$ and $$h$$ were locally Lipschitz. By the lemma, $$g+h=f$$ is locally Lipschitz as well.
It's been awhile since I've worked with Lipschitz continuity, but from what I worked out it's a means of employing the triangle inequality and the continuity conditions on functions $$g(x)$$ and $$h(x)$$. Like you asserted in your post. $$g(x) = x^{2}$$ is locally Lipschitz continuous. In other words, $$||g(x)-g(y)|| \leq L_{g} ||x-y||$$ where the value $$L_{g}$$ will vary depending on what $$x$$ and $$y$$ are. And $$h(x) = |x|$$ is globally Lipschitz so $$||h(x) - h(y)|| \leq L_{h} ||x-y||$$ where $$L_{h}$$ is invariant upon your choices of $$x$$ or $$y$$. Now if we put those two together we see that $$||g(x)-g(y)|| \: + \: ||h(x)-h(y)|| \leq (L_{g} + L_{h}) ||x-y||$$ Since $$f(x) = g(x) + h(x)$$ we can see from the triangle inequality that $$||f(x) - f(y)|| = ||g(x) - g(y) + h(x) - h(y)|| \leq ||g(x) - g(y)|| + ||h(x) - h(y)||$$ And thus we can easily see that $$||f(x) - f(y)|| \leq (L_{g} + L_{h}) ||x - y||$$ Thus making it locally but not globally Lipschitz. A similar process can be done to show differentiability everywhere except $$x=0$$.
{"ft_lang_label":"__label__en","ft_lang_prob":0.9138449,"math_prob":1.0000057,"size":1291,"snap":"2019-35-2019-39","text_gpt3_token_len":350,"char_repetition_ratio":0.17094018,"word_repetition_ratio":0.009756098,"special_character_ratio":0.25329202,"punctuation_ratio":0.083333336,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":1.0000087,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-09-15T08:15:27Z\",\"WARC-Record-ID\":\"<urn:uuid:117a0f72-2459-4ec4-bef6-0108578f2f16>\",\"Content-Length\":\"142309\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:f287c8bf-2cf9-43aa-b761-1ba92bae3630>\",\"WARC-Concurrent-To\":\"<urn:uuid:ede78577-bb2a-4822-944d-abb4b6b960a5>\",\"WARC-IP-Address\":\"151.101.193.69\",\"WARC-Target-URI\":\"https://math.stackexchange.com/questions/3157665/how-do-we-show-lipschitz-continuity\",\"WARC-Payload-Digest\":\"sha1:73STCDX3CDQXZ6WG46EDWELHI2ZT34DQ\",\"WARC-Block-Digest\":\"sha1:4EEAVVM7DBWVDJ4TC6EO4HVJSFSJTTSX\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-39/CC-MAIN-2019-39_segments_1568514570830.42_warc_CC-MAIN-20190915072355-20190915094355-00310.warc.gz\"}"}