10
$\begingroup$

I am looking for an example of a function $f:\mathbb{R}^2\rightarrow\mathbb{R}$ such that $\frac{\partial f}{\partial x}$ and $\frac{\partial f}{\partial y}$ are both differentiable at some point, say the origin, but $\frac{\partial^2 f}{\partial x\partial y}\neq\frac{\partial^2 f}{\partial y\partial x}$ at that point.

$\endgroup$
2
  • 2
    $\begingroup$ Maybe you can start from here: en.wikipedia.org/wiki/… $\endgroup$
    – Siminore
    Commented Mar 18, 2014 at 12:07
  • $\begingroup$ Thanks Siminore, but the example given there is the "standard" example of a function with unequal mixed derivatives (at the origin), and in this example the partial derivatives are not even continuous. $\endgroup$
    – tipshoni
    Commented Mar 18, 2014 at 17:15

4 Answers 4

4
$\begingroup$

If $f_{xy}$ and $f_{yx}$ are continuous, then they are necessarily equal. The only examples you will find where the mixed partial derivatives are $not$ equal will be just like the standard example, $f(x,y)=x \cdot y\cdot \displaystyle \frac{x^2-y^2}{x^2+y^2}$ (and $f(0,0)=0$), and this example works precisely because $f_{xy}$ and $f_{yx}$ are not continuous at the origin. In this case $f_{xy}(0,0)=1$ and $f_{yx}(0,0)=-1$. At all other points, the mixed partials are equal.

$\endgroup$
2
  • $\begingroup$ Thanks tcourant. At a point where $f_{xy}\neq f_{yx}$, certainly $f_{xy}$ and $f_{yx}$ can not be continuous, but this does not mean that at this point $f_x$ or $f_y$ are not differentiable, and I would like to see an example where $f_x$ and $f_y$ are both differentiable, but $f_{xy}\neq f_{yx}$. $\endgroup$
    – tipshoni
    Commented Oct 17, 2014 at 13:20
  • 1
    $\begingroup$ @tipshoni $f(x)=x^2\sin(1/x), f(0)=0$ is a single-variable differentiable function whose derivative at $0$ is not continuous. $\endgroup$
    – Rodrigo
    Commented Jan 6, 2016 at 18:04
3
$\begingroup$

The original "standard" counterexample most certainly has continuous first partials everywhere.

The function is proportional to $r^2 \sin(4 \theta)$, which — since $\sin$ is bounded — is dominated by $r^2$ at the origin. Hence all directional derivatives are $0$ there, and approach $0$ along any curve into the origin. (And from the rational function expression for this, it's clear that the function is infinitely differentiable everywhere else.)

$\endgroup$
1
  • $\begingroup$ This just shows that the function itself is differentiable (in fact continuously differentiable), but the OP wants the partial derivatives to also be differentiable (which in this example, they are not). $\endgroup$ Commented Feb 8, 2023 at 12:32
1
$\begingroup$

There is no such example!

Theorem: If a function is twice-differentiable (meaning that its first partial derivatives are differentiable), then its mixed second partial derivatives are symmetric.

Proof: see https://ncatlab.org/nlab/show/differentiable+map#symmetry.

So symmetry of mixed second partial derivatives does not require the second partial derivatives to be continuous; the first partial derivatives just have to be differentiable. In other words, the function doesn't have to be twice continuously differentiable, just twice differentiable. (This is, of course, stronger than the mere existence of the second partial derivatives; you already have examples where they exist but aren't symmetric, just not where the first partial derivatives are differentiable.)

Corollary: If a function's second partial derivatives are continuous, then its mixed second partial derivatives are symmetric.

Proof: Apply the theorem that if a function's partial derivatives are continuous, then the function is differentiable, to the first partial derivatives of the original function; then apply the preceding theorem.

So the famous theorem about symmetry of partial derivatives is just a corollary of this more basic theorem. (Although there's also a version of this theorem that only requires one of the mixed second partial derivatives to be continuous, and that one's not just a corollary.)

$\endgroup$
5
  • $\begingroup$ For a function of several variables to be twice-differentiable at a point, a sufficient condition is that the second partial derivatives exist and are continuous at that point. Simply having existence of second partials (first partials being differentiable) is not sufficient for the function itself to be twice-differentiable. $\endgroup$
    – Adam
    Commented Apr 23, 2023 at 21:14
  • 1
    $\begingroup$ @Adam : You're right that the existence of second partials is not sufficient. But that's not the same as the first partials being differentiable! Just as differentiability is stronger than the existence of the first partials, so second differentiability is stronger than the existence of the second partials. If the first partials are differentiable, then the second partials are symmetric. (There is a proof at the link, like I said; or if you still don't believe me, see if you can find a counterexample!) $\endgroup$ Commented Apr 24, 2023 at 2:14
  • $\begingroup$ Ah I think you are right, and I have misunderstood your post. For the first partials to be differentiable, the existence and continuity of second partials is a sufficient condition but not necessary. Your post points out a weaker condition for symmetry of the mixed second partials. $\endgroup$
    – Adam
    Commented Apr 24, 2023 at 3:36
  • $\begingroup$ Yes, precisely! And it seems to be just what the question is asking about: when the first partials are differentiable. $\endgroup$ Commented Apr 25, 2023 at 13:01
  • $\begingroup$ I've added a parenthetical remark to hopefully head off further confusion. $\endgroup$ Commented Apr 27, 2023 at 13:02
-3
$\begingroup$

Let $z = \arctan(y/x)$, then $\frac{d}{dy}\left(\frac{dz}{dx}\right) \not= \frac{d}{dx}\left( \frac{dz}{dy}\right)$

$\endgroup$
1
  • 1
    $\begingroup$ How is the function defined on the $x$-axis, and at the origin in particular ? I do not see how to define it there to make the function even continuous near the origin. $\endgroup$
    – tipshoni
    Commented Sep 17, 2014 at 6:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .