What needs to be true of $f$ for $f_{xy}=f_{yx}$? What conditions does a function $f$ have to fulfill in order that:
$\frac{\partial}{\partial x}(\frac{\partial f}{\partial y})=\frac{\partial}{\partial y}(\frac{\partial f}{\partial x}) $? 
I am trying to prove something else, and I have just got it down to this bit, which is usually true, but I'm not sure what was to be true of $f$ for this to be true. Continuity? Differentiable?  
 A: Clairaut's Theorem is definitely the most commonly used version of the theorem, but you may like to know a slightly more general case in which it still holds. This version usually goes by the name of Schwarz Theorem:

Theorem (Schwarz) Let $E \subseteq \mathbb{R}^n$ and $f:E \to \mathbb{R}$. Let $x_0 \in E^\circ$ and assume that for some $i,j$ there is $B(x_0,r) \subseteq E$ such that for all $x \in B(x_0,r)$ all of $\frac{\partial f}{\partial x_i}(x), \frac{\partial f}{\partial x_j}(x), \frac{\partial^2 f}{\partial x_j \partial x_i}(x)$ exist. If $\frac{\partial^2 f}{\partial x_j \partial x_i}$ is continuous at $x_0$, then $\frac{\partial^2 f}{\partial x_i \partial x_j}(x_0)$ exists and $\frac{\partial^2 f}{\partial x_j \partial x_i}(x_0) = \frac{\partial^2 f}{\partial x_i \partial x_j}(x_0)$.

In plain english: if $f_x,f_y, f_{xy}$ exist near $x_0$ and $f_{xy}$ is continuous at $x_0$, then $f_{xy}(x_0)=f_{yx}(x_0)$.
Note that in the case that $f_{xy}$ and $f_{yx}$ are everywhere continuous, Clairaut's Theorem follows.
A: Clairaut's Theorem:
Suppose $f(x,y)$ is a real-valued function defined on all of ${\mathbb R^2}$. Suppose further that the second-order mixed partial derivatives $f_{xy}(x,y)$ and $f_{yx}(x,y)$ both exist and are continuous on ${\mathbb R^2}$. Then $f_{xy}=f_{yx}$ on all of ${\mathbb R^2}$.


*

*The same result applies if $f$ and its derivatives exist and are continuous on an open subset of ${\mathbb R^2}$.

*This result can be generalized to higher-order derivatives and to functions of more than two variables.

A: yes, if $f$ has continuous second partial derivatives at any given point (so it needs to be both continuous and twice differentiable)
