2

Let $f:D\subset\mathbb{R}^2\rightarrow\mathbb{R}$ be a function with $D$ open and connected set such that $\nabla f=\bar{0}$ for all $x\in D$ Proof that $f$ is a constant function.

Hi! I have some problems with this exercise. I think that I have the proof, but, in this, I never use the fact that $D$ is a connected set. Can anyone help me? Please.

My proof:

First, since $\nabla f=\left(\displaystyle\frac{\partial f}{\partial x},\displaystyle\frac{\partial f}{\partial y} \right)=(0,0)$, then, $\displaystyle\frac{\partial f}{\partial x}=0$ and $\displaystyle\frac{\partial f}{\partial y} =0$. Hence, the partial derivatives are bounded, i.e., there exist a $K,M\in\mathbb{R}^{+}$ such that $\left|\displaystyle\frac{\partial f}{\partial y} \right|\leq K$ and $\left|\displaystyle\frac{\partial f}{\partial x} \right|\leq M$ (I think that anything $K$ and $M$ it works, because the partial derivatives are $0$).

Now let $a = (a_1,a_2)$ and $b = (b_1,b_2) \in D$. Then we have: \begin{align*} f(a) - f(b) &= f(a_1,a_2) - f(b_1,b_2) \\ f(a)-f(b) &= f(a_1,a_2) - f(a_1,b_2) + f(a_1,b_2) - f(b_1,b_2) \end{align*} Then, by the triangle inequality: $$|f(a)-f(b)| \leq |f(a_1,a_2) - (a_1,b_2)| + |f(a_1,b_2) - f(b_1,b_2)|$$ And since the partial derivatives exist, we can use the one-dimensional Mean Value Theorem to show that there exists some $c$ such that: $$\frac{f(a_1,a_2)-f(a_1,b_2)}{a_2-b_2} = \displaystyle\frac{\partial f}{\partial y}(a_1,c)$$ And noting how we defined $K$, it follows that $$|f(a_1,a_2) - f(a_1,b_2)| \leq K|a_2 - b_2|$$ And similarly $$|f(a_1,b_2) - f(b_1,b_2)| \leq M |a_1-b_1|$$ And using the statement we got from the triangle inequality, we have that $$|f(a)-f(b)| \leq M|a_1-b_1| + K|a_2 - b_2|$$ And by the Cauchy-Schwarz inequality, we have that $$M|a_1-b_1| + K|a_2 - b_2| \leq \sqrt{M^2 + K^2}\cdot \sqrt{(a_1-b_1)^2+(a_2-b_2)^2} = \sqrt{M^2 + K^2} \cdot ||a-b||$$ Whereby $$|f(a)-f(b)| \leq \sqrt{M^2 + K^2} \cdot ||a-b||$$ So $f$ is Lipschitz with $L = \sqrt{K^2 + M^2}$.

Hence, the function is continuous. But, $M=K=0$ works, we can consider $L=0$ and the nex equality $$0\leq|f(a)-f(b)| \leq 0$$Then $|f(b)-f(a)|=0$ and we can conclude that $f(b)=f(a)$ for all $a,b\in D$. Then, the function is constant. But, in the proof, I never used the connected of $D$. Where is the wrong? Can anyone help me? Thanks.

  • I'm pretty sure this was asked yesterday. – Matthew Cassell Dec 05 '16 at 17:08
  • 4
    You use connectedness of $D$ in the application of the Mean Value Theorem. – Larry B. Dec 05 '16 at 17:09
  • 1
    Here is a counter-example if $D$ is not connected: let $D = \mathbb{R}^2$ with the $y$-axis removed then $f = -1$ on $\mathbb{R}{> 0}$ and $f = 1$ on $\mathbb{R}{< 0}$ has $\nabla f = 0$ on $D$ and $D$ is open (but not connected). The thing that fails in your proof for this case is the application of the mean value theorem. If $D$ is not connected then there is not a continuous curve in $D$ connecting point $a$ to point $b$ for which you can apply the mean-value theorem to. – Winther Dec 05 '16 at 17:24
  • @Mattos, sure, the post of yesterday is the reason for this question. I think in the solution and I posted here.

    Oh, then, the connectedness is so important for this result. Thus, my proof is complete.

    – Carlos Jiménez Dec 05 '16 at 17:29
  • 1
    No, your proof is incorrect. – zhw. Dec 05 '16 at 19:39

2 Answers2

1

Suppose $\nabla f=\left(\displaystyle\frac{\partial f}{\partial x},\displaystyle\frac{\partial f}{\partial y} \right)=(0,0)$.

$$ \frac{\partial f}{\partial x} = 0 \quad \Rightarrow \quad f(x,y)=A+g(y), $$ where $A\in \mathbb{R}$ and $g:\mathbb{R}\rightarrow \mathbb{R}$. Note that this only holds if $D$ is connected; e.g., if you consider $$f:]0,1[\cup ]1,2[\times \mathbb{R}\rightarrow \mathbb{R} \\(x,y)\mapsto\lfloor x \rfloor$$ it satisfies $\frac{\partial f}{\partial x} = 0$ but is not constant.

Then, we have $\frac{\partial f}{\partial y} =0= g'(y)$, therefore $ g(y)=B \in \mathbb{R} $. In summary $$ f(x,y)=A+B\in \mathbb{R} $$

Kuifje
  • 9,584
1

Your application of the mean value theorem is not always valid as there is no reason why all the points on the line between $(a_1,a_2)$ and $(a_1,b_2)$ has to be in $D$. To close this loophole you need to use the missing ingredient. If $a,b\in D$ then since $D$ is connected we know there exists a smooth curve (see e.g. this answer) $\gamma(t):[0,1]\to D$ such that $\gamma(0) = a$ and $\gamma(1) = b$. You can now apply the mean value theorem to the function $g:[0,1]\to\mathbb{R}$ given by $g(t) = f(\gamma(t))$ to get the desired result:

$$f(b) - f(a) = g(1) - g(0) = g'(c) = \nabla f(\gamma(c))\cdot \gamma'(c) = 0$$

Also it's not stated that $f$ is differentiable, but since all partial derivatives $\nabla_i f = 0$ is continuous and $D$ is open this is guaranteed for all points in $D$ (see e.g. this question).

Winther
  • 24,478
  • Now, I have a great confussion. In my class, we define three kinds of connected sets: Arc-connected: A set $X$ is path connectedness (I don't know if this is the correct translate from the spanish. In spanish we have like "Conjunto arco-conexo") if for all $a,b\in X$ there exist a continuous function $\gamma:[0,1]\rightarrow\mathbb{R}$ such that joins $a$ with $b$ Connected by paths: $X$ is connected by paths if there exist a polygonal chain https://en.wikipedia.org/wiki/Polygonal_chain that joins $a$ with $b$ (in spanish is Poligonalmente conexo) and the usual definition for connected. – Carlos Jiménez Dec 05 '16 at 18:14
  • 1
    @CarlosJiménez See the answer I link to in the post for a discussion on how these different definitions are related. See also: http://math.stackexchange.com/questions/56741/connected-implies-path-polygonally-connected?noredirect=1&lq=1 ; http://math.stackexchange.com/questions/766422/when-does-open-and-connected-imply-path-connected?rq=1 Also note that you can modify this procedure to work with "connected by paths" definition (i.e. without assuming that $\gamma$ is smooth): just apply the MVT to each of the straights lines in the polygonal chains. – Winther Dec 05 '16 at 18:16
  • I readed the answers, but, the definitions are so confusing for me now. Maybe for the languaje. – Carlos Jiménez Dec 05 '16 at 18:22
  • You are using the chain rule, which works if $f$ is differentiable everywhere, but we don't have that do we? – zhw. Dec 05 '16 at 19:24
  • @zhw. $f(x)$ is differentiable in $D$ and $\gamma(t) \in D$ so I don't see the problem here? – Winther Dec 05 '16 at 19:34
  • Why is $f$ differentiable in $D?$ The everywhere existence of partial derivatives does not imply differentiability. – zhw. Dec 05 '16 at 19:38
  • @zhw. Ok, now I see what you mean. I thought that was given in the question, but now I see that it's not. – Winther Dec 05 '16 at 19:41
  • @zhw. I think it's still fine since $D$ is open and $\nabla f$ is continuous it should imply differentiabillity for all points in $D$. Here is a reference: http://math.stackexchange.com/questions/1007709/proof-that-continuous-partial-derivatives-implies-differentiability – Winther Dec 05 '16 at 19:46
  • Oh yes, you're right. Good point. The partials are $0$ therefore continuous, hence $f$ is $C^1$ which implies differentiability. That's worthwhile pointing out I think – zhw. Dec 05 '16 at 19:49