# How can I write this proof about partial derivatives better?

This question isn't about the actual substance of math so much as it is about style. I'm not going to school, so my feedback on these sorts of problems is limited. How would you improve this proof's readability? And if this isn't the sort of question that's suitable here, where would be a more appropriate venue? The problem is pretty straightforward (from little Spivak):

If $f:\mathbb{R}^2\rightarrow \mathbb{R}$ and $D_2f=0$, show that $f$ is independent of the second variable. If $D_1f=D_2f=0$, show that $f$ is constant.

The definition of "independent of the second variable" that we are using is:

A function $f:\mathbb{R}^2 \rightarrow \mathbb{R}$ is independent of the second variable if for each $x\in \mathbb{R}$ we have $f(x,y_1)=f(x,y_2)$ for all $y_1,y_2\in\mathbb{R}$.

My solution as I have written it is:

Assume $f:\mathbb{R}^2\rightarrow \mathbb{R}$ and $D_2f=0$. Let $x$ be arbitrary. By integration, $\int f_2(x,y)=\int 0=C$ for some constant $C$. It follows that $f(x,y_1)=f(x,y_2)=C$ for all $y_1,y_2\in\mathbb{R}$. Since $x$ was arbitrary, it follows from the definition that $f$ is independent of the second variable.

To show that $f$ is constant when $D_1f=D_2f=0$ we proceed by contradiction. Assume that $f$ is not constant. Then there exists some $x_1,y_1,x_2,y_2$ such that $f(x_1,y_1) \ne f(x_2,y_2)$. Since $f$ is independent of the second variable, it follows that $f(x_1,y_1)=f(x_1,y_2)$ and $f(x_1,y_2) \ne f(x_2,y_2)$. By the mean value theorem there exists $x\in(x_1,x_2)$ such that

$$Df_1(x,y_2)=\displaystyle\frac{f(x_2,y_2)-f(x_1,y_2)}{x_2-x_1} \ne 0$$

-
+1: a very nice question for this site. I would be happy to see more; please feel free to continue in this vein... – Pete L. Clark Sep 6 '10 at 21:32

I've marked this as "community wiki" for myself...

Your argument is a bit vague in the first paragraph; you have an indefinite integral, but what you actually want is the function; that is, you want $f(x,y_1)=C$. Edit: The problem with this is that, if you recall, the indefinite integral does not produce a function, but produces a family of functions, namely all the antiderivatives of your function, and not a value of a particular function.

It would be better to use the Fundamental Theorem of Calculus, which you can use to get specific values of a function (or to be more precise, the difference between two values of a function), and write something along these lines:

Let $f\colon\mathbb{R}^2\to\mathbb{R}$ be a function such that $D_2f=0$. Fix an arbitrary $x$; then for any $y$ we have: $$f(x,y)-f(x,0) = \int_0^y D_2f(x,t)dt = \int_0^y 0dt = 0,$$ so for fixed $x$, $f(x,y)=f(x,0)$ for all $y$. Therefore, $f$ is independent of the second variable.

You may, of course, replace $0$ with another point above.

For the second part, why not use the first part? From $D_2f=0$ you know $f$ is independent of the second variable; the same argument, by exchanging $x$ and $y$, shows that from $D_1f=0$ you get that $f$ is independent of the first variable. So you have $$f(x_1,y_1) = f(x_1,y_2) = f(x_2,y_2)$$ for any $(x_1,y_1)$ and $(x_2,y_2)$; first equality because $f$ is independent of the second variable, second because it is independent of the first. Then you don't have to invoke something like the Mean Value Theorem.

But in any case, let me point out that you seem to be assuming that $(x_1,y_1)\neq(x_2,y_2)$ implies both that $x_1\neq x_2$ and $y_1\neq y_2$, but this is not true. You do not know a priori that $x_2\neq x_1$; all you know is that $(x_1,y_1)\neq(x_2,y_2)$, and therefore either $x_1\neq x_2$ or $y_1\neq y_2$ (or both). Your argument breaks down if $x_1=x_2$, and you need to consider that case separately. I would also add at some point, in the case $x_1\neq x_2$, that "we may assume without loss of generality that $x_1\lt x_2$", so that "$x\in(x_1,x_2)$" makes sense.

-
Thanks, that was illuminating. I suppose, then, that if I still wanted to use the Mean Value Theorem, I am still obliged to prove independence of the first variable to deal with the case where $x_1=x_2$, at which point using the Mean Value Theorem is unnecessary. – Unkz Sep 7 '10 at 2:05
Well, the proof has to be symmetric in $x$ and $y$, otherwise there would something deeply troubling about it! (The statement and the conclusion are both symmetric in $x$ and $y$). Your argument was not symmetric in $x$ and $y$, so that should have sounded a few alarm bells. Your argument using the MVT is perfectly fine (as proofs by contradiction go), but you would need to use the symmetric argument (using $D_2(x_1,y)$) to deal with the case $x_1=x_2$. Or at the very least mention that exchanging the roles of $x$ and $y$ will give the proof if $x_1=x_2$, as then $y_1\neq y_2$ will hold. – Arturo Magidin Sep 7 '10 at 2:17