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.

  • $\begingroup$ 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. $\endgroup$ Nov 16, 2018 at 21:57
  • $\begingroup$ The domain is the entire plane minus the nonnegative part of the $x$-axis. The negative part of the $x$-axis is included in the first condition “$x<0$ or [...]”, so $f$ is defined (equal to zero) there. $\endgroup$ Oct 7, 2021 at 10:36

1 Answer 1


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$.

  • $\begingroup$ Could you provide an example of a function like that defined on all of $\mathbb{R}^2$ ? $\endgroup$
    – me10240
    Nov 16, 2018 at 22:51
  • $\begingroup$ 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. $\endgroup$
    – me10240
    Nov 17, 2018 at 1:56
  • $\begingroup$ 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$ $\endgroup$ Nov 17, 2018 at 11:13
  • $\begingroup$ @RafaBudría I do not understand; Q1 is not a yes/no question. $\endgroup$ Nov 17, 2018 at 11:22
  • $\begingroup$ Answering in affirmative to the question Q1 is, to my understanding, say that it is correct writing $f(x,y) = g(x) + h(y)$ piece wise in each quadrant. $\endgroup$ Nov 17, 2018 at 11:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.