# $f: \mathbb R^2 \to \mathbb R$ is differentiable when both partials exist and one is continuous

I'm trying to solve the following exercise:

Let $f:\mathbb R^2 \to \mathbb R$ a continuous function whose partials exist everywhere in $\mathbb R^2$. Show that $f$ is ($\mathbb R$-)differentiable when $\frac{\partial f}{\partial x}$ is continuous.

I know from a theorem that $f: \mathbb R^n \to \mathbb R$ is differentiable if every partial is continuous. Now it seems to be the case that I only need one partial to be continuous.

My attempt was at first to show that $\frac{\partial f}{\partial y}$ is continuous, however I don't know if that is necessary or even possible (since $f$ can be differentiable without both partials being continuous).

My second attempt was to show that a $\mathbb R$-linear function $L$ exists with $$\lim\limits_{h\to 0}\frac{f(\zeta + h) - f(\zeta) - L(h)}{||h||_2} =0$$ Since this function must be $\nabla f$, I proved $\nabla f$ is linear and now want to show that $$\lim\limits_{h\to 0}\frac{f(\zeta + h) - f(\zeta) -(\frac{\partial f(\zeta)}{\partial x}h_1+\frac{\partial f(\zeta)}{\partial y}h_2)}{||h||_2} =0$$

This is where I am stuck, I doubt that this is the correct way to prove it but don't know what to do else. Would appreciate some help.

Edit: This is what I've tried to do next with help of Davids hints: Define $$\nabla f(0) = (\frac{\partial f}{\partial x}(0), \frac{\partial f}{\partial y}(0)) =: (\alpha, \beta)$$ It now holds that
\begin{align*} & f(h) - f(0) - (\alpha h_1 + \beta h_2) \\ &=f(h) - f(h_2 e_2)) - \alpha h_1 + f(h_2 e_2) - f(0) - \beta h_2\end{align*} If we plug that into the definition we get $$\lim \limits_{h\to0}\frac{f(h) - f(h_2 e_2) - \alpha h_1 + f(h_2 e_2) - f(0) - \beta h_2}{||h||_2} \\ =\lim \limits_{h\to0}\frac{f(h) - f(h_2 e_2) - \alpha h_1}{||h||_2} + \lim \limits_{h\to0}\frac{f(h_2 e_2) - f(0) - \beta h_2}{||h||_2} \\ =\lim \limits_{h\to0}\frac{f(h) - f(h_2 e_2)}{||h||_2} - \lim \limits_{h\to0}\frac{\alpha h_1}{||h||_2} + \lim \limits_{h\to0}\frac{f(h_2 e_2) - f(0)}{||h||_2}- \lim \limits_{h\to0}\frac{\alpha h_1}{||h||_2} \\ =\lim \limits_{h\to0}\frac{f(h) - f(h_2 e_2)}{||h||_2} - \lim \limits_{h\to0}\frac{\alpha h_1}{||h||_2} + \frac{\partial f}{\partial y}(0)- \lim \limits_{h\to0}\frac{\alpha h_1}{||h||_2}$$ This is where I am stuck. I don't know the $\alpha$ and $\beta$ terms tend to 0 for $h\to0$ or not and how to use the continuity of $\partial_x f$.

Hint: $$f(\zeta+h)-f(\zeta)=[f(\zeta+h)-f(\zeta+(0,h_2)]+[f(\zeta+(0,h_2))-f(\zeta)].$$The continuity of $\partial f/\partial x$ lets you handle $f(\zeta+h)-f(\zeta+(0,h_2)$, and then you can use existence of $\partial f(\zeta)/\partial y$ for $f(\zeta+(0,h_2))-f(\zeta)$.

Slightly more detailed hint: Say $\nabla f(\zeta)=(\alpha,\beta)$. The triangle inequality shows that

$$|f(\zeta+h)-f(\zeta)-(\alpha h_1+\beta h_2)|\le |f(\zeta+h)-f(\zeta+(0,h_2)-\alpha h_1|+|f(\zeta+(0,h_2))-f(\zeta)-\beta h_2|.$$

Giving up, posting solution: I see you've switched to $\zeta=0$, great. So let $\nabla f(0)=(\alpha,\beta)$.

The definition of $\partial f(0)/\partial y=\beta$ says $$\lim_{h_2\to0}\frac{f(0,h_2)-f(0)}{h_2}=\beta,$$or $$\lim_{h_2\to0}\frac{f(0,h_2)-f(0)-\beta h_2}{h_2}=0.$$ Since $||h||\ge |h_2|$ this shows that $$\lim_{h\to0}\frac{f(0,h_2)-f(0)-\beta h_2}{||h||}=0.$$ Note that only used the existence of $\partial f/\partial y$ at the origin.

Now let $\epsilon>0$. Choose $\delta>0$ so $$\left|\frac{\partial f}{\partial x}(x,y)-\alpha\right|<\epsilon\quad(||(x,y)||<\delta).$$ Suppose $||h||<\delta$ and $h_1\ne0$. Just to make the notation work out, assume $h_1>0$; the case $h_1<0$ is similar. The Mean Value Theorem shows that there exists $t\in(0,h_1)$ with $$\frac{f(h)-f(0,h_2)}{h_1}=\frac{\partial f}{\partial x}(t,h_2).$$Since $||(t,h_2)||<\delta$ this shows that $$\left|\frac{f(h)-f(0,h_2)}{h_1}-\alpha\right|<\epsilon.$$So $$\frac{|f(h)-f(0,h_2)-\alpha h_1|}{||h||} \le \frac{|f(h)-f(0,h_2)-\alpha h_1|}{|h_1|}<\epsilon.$$

Now you're done; the triangle inequality shows that if $||h||$ is small enough then $$\frac{|f(h)-f(0)-\alpha h_1-\beta h_2|}{||h||}<2\epsilon.$$

• Did you confuse signs in your equation? Why is it $-f(\zeta - h)$ and not $+f(\zeta - h)$? Jun 29, 2016 at 15:01
• @lappen68 Aargh. Yes, it's all screwed up. Thanks. Jun 29, 2016 at 15:06
• You're welcome. I'll try using what you said. Jun 29, 2016 at 15:10
• @lappen68 I think I have it straight now. Anyway it sounds like you got the idea... Jun 29, 2016 at 15:15
• I tried to do some stuff with your hint now, but I can't seem to find the right answer. Do I even have to use my $\nabla f$ being the $\mathbb R$-linear function or do I follow the wrong approach? Jun 29, 2016 at 18:50