# Zero Partials imply Constant Function Theorem or Proof

Let $f(x,y)$ be a function of two variables. Given that $$\frac{\partial f}{\partial x}=0$$ for all $y$, and $$\frac{\partial f}{\partial y}=0$$ for all $x$, is there a theorem that states $f(x,y)=$ constant for all $x$, $y$? Or how would I prove this rigorously?

• Well, the first condition tell us that $f(x,y) = g(y)$ for some function $g$. Commented Jan 7, 2015 at 23:23
• The claim is false if the domain isn't connected. Let $f:\Bbb R^\times\to\Bbb R$ be defined by ${\rm sgn}\; x$, say.
– Pedro
Commented Jan 8, 2015 at 2:23
• @PedroTamaroff Yes, I realized you are absolutely right - the qualification of connected domain is necessary for the conclusion to be true. Commented Jan 8, 2015 at 5:29

Obtain the general solution for the first equation: $$\frac{\partial f}{\partial x} = 0 \Rightarrow f(x,y) = k + g(y);$$

Substitute in the second equation: $$\frac{\partial }{\partial y}(k+g(y)) = g'(y) = 0$$

So?

It's not really something I thought about, but since you ask I'll try to give a rigorous explanation for the first step. What it comes down to is proving the existence and differentiability of $G(y) = k + g(y)$.

Start with asking yourself how you define $\frac{\partial f}{\partial x}(a,b)$. Ok, I'll say that it's $f_b'(a)$, where $f_b(x)$ is defined by $$f_b:\mathbb R \to \mathbb R \atop \quad\quad\quad\quad x\mapsto f(x,b)$$

for each $b\in\Bbb R$. Assume $f$ is differentiable in its entire domain (a suffiently "nice" domain), so this defines a function of two variables $\frac{\partial f}{\partial x}(x,y) := f'_y(x)$, in $\mathrm{dom} f$. Now, fix $y\in\mathbb R$ and apply what we know from calculus in one variable; that $f'_y(x) = 0\Leftrightarrow f_y(x) = k_y$, a constant. Here, $k_y$ is indexed to note that the constant depends on whichever $y$ you fixed.

So, existence comes from simply letting $G(y) = k_y$.

Differentiability is the tricky part. This may be overkill, and I'll spend some time thinking of a simpler way (to this whole discourse as well), but for now here goes. Note that $G(y)$ is related to the "flux" (not sure if this is the term in English) flow of the differential equation: \left\{\begin{align} h'(x) &= 0 \\ h(t_0) &= x_0\end{align}\right.

If the solution is $\phi(x;t_0,x_0)$, then we see that $G(y) = \phi(0;0,k_y)$ (we can evaluate $\phi$ at $0$, and set $t_0$ to $0$ because we know the solution is constant, and is unique). Now we bring in a theorem, which applies in this case, about the differentiability of $\phi$ with respect to all three of its variables, and obtain the differentiability of $G$.

I really, really hope that there's a simpler way, and that I'm overcomplicating things. It's something that happens when you study complicated things all day, you then see complication in everything.

Edit: (some things I thought along the way)

• I assumed that $f$ was differentiable. If this is the case we can use the easier fact $Df = 0 \iff f\equiv\text{constant}$, which is proved using the generalized mean value theorem.

• Actually, we supposedly just proved that $f$ is differentiable (we can drop "differentiable" where I used it and just say "partials exist"), because it is constant. So now we ask ourselves if it's easier to prove $\text{partials of$f$are zero everywhere}\Rightarrow \text{$f$differentiable}$, without going through this mess. If we can do this, again it's easier to take the approach in the above bullet.

• Still, (and JLA seems to have proven it unecessary) the above proof still serves the purpose of getting conclusions out of the more general situation: $$\frac{\partial f}{\partial x} = p(x,y) \\ \frac{\partial f}{\partial y} = q(x,y)$$

Edit 2: (final note)

Reminded to me by Bill Cook. There's a theorem that goes: $$\text{partials of f exist and are continuous}\Rightarrow \text{f is differentiable}$$ Now apply this here, and then use the mean value theorem.

• So from single variable calculus, $g(y)$ is a constant function, and hence $f(x,y)$ is constant from the first step. Thanks @GPerez. May I ask how you obtained the first step (after =>) rigorously? It definitely seems plausible to me. Is it an indefinite integral wrt x? Commented Jan 8, 2015 at 0:02
• @boxofchalk1 Accidentally sumbitted the edit. It still needs finishing, hang on one second. Commented Jan 8, 2015 at 1:02
• No problem - take you time @GPerez. Commented Jan 8, 2015 at 1:07
– Pedro
Commented Jan 8, 2015 at 5:36
• @boxofchalk1 Well, the differentiability is necessary for all of the steps. In saying $\partial f/\partial y = [\cdots]$, it doesn't make sense to have a solution (to the other equation) that isn't differentiable in $y$. Commented Jan 8, 2015 at 12:50

This should suffice: $\displaystyle f(b)-f(a)=\nabla f(\xi)\cdot(b-a)$ for some $\xi$ on the line connecting $a$ to $b\,,$ by the mean value theorem. But the right side is $0\,,$ so $f$ is constant.

Edit: One doesn't actually even have to use that the assumptions imply that $f$ is differentiable: Take two points $(a_x,a_y)\,,(b_x,b_y)\,.$ Then the assumptions on the partial derivatives and one dimensional calculus (usually by the mean value theorem, sometimes by the fundamental theorem of calculus) imply that $f(a_x,a_y)=f(b_x,a_y)=f(b_x,b_y)\,,$ so that $f$ is constant.

• How do we know this, if we don't know that $f$ is differentiable? Commented Jan 8, 2015 at 2:13
• @GPerez If the partials are zero, they are continuous (constant functions are continuous). Then continuous partials imply differentiability. Commented Jan 8, 2015 at 2:18
• @BillCook Right. Well, I can obtain some measure of relief in knowing you have to invoke a non-trivial theorem. Commented Jan 8, 2015 at 2:21
• @GPerez Actually I rewrote it so that differentiability isn't used.
– JLA
Commented Jan 8, 2015 at 2:28
• Well it doesn't used the fact the $f$ is differentiable and doesn't use any mean value theorem that isn't just exactly the same one from one dimensional calculus, so it is a bit simpler.
– JLA
Commented Jan 8, 2015 at 5:36