Consider a function $f:\mathbb{R}^2 \to \mathbb{R}$ and the subsets $M,N\subset \mathbb{R}^2$, defined as follows:
$\left\{\begin{matrix}M = \{ (s,t) \in \mathbb{R}^{2} \ | \ t \geq 0 \} ,\\ N = \{ (s,t) \in \mathbb{R}^{2} \ | \ t \leq 0 \} . \end{matrix}\right.$
Suppose that $f$ is Lipschitz on each of $M$ and $N$. Does it follow that $f$ is Lipschitz on $\mathbb{R}^{2}$?
I thought that it does follow so, since if $c,d$ are two Lipschitz constants for a function on the two sets above, then we could pick $g:=\max\{c,d\}$, so the function would be Lipschitz on $\mathbb{R}^2$ (since, also, $M\cup N=\mathbb{R}^2$). But here's the problem. I don't get how to verify that the Lipschitz condition would or would not hold for a case like this:
Let $x_1,x_2\in M$ and $y_1, y_2\in N$, then $$|f(x_1)-f(y_1)|\le|f(x_1)-f(0,0)|+|f(y_1)-f(0,0)|\le c\|x_1\|+d\|y_1\|.$$
Which doesn't help much. Can someone please explain how to verify a Lipschitz condition for the case when two vectors are each from the two different sets?
The only thing that needs to be checked is $|f(p) - f(q)|,$ where $p\in M, q\in N.$ Let $A,B$ be the Lipschitz constants of $f$ on $M,N$ respecitively.
If both $p,q$ are on the $x$ axis, there's nothing to do. Otherwise, the line segment $[p,q]$ intersects the $x$ axis in a unique point $r.$ We then have
$$|f(p) - f(q)| \le |f(p) - f(r)| + |f(r) - f(q)| \le A|p-r| + B|r-q|$$ $$ \le \max (A,B)(|p-r| + |r-q|) = \max (A,B)|p-q|.$$
This gives the desired result.