# $\dfrac{\partial^2 f}{\partial x \partial y} = 0 \nRightarrow f(x,y) = g(x) + h(y)$

I am working through Ted Shifrin's book Multivariable Mathematics. There is an exercise problem that is meant to demonstrate that one can have $$\dfrac{\partial^2 f}{\partial x \partial y} = 0$$ but$$f(x,y) \neq g(x) + h(y)$$.

The question (3.6.11) is as follows: $$\mathrm{Given} \; f(x, y) = \begin{cases} 0, \; x < 0\; \mathrm{or} \; y < 0 \\x^3, \; x \geq 0 \; \mathrm{and} \; y > 0 \end{cases}$$

1. Show that $$f$$ is $$C^2$$

2. Show that $$\dfrac{\partial^2 f}{\partial x \partial y} = 0$$

3. Show that $$f(x,y)$$ cannot be written as $$g(x) + h(y)$$ for appropriate functions $$g, h$$.

I see that the domain is the entire plane except the x-axis, that is $$\mathbb{R}^2 -\{y=0\}$$. The function is then 0 in all quadrants except the first, where it is $$x^3$$.

I could show 1. and 2. above, but I am puzzled by two things.

Q1 What's wrong with writing $$f(x,y) = g(x) + h(y)$$ piecewise in each quadrant ?

Q2. Will anything change if the domain allows the line $$y=0$$ also ?

Q3. What is the takeaway from this problem ? I do not understand that.

• For Q2, note that $lim_{y\rightarrow0^{+}}f(1,y)=1$, whereas $lim_{y\rightarrow0^{-}}f(1,y)=0$, so the function cannot be continuously extended to the positive x-axis. The function is already defined equal to 0 on the negative x-axis, by the first piecewise condition. – Leland Reardon Nov 16 '18 at 21:57

For Q1; defining the quadrants requires both $$x$$ and $$y$$. For example, defining $$g(x):=\left\{\begin{array}{ll} 0 &\text{ if } x<0\ \text{ or } \; y < 0, \\ x^3 &\text{ if } x\geq0 \; \text{ and } \; y > 0. \end{array}\right.,$$ does not make sense as now $$g(x)$$ depends on $$y$$. More formally; if $$f(x,y)=g(x)+h(y)$$ then for all $$(x_1,y_1),(x_2,y_2)\in\Bbb{R}^2$$ we have $$f(x_1,y_1)+f(x_2,y_2)-f(x_1,y_2)-f(x_2,y_2)=0.$$ But this is clearly not the case, take for example $$x_1=y_1=1$$ and $$x_2=y_2=-1$$.

For Q2; the given function $$f(x,y)$$ does not extend to a function differentiable on $$\Bbb{R}^2$$. There are no functions with this property that are differentiable on all of $$\Bbb{R}^2$$. See also this excellent answer.

For Q3; the takeaway is that the implication $$\frac{\partial^2f}{\partial x\partial y}=0 \qquad\Rightarrow\qquad f(x,y)=g(x)+h(y),$$ depends crucially on the domain; it holds if the domain is $$\Bbb{R}^2$$, but not if the domain is, for example, a disconnected subset of $$\Bbb{R}^2$$.

• Could you provide an example of a function like that defined on all of $\mathbb{R}^2$ ? – me10240 Nov 16 '18 at 22:51
• I'm sorry, I was mistaken. It must be time for bed, let me correct my answer first. – Inactive - avoiding CoC Nov 16 '18 at 23:06
• The bit about the domain of g(x) needing to be described by y is just mindblowing, many thanks to you for the answer, and to Professor Shifrin for the question. Its easy to forget that a function and its domain are inseparable. – me10240 Nov 17 '18 at 1:56
• I think Q1 has to be answered in affirmative. E.g. for the first quadrant $f(x,y)=x^3+0$, so is $g(x)=x^3$ and $h(y)=0$ – Rafa Budría Nov 17 '18 at 11:13
• @RafaBudría I do not understand; Q1 is not a yes/no question. – Inactive - avoiding CoC Nov 17 '18 at 11:22