TITLE: a function with differentiable partial derivatives but unequal mixed derivatives
QUESTION [7 upvotes]: 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.

REPLY [3 votes]: 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.)