# Extending a $k$-lipschitz function

Given $f: Y\subset\mathbb{R}\to \mathbb{R}$ a $k$-lipschitz function, (i.e $|f(x)-f(y)|\leq k|x-y|$ for any $x,y\in Y$) I need to prove the existence of a $k$-lipschitz function $g:\mathbb{R}\to \mathbb{R}$ such that $g|_Y=f$.

My answer when $f$ is bounded is considering $$g(x)=\inf_{y\in Y}\{f(y)+k|x-y|\}.$$

Is it correct?. How do you find $g$ when $f$ is not bounded?.

-
Is there any information about what kind of subset $Y\subseteq \mathbb{R}$ is? Open, connected, etc.? – Zev Chonoles♦ May 15 '12 at 18:09
@ZevChonoles $Y\subset \mathbb{R}$ can be any subset. – Gastón Burrull May 15 '12 at 18:11

3
Your definition of $g$ works, even if $f$ is unbounded. Notice that the sum $f(y)+k|x-y|$ is bounded from below for any fixed $x$ (use the Lipschitz property of $f$). – user31373 May 15 '12 at 18:11
@LeonidKovalev I don't think so because $f(y)$ is not bounded. Can you explain why is bounded? I didn't well understood. – Gastón Burrull May 15 '12 at 18:16
@LeonidKovalev My definition of $g$ does not always work because $f$ not necessarly has a lower bound. – Gastón Burrull May 15 '12 at 18:29

## 1 Answer

An alternate explicit construction:

First, you can continuously extend to the closure $\bar{Y}$ using the Lipschitz condition.

Then, since $\bar{Y}$ is closed, for every $x\in \mathbb{R}\setminus \bar{Y}$ one can find $x_- = \max \bar{Y}\cap \{ y < x\}$ and $x_+ = \min \bar{Y}\cap \{y > x\}$. Then just linearly interpolate: $$g(x) = f(x_-) + \frac{f(x_+) - f(x_-)}{x_+ - x_-} (x - x_-)$$

But let me explain Leonid Kovalev's comment. Notice that fixing some arbitrary $x' \in Y$, we have that for any $x\in\mathbb{R}$ now chosen to be fixed

$$f(y) - f(x') + k|x-y| \geq f(y) - f(x') + k|x' - y| - k|x-x'|$$

from triangle inequality. But using the $k$ lipschitz property you have that

$$f(y) - f(x') + k|x' - y| \geq 0$$

so the expression

$$f(y) - f(x') + k|x-y| \geq -k|x-x'|$$

where the right hand side is independent of $y$. Or, in other words

$$f(y) + k|x-y| \geq f(x') - k|x-x'|$$

so the expression you want to take the infimum of (in $y\in Y$) is bounded from below by some constant, and hence the infimum exists.

-
Can be simplified: $f(y)+k|x-y|\ge f(x)$, so $f(x)$ is the lower bound for the $\inf$ in the definition of $g$. – user31373 May 15 '12 at 19:36

2
@Leonid: $f$ is not defined at $x$ by assumption. In fact, we are trying to define an extension of $f$ to $x$, no? – Willie Wong♦ May 15 '12 at 19:42
@WillieWong Ty, both answers was very good explained!! – Gastón Burrull May 15 '12 at 19:47

1
Of course, that was a stupid comment on my part. – user31373 May 15 '12 at 19:51

1
@Gaston: the two numbers are the same. As $x\in \mathbb{R}\setminus \bar{Y}$ which is open, there exists some $\epsilon$ such that $\bar{Y}\cap \{y\leq x\} = \bar{Y}\cap\{y < x\} = \bar{Y} \cap \{y \leq x - \epsilon\}$. – Willie Wong♦ May 16 '12 at 6:14
show 2 more comments
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 42, "mathjax_display_tex": 6, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9190059900283813, "perplexity_flag": "head"}