Partial derivatives of $f$ exist, but only $n-1$ of them are continuous, implies differentiability The problem I am working on is stated as follows.

Let $A \subset R^2$ be open and $(a_1,a_2)\in A$. Suppose $f:A\to R$ satisfies that $\frac{\partial f}{\partial x_1}(a_1, a_2)$ exists,
  and that $\frac{\partial f}{\partial x_2}$ is continuous in $A$. Prove that $f$ is differentiable at $(a_1, a_2)$.

My professor gave the title as a remark to the proof that if all partials exist and are continuous in $A$ then $f$ is differentiable. I am having trouble proving it even for this specific case that I am working with. I used an argument involving the mean value theorem to show that 
$|f(y)-f(x)-\sum_{i=1}^2\frac{\partial f}{\partial x_i}(x_1,x_2)*(y_i-x_i)|$
$\leq ||y-x||*[|\frac{\partial f}{\partial x_1}(u_1,y_2)-\frac{\partial f}{\partial x_1}(x_1,x_2)|+|\frac{\partial f}{\partial x_2}(x_1,u_2)-\frac{\partial f}{\partial x_2}(x_1,x_2)|]$ ,where $u_i$ is between $x_i$ and $y_i$.
From here I can use the continuity of $\frac{\partial f}{\partial x_2}$ to show that the second term in the inequality is bounded by $\frac{\epsilon}{2}$ but I am unsure of how I can get a nice upper bound for the first term. I realize I skipped a lot of intermediate steps but I am not sure if this is even the correct way to proceed with this proof. If someone could help me with a hint or maybe some intuition on why this statement should be true I would really appreciate it.
 A: I'll use $D_1,D_2$ to denote partial derivatives with respect to the first and second variables. Suppose for simplicity that $a=(0,0)$ and $B((0,0),r)\subset A.$ For $|(x,y)|<r,$ we have
$$f(x,y) - f(0,0) = f(x,y) - f(x,0)+ f(x,0)-f(0,0).$$
By the MVT,
$$f(x,y) - f(x,0) = D_2f(0,c(x,y))y$$ $$ = D_2f(0,0)y +[D_2f(0,c(x,y))-D_2f(0,0)]y =D_2f(0,0)y + o(y).$$
The $o(y)$ term comes from the fact that as $(x,y)\to (0,0),$ $c(x,y)$ is dragged along to $(0,0).$ The continuity of $D_2f$ at $(0,0)$ then gives it.
Looking at the other difference, we have
$$f(x,0)-f(0,0) = \frac{f(x,0)-f(0,0)}{x}x$$ $$ =D_1f(0,0)x + \left (\frac{f(x,0)-f(0,0)}{x} - D_1f(0,0)\right )x = D_1f(0,0)x +o(x).$$
The $o(x)$ term comes simply from the definition of $D_1f(0,0).$
So we have
$$f(x,y) - f(0,0) = D_2f(0,0)y + D_1f(0,0)x +o(y) + o(x),$$
and this shows $f$ is differentiable at $(0,0).$ (Note that $D_2f$ continuous in $A$ is not needed; we used only the continuity of $D_2f$ at $(0,0).)$
A: I hope you don't mind if I change the notation a bit.
Let $a = (a^1,a^2) \in A$. Let $h = (h^1,h^2) \in \mathbb{R}^2$. The partial derivatives of $f$ will be denoted by $D_1 f$ and $D_2 f$, instead of $\partial f/\partial x_1$ and $\partial f/\partial x_2$. For example, $D_1 f(a)$ denotes the partial derivative of $f$ with respect to the first coordinate, evaluated at $a \in A$.

We begin by noting that
\begin{align}
&f(a+h) - f(a) - \sum_{i=1}^2 D_i f(a) \cdot h^i\\ ={} & f(a^1+h^1,a^2) - f(a^1,a^2)- D_1 f(a) \cdot h^1 + (D_2 f(c) - D_2 f(a)) \cdot h^2,
\end{align}
where $c = (a^1 + h^1,b)$, and $b$ lies between $a^2$ and $a^2 + h^2$. (Here, $b$ is found by an application of the mean value theorem.) So,
\begin{align}
&\left| f(a+h) - f(a) - \sum_{i=1}^2 D_i f(a) \cdot h^i \right|\\
\leq{} &|f(a^1 + h^1,a^2) - f(a^1,a^2) - D_1 f(a) \cdot h^1| + |D_2 f(c) - D_2 f(a)| \cdot |h^2|
\end{align}
Now, by the continuity of $D_2 f$ at $a \in A$, we have $$\lim_{h \to 0} \frac{|D_2 f(c) - D_2 f(a) | \cdot |h^2|}{|h|} = 0.$$ So, we are left to evaluate
the expression
$$
\frac{|f(a^1 + h^1,a^2) - f(a^1,a^2) - D_1 f(a) \cdot h^1|}{|h|} \tag{$*$}
$$
in the limit as $h$ goes to $0$. For $h^1 \neq 0$, we have
\begin{align*}
&\frac{|f(a^1 + h^1,a^2) - f(a^1,a^2) - D_1 f(a) \cdot h^1 |}{|h|}\\
\qquad \qquad \qquad ={} &\frac{|f(a + h^1 e_1) - f(a) - h^1 D_{e_1} f(a)|}{|h|} \qquad \qquad \qquad (e_1 = (1,0)) \\
\leq{} &\frac{|f(a + h^1 e_1) - f(a) - h^1 D_{e_1} f(a)|}{|h^1|}.
\end{align*}
We are emphasising that the last fraction appears in the limit defining the directional derivative of $f$ at $a$ along $e_1$. So,
\begin{align*}
&\lim_{\substack{h \to 0\\ h^1 \neq 0}} \frac{|f(a^1 + h^1,a^2) - f(a^1,a^2) - D_1 f(a) \cdot h^1 |}{|h|}\\
\leq{} &\lim_{\substack{h \to 0\\h^1 \neq 0}} \frac{|f(a + h^1 e_1) - f(a) - h^1 D_{e_1} f(a)|}{|h^1|}\\
={} &\lim_{h^1 \to 0} \frac{|f(a + h^1 e_1) - f(a) - h^1 D_{e_1} f(a)|}{|h^1|}\\
{}={} &0,
\end{align*}
because it is given that $D_1 f(a) = D_{e_1} f(a)$ exists. And, for $h^1 = 0$, we have
$$
\lim_{\substack{h \to 0\\h^1 = 0}} \frac{|f(a^1,a^2) - f(a^1,a^2) - 0 \cdot D_1 f(a) |}{|h|} = 0.
$$
Therefore,
$$
\lim_{h \to 0} \frac{|f(a^1 + h^1,a^2) - f(a^1,a^2) - D_1 f(a) \cdot h^1 |}{|h|} = 0.
$$
Hence,
$$
\lim_{h \to 0} \frac{\left| f(a+h) - f(a) - \sum_{i=1}^2 D_i f(a) \cdot h^i \right|}{|h|} = 0,
$$
which shows that $f$ is differentiable at $a$.
