4

I dont know how to solve this problem with not convex condition!

Let $f \colon A \subseteq \mathbb R^n \to \mathbb R$ differentiable with $A$ convex and suppose $\|\mathop{\rm grad} f(x)\| \le M$ for $x \in A$. Prove $|f(x)-f(y)| \le M\|x-y\|$ for $x,y \in A$. Do you think this is true if $A$ is not convex?

martini
  • 84,101

2 Answers2

0

This is not true if $A$ is not convex. Let $A = \{x \in \mathbb R^2 \mid \def\abs#1{\left|#1\right|}\abs x < 1\} \setminus \{0\} \times (-1,0]$, define $f \colon A \to \mathbb R$ by $$ f(x) = \begin{cases} \mathop{\rm sgn} x_1 \cdot x_1^2 & x_2 < 0\\ 0 & x_2 \ge 0 \end{cases} $$ Then $f$ is differentiable with $$ Df(x) = \begin{cases} (\mathop{\rm sgn} x_1 \cdot 2x_1, 0) & x_2 < 0\\ 0 & x_2 \ge 0 \end{cases} $$ That is $\abs{{\rm grad}\, f(x)}\le 2$ for all $x \in A$. But for every $\epsilon \in(0,1)$ we have \begin{align*} f(\epsilon , \epsilon-1) &= (\epsilon - 1)^2\\ f(-\epsilon, \epsilon - 1) &= -(\epsilon -1)^2 \end{align*} So $$ \abs{f(\epsilon, \epsilon-1)-f(-\epsilon, \epsilon-1)} = 2(\epsilon-1)^2 \not\le 2\epsilon. $$

martini
  • 84,101
0

Consider $g(t)=f(x+t(y-x))$ for $t\in[0,1]$. Then $g'(t)=grad(f)\cdot(y-x)$. So $$|f(x)-f(y)|=|g(1)-g(0)|=\\|g'(u)|=|grad(f)\cdot(y-x)|\leq\|grad(f)\|\cdot\|x-y\|\leq M\|x-y\|.$$ Here $u\in(0,1)$ and the $grad(f)$ is calculated at $x+u(y-x)$.

This won't be true in general if $A$ is not convex.