# When do partial derivatives fail to commute?

What are the conditions that a function $f(x,y)$ should satisfy for the partial derivatives $f_{xy}$ and $f_{yx}$ to be equal?

• You need the function to be twice continuously differentiable (aka of class $C^2$). See en.wikipedia.org/wiki/… Feb 2, 2017 at 17:49
• @Crostul since the OP commented on my post I came back to this question and just saw your comment. Note that the twice differentiability is sufficient but not necessary, so you don't "need" this. Mar 26, 2017 at 16:01

Suppose that $f$ is defined on a disk $D$ that contains the point $(a,b)$. If the functions $f_{xy}$ and $f_{yx}$ are continuous on this disk then $$f_{xy}(a,b) =f_{yx}(a,b)$$
We can actually restrict ourselves a bit less and let $D$ be any open subset of $\mathbb{R}^2$, which generalizes nicely to
Suppose $f$ is a function of variables defined on an open subset $D$ or $\mathbb{R}^n$. Suppose all mixed partials with each possible number of and combination of differentiations in each input variable exist and are continuous on $D$. Then, all the mixed partials are continuous.
• Can you give a simple example of a function $f(x,y)$ where $f_{xy}\neq f_{yx}$? @Brevan Ellefsen