# How does one prove that a multivariate function is univariate?

The question resembles How does one prove that a multivariate function is constant? but appears to be more difficult.

Suppose that $u\colon\mathbb R^2\to\mathbb R$ is a continuous function such that at every point $(x,y)\in\mathbb R^2$ at least one of the following is true:

1. the partial derivative $\displaystyle \frac{\partial u}{\partial x}$ exists and is equal to $0$.
2. the partial derivative $\displaystyle \frac{\partial u}{\partial y}$ exists and is equal to $0$.

Does it follow that $u$ depends only on one of two variables $x,y$? In other words, can we prove that either 1 holds for all points or 2 holds for all points?

So far I can prove this only under the additional assumption $u\in C^1$.

Edit: Here is a proof of the $C^1$ case.

Claim 1: If $u_x(a,b)\ne 0$ for some $(a,b)$, then $u_x(a,y)=u_x(a,b)$ for all $y\in\mathbb R$.

Claim 2: If $u_y(c,d)\ne 0$ for some $(c,d)$, then $u_y(x,d)=u_y(c,d)$ for all $x\in\mathbb R$.

Once Claims 1 and 2 are proved, it follows that the premise of one of them never holds, otherwise both derivatives would be nonzero at $(a,d)$.

By symmetry it suffices to prove Claim 1. The set $E=\{y\in\mathbb R\colon u_x(a,y)=u_x(a,b)\}$ is closed by the continuity of $u_x$. Also, if $t\in E$ then $u_x\ne 0$ in some neighborhood of $(a,t)$ (again by continuity), which by assumption yields $u_y=0$ in this neighborhood, meaning $u$ does not depend on $y$ there. Thus, $E$ is also open. We conclude with $E=\mathbb R$, proving the claim.

-

This question was answered in the affirmative by A.M. Bruckner, G. Petruska, D. Preiss, and B.S. Thomson in The equation $u_xu_y=0$ factors, Acta Math. Hungar. 57 (1991), no. 3-4, 275-278. Actually, they prove a more general result, for separately continuous functions. The proof for continuous functions is quite simple (once you see it, of course!). The main idea is in the following lemma.

Lemma 1. Let $R$ be a closed axes-aligned rectangle $R$, and let $p$ be a vertex of $R$. Then the connected component of $p$ in the set $E=\{q\in R\colon u(q)=u(p)\}$ meets a side of $R$ not containing $p$.

Assume Lemma 1 for now.

Lemma 2. In the notation of Lemma 1, $u(r)=u(p)$ for some vertex $r$ adjacent to $p$.

Proof: We may assume $p$ is the bottom-left vertex and the component of $p$ in $E$ meets the right side of $R$. Then $E$ separates the bottom-right vertex $r$ from the sides not containing it. This leads to a contradiction unless $u(r)=u(p)$. Lemma 2 is proved.

Now the proof is finished as follows. Suppose $u$ attains distinct values at two points $p_1$, $p_2$ lying on the same vertical line. For each point $p$ on this line pick $i\in\{1,2\}$ such that $u(p_i)\ne u(p)$. Applying Lemma 2 to all rectangles with $p$ and $p_i$ as vertices, we see that $u$ is constant on the horizontal line through $p$. Since $p$ was arbitrary, $u$ is constant on all horizontal lines. QED

It remains to prove Lemma 1. The proof involves comparison with square cones, which are functions of the form $f(x)=c\|x-a\|_1=c(|x_1-a_1|+|x_2-a_2|)$ with $c>0$. It also uses, perhaps surprisingly, the equality of components and quasicomponents in compact Hausdorff spaces (such as $E$).

We may assume $p$ is the bottom-left vertex of $R$. Suppose the component of $p$ in $E$ does not meet either the top or the right side of $R$. Then there exist disjoint sets $U,V$ which are open in $R$ and cover $E$ in such a way that $U$ contains $p$ and $V$ contains both the top and the right side of $R$. There exists $\epsilon>0$ such that $|u(q)-u(p)|\ge 2\epsilon \|q-p\|_1$ for all $q\in R\setminus (U\cup V)$. The set $K=\{q\in U\colon |u(q)-u(p)|\le \epsilon \|q-p\|_1\}$ is compact and nonempty. Let $r$ be its largest point in the lexicographic order. The points $q\in U$ such that $q_1\ge r_1$ and $q_2\ge r_2$ satisfy $|u(q)-u(r)|\ge \epsilon \|q-r\|_1$. In particular, this holds when $q$ approaches $r$ from the right or from above (note that the construction of $U$ makes such approaches possible). But either $u_x$ or $u_y$ vanishes at $r$ -- a contradiction.

-

The following might be a counterexample, though I get stuck at a certain point:

We can let $f_r(x)$ be a fat Cantor function, where $0<r<1$. We define such functions iteratively as follows:

Set $f_r^0(x) = x$. The recursively define $$f_r^{n+1}(x) = \left\{\begin{matrix}0, & x\leq 0 \\ \frac{1}{2}f_r^{n}(x), & 0\leq x \leq \frac{1-r}{2} \\ \frac{1}{2}, & \frac{1-r}{2} \leq x \leq \frac{1+r}{2} \\ \frac{1}{2}+\frac{1}{2}f_r^n\left(\frac{2}{1-r}x - \frac{1+r}{1-r}\right), & \frac{1+r}{2}\leq x \leq 1 \\ 1, & x \geq 1 \end{matrix}\right.$$ Set $f_r(x)$ equal to the limit (which is easy to see is uniform), and note that each $f_r(x)$ is continuous.

Now, set $$u(x,y) = \left\{\begin{matrix}f_{1/3}(x), & y\leq 1/3 \\ f_y(x), & 1/3 \leq y \leq 2/3 \\ f_{2/3}(x), & y \geq 2/3 \end{matrix}\right.$$

It is not difficult to see that $u$ is continuous. However, that $u$ satisfies the hypothesis in question is a bit more difficult. We have that where $\frac{\partial u}{\partial x}$ exists, it is clearly $0$. So we need only worry about the places where $\frac{\partial u}{\partial x}$ does not exist. Suppose this is the case at some $(x_0,y_0)$. If $y_0 < 1/3$ or $y > 2/3$, it is clear that $\frac{\partial u}{\partial y} = 0$. The tough case is when $1/3 \leq y_0 \leq 2/3$ and $\frac{\partial u}{\partial x}(x_0,y_0)$ does not exist. If $\frac{\partial u}{\partial y}(x_0,y_0)$ does exist, then it should be $0$, because it is not hard to see that $u(x_0,y)$ is constant either over a small interval $[y_0,y_0+\epsilon)$ or $(y_0-\epsilon,y_0]$. However, I see no immediate reason why the partial derivative should exist. Maybe this is where the example stops being a counterexample, or maybe somebody can complete the proof.

-
Interesting example: I'll have to think about it. There's a small typo in the first displayed formula: the second line should have $\frac{1}{2} f_r^n\left(\frac{2}{1-r}x\right)$ – user31373 May 25 '12 at 3:21
However, this is not a counterexample. Indeed, if a point $(a,b)$ falls in a gap in Cantor set, then both $u_x$ and $u_y$ vanish there. Let $(a,b)$ be a point where $u_y$ either does not exist or is nonzero (such points must exist since the function depends on $y$ in some places). By above, $(a,b)$ is not in a gap. It follows that the derivative $u_x(a,b)$ does not exist. – user31373 May 26 '12 at 1:23