Consider the function $$f_{n}(x)=\min\{1, \frac{1}{\ln n}\ln_{+}\left(\frac{n^{2}}{|x|}\right)\}.$$ Clearly we have that $supp(f_{n})=B(0, n^{2})$ but is this function Lipschitz and if it is indeed, what is the Lipschitz constant? Can someone help?
Lipschitz constant of function with compact support
lipschitz-functionsreal-analysis
Related Solutions
Hint: why is it not possible to find a $C$ such that $$ |\sqrt{x} - \sqrt{0}|\leq C|x-0| $$ For all $x \geq 0$?
As a general rule: Note that a differentiable function will necessarily be Lipschitz on any interval on which its derivative is bounded.
In response to the wikipedia excerpt: "This function becomes infinitely steep as $x$ approaches $0$" is another way of saying that $f'(x) \to \infty$ as $x \to 0$. If you look at slope of the tangent line at each $x$ as $x$ gets closer to $0$, those tangent lines become steeper and steeper, approaching a vertical tangent at $x = 0$.
"Graphically", we can say that a differentiable function will be Lipschitz (if and) only if it never has a vertical tangent line.
Some functions that are not Lipschitz due to an unbounded derivative: $$ f(x) = x^{1/3}\\ f(x) = x^{1/n},\quad n = 2,3,4,5,\dots $$ A more subtle example: $$ f(x) = x^2,\quad x \in \mathbb{R}\\ f(x) = \sin(x^2), \quad x \in \mathbb{R} $$ Note in these cases that although $f'(x)$ is continuous, there is no upper bound for $f'(x)$ over the domain of interest.
The statement is not generally true. Take for example $f(x) = \cos(x) + 10$ with $L=1$, then: $$ \tilde{f}(x) = \lvert x\rvert(\cos(x/\lvert x\rvert) + 10) = \lvert x\rvert(\cos(1) + 10) , $$ which has smallest Lipschitz constant $\tilde{L} = \cos(1) + 10 > 3$.
However, let $x,y\in\mathbb{R}^n\setminus\{0\}, x\neq y,$ such that $\lVert x\rVert = \lVert y\rVert = a$, then $$ \lvert\tilde{f}(x) - \tilde{f}(y)\rvert=a\lvert f(x/a) - f(y/a)\rvert\leq aL\lVert x/a - y/a\rVert = L\lVert x-y\rVert. $$
Now, let $x,y\in\mathbb{R}^n\setminus\{0\}, x\neq y,$ be arbitrary and assume w.l.o.g. that $a = \lVert x\rVert > \lVert y \rVert$, and let $z = ay/\lVert y \rVert$, $t=\lVert y\rVert/a, 0 < t < 1$, then $$ \lvert\tilde{f}(z) - \tilde{f}(y)\rvert = \lvert af(z/a) - taf(z/a)\rvert = a\lvert f(z/a)\rvert\lvert t-1\rvert \leq a(1-t)(\lvert f(z/a) - f(0)\rvert + \lvert f(0)\rvert)\leq a(1-t)(L + \lvert f(0)\rvert). $$
Therefore $$ \lvert\tilde{f}(x) - \tilde{f}(y)\rvert \leq \lvert\tilde{f}(x) - \tilde{f}(z)\rvert + \lvert\tilde{f}(z) - \tilde{f}(y)\rvert \leq L\lVert x-z\rVert + a(1-t)(L + \lvert f(0)\rvert)\leq\\ L\lVert x-y\rVert + L\lVert y-z\rVert + a(1-t)(L + \lvert f(0)\rvert) = L\lVert x-y\rVert + taL\lvert 1/t - 1 \rvert + a(1-t)(L + \lvert f(0)\rvert)=\\ L\lVert x-y\rVert + aL(1-t) + a(1-t)(L + \lvert f(0)\rvert) = L\lVert x-y\rVert + a(1-t)(2L + \lvert f(0)\rvert). $$
Now, $$ \lVert x \rVert = a \leq \lVert x-y\rVert + at \implies \frac{1}{ \lVert x-y\rVert}\leq \frac{1}{a(1-t)}, $$ thus $$ \frac{\lvert\tilde{f}(x) - \tilde{f}(y)\rvert}{\lVert x-y\rVert}\leq L + \frac{a(1-t)(2L + \lvert f(0)\rvert)}{\lVert x-y\rVert} \leq 3L + \lvert f(0)\rvert. $$
Because the choice of $x$ and $y$ is arbitrary, we conclude that the Lipschitz constant of $\tilde{f}$ is no larger than $3L + \lvert f(0)\rvert$.
Best Answer
In this answer How to show $\min\{f_1,f_2\}$ is Lipschitz when $f_1,f_2$ are Lipschitz? it was proved that the minimum of two lipschitz functions is lipschitz. Thus also the maximum of two lipschitz functions is lipschitz. Hence, your function is lipschitz. To compute the lipschitz constant you may use that your function is piecewise smooth and you can just compute the supremum of the derivatives (only the $\ln$ term will matter on its domain).
The function is constant except on $B(0,n^2)\setminus B(0,n)$. This means the lipschitz constant is equal to $$ \max_{\vert x \vert\in [n, n^2]} \left\vert \nabla\left( \frac{1}{\ln(n)} \ln\left( \frac{n^2}{\vert x \vert}\right) \right) \right\vert = \frac{1}{\vert \ln(n) \vert} \max_{\vert x \vert\in [n, n^2]} \left\vert\left( \nabla \ln\left( \frac{1}{\vert x \vert}\right) \right) \right\vert = \frac{1}{\vert \ln(n) \vert} \max_{\vert x \vert\in [n, n^2]} \left\vert \frac{1}{\vert x \vert} \frac{x}{\vert x \vert} \right\vert = \frac{1}{\vert \ln(n) \vert} \max_{\vert x \vert\in [n, n^2]} \frac{1}{\vert x \vert} = \frac{1}{ \vert \ln(n) \vert \cdot n}$$