# Why $f(x)=x^2$ is local Lipschitz, general question about local/global Lipschitz.

I'm trying to understand the difference between global lipschitz and local lipschitz.

Let $$f(x)=x^2$$ while $$x \in \mathbb{R}$$ if we look at global lipschitz, for all $$M \subset \mathbb{R} \times \mathbb{R}$$

Global lipschitz applies if for every $$x,y \in \mathbb{R}$$

$$|f(x) - f(y)| \le M|x-y|$$

in this case global lipschitz doesn't apply.

$$|f(n) - f(0)| \le M|n-0| \rightarrow n \le M$$

So we found that no constant $$M$$ exists, therefore $$f(x)=x^2$$ is doesn't hold global lipschitz condition.

If I understood correctly if function apply local lipschitz then for every subset of $$\mathbb{R^2}$$ an interval of $$R$$ for example $$[1,2],(0,5)$$ we can find $$M$$ such that $$|f(x) - f(y)| \le M|x-y|$$ holds

Since $$f(x)=x^2$$ is continuous in $$\mathbb{R}$$ we know that maximum exist for every interval $$D$$ we take $$m = max\{D\}$$ and define $$M=m^2$$ Therefore the condition holds : $$|f(x) - f(y)| \le M|x-y|$$

Is it true to say that for every continuous function lipschitz local conditon holds?

I wonder if I understand correctly the difference between local and global lipschitz conditon, I'll be happy if someone could approve.

Any help will be appreciated, Thanks.

• Can you explain why the method I used works on $f(x)=x^2$ (hence taking the maximum in the interval). – JaVaPG Apr 24 at 20:23
• $f(x)=x^2$ has a continuous derivative, namely $f'(x)=2x$. A continuous function always achieves a maximum and a minimum on a compact subset of its domain. Therefore, if $D$ is any bounded subset of $\mathbb{R}$, so that $\overline{D}$ is compact, there exists $M$ such that $|f'(x)| \leq M$ on $D$. This in particular implies $f$ is Lipschitz with Lipschitz constant $M$ (if not, this would violate the mean value theorem). – kccu Apr 24 at 22:20