TITLE: Limits of 2 variable functions
QUESTION [9 upvotes]: How would I prove that if $f: \mathbb R^2 \to \mathbb R$ is a function such that
$$\lim_{(x,y)\to(a,b)} f(x,y) = L$$
and for every $y_0 \in \mathbb R$ 
$$ \lim_{x\to a} f(x,y_0) = L'_{y_0}$$
and for every $x_0 \in \mathbb R$ 
$$ \lim_{y\to b} f(x_0,y) = L''_{x_0}$$
then
$$
\lim_{x\to a}\left(\lim_{y\to b} f(x,y)\right)  = \lim_{y\to b}\left(\lim_{x\to a} f(x,y)\right) = L$$

REPLY [11 votes]: This is a rejoinder to Arturo's comment that if the two-variable limit
exists then both iterated limits exist.
Define
$$f(x,y)=\left\{\begin{array}{cl}
(x^2+y^2)\sin(1/x+1/y)&\textrm{if $xy\ne0$,}\\
0&\textrm{if $xy=0$.}
\end{array}\right.$$
Then certainly $f$ is continuous at $(0,0)$; that is
$$\lim_{(x,y)\to(0,0)}f(x,y)=0.$$
But for any nonzero $x$,
$$\lim_{y\to0}f(x,y)$$
doesn't exist (the function is wildly oscillatory for $y$ near zero). So
$$\lim_{x\to0}\left(\lim_{y\to0}f(x,y)\right)$$
is meaningless.