Continuous function with partial derivative that is continuous in one variable but not the other Does there exist a function $f: \mathbb R^2 \to \mathbb R$ with the following property

*

*$f$ is continuous

*$\frac{\partial f}{\partial x}$ exists

*For each fixed $y$, $\frac{\partial f}{\partial x}(x,y)$ is a continuous function of $x$

*$\frac{\partial f}{\partial x}(0,y)$ is not a continuous function of $y$
I suspect the answer is yes, i.e. the first three properties do not imply the fourth since I don't see how to prove that, but I can't think of an easy example.
 A: No, it doesn't exist.
To show why, first some definitions:

DEFINITION: Continuous function. Let $\Omega$ be a connected subset of $\Bbb R^n$. A function $ \boldsymbol F:\Omega\to\Bbb R^m$ is continuous at a point $\boldsymbol x$ if,

*

*$\boldsymbol F(\boldsymbol x)$ exists

*$\lim_{\boldsymbol x'\to \boldsymbol x}\boldsymbol F(\boldsymbol x')$ exists and is equal to $\boldsymbol F(\boldsymbol x)$.



DEFINITION: Derivative. Let $U$ be an open subset of $\Bbb R^n$ and let $\boldsymbol F: U\to\Bbb R^m$. The derivative of $F$ with respect to its $k$th argument at the point $\boldsymbol x$ is defined as
$$(\partial_k \boldsymbol F)(\boldsymbol x)=\lim_{h\to 0}\frac{\boldsymbol F(\boldsymbol x+h~\boldsymbol e_k)-\boldsymbol F(\boldsymbol x)}{h}$$
Where $\boldsymbol e_k$ is the unit vector in the $+x_k$ direction. If this limit exists at all points $\boldsymbol x\in U$, $F$ is said to be "differentiable on $U$".


Problem: Does there exist a function $f:\Bbb R^2\to\Bbb R$ such that

*

*$f$ is continuous (in both arguments!)

*$\partial_1f$ exists everywhere in $\Bbb R^2$

*$\partial_1 f(\cdot ,x_2)$ is continuous

*$\exists x_1\in\Bbb R$ such that $\partial_1 f(x_1,\cdot)$ is not continuous

ANSWER: No.
Proof:
We know that $f$ is continuous, so it is continuous in both its first and second argument. This means that, for all $(x,y)\in\Bbb R^2$, $f(x,y)$ exists and $\lim_{y'\to y}f(x,y')$ exists. We also know that, since $\partial_x f$ exists, that $\forall (x,y)\in\Bbb R^2$, $\partial_xf(x,y)$ exists which implies the limit
$$\partial_x f(x,y)=\lim_{x'\to x}\frac{f(x',y)-f(x,y)}{x'-x}\tag{*}$$
Exists.
So, we need to ask ourselves - is $\partial_x f$ continuous in its second argument? In other words, does $\lim_{y'\to y}(\partial_x f)(x,y')$ exist,  and is it equal to $(\partial_x f)(x,y)$ ? Well, from $(*)$, we should have
$$\lim_{y'\to y}(\partial_x f)(x,y')=\lim_{y'\to y}\lim_{x'\to x}\frac{f(x',y')-f(x,y')}{x'-x}\tag{**}$$
Let's park this for just a minute.


DEFINITION: Uniform convergence. Let $\Omega$ be a connected subset of $\Bbb R^n\times\Bbb R$ and let $\boldsymbol F:\Omega\to\Bbb R^m$. We say that $\boldsymbol F(\boldsymbol x,t)\to \boldsymbol G(\boldsymbol x_0,t)$ as $\boldsymbol x\to \boldsymbol x_0$ uniformly if, for all $\epsilon\in\Bbb R_+$, there exists $\delta\in\Bbb R_+$ such that, for all $\boldsymbol x$,
$$|\boldsymbol x-\boldsymbol x_0|<\delta\implies |\boldsymbol F(\boldsymbol x,t)-\boldsymbol G(\boldsymbol x_0,t)|<\epsilon$$

It is proved on this post that partial derivatives converge uniformly, i.e
$$\frac{f(x+h,y)-f(x,y)}{h}\to (\partial_x f)(x,y)~~~\text{as}~h\to 0 \\ \text{Uniformly.}$$

Coming back to the task at hand, we are going to need the Moore-Osgood theorem:

If $\lim_{t'\to t}f(\boldsymbol x,t')\to h(\boldsymbol x)$ pointwise (i.e, the limit exists) and $\lim_{\boldsymbol x'\to \boldsymbol x}f(\boldsymbol x',t)\to g(t)$ uniformly, then
$$\lim_{\boldsymbol x'\to \boldsymbol x}\lim_{t'\to t}f(\boldsymbol x',t')=\lim_{t'\to t}\lim_{\boldsymbol x'\to \boldsymbol x}f(\boldsymbol x',t')=\lim_{(\boldsymbol x',t')\to(\boldsymbol x,t)}f(\boldsymbol x',t')$$

Returning to $(**)$, from the uniform convergence of the partial derivative we know that
$$\frac{f(x',y)-f(x,y)}{x'-x}\to \partial_x f(x,y)~~~\text{as}~x'\to x \\ \text{Uniformly}$$
So due to the Moore-Osgood theorem this is already enough to move in the $y$ limit,
$$\lim_{y'\to y}\lim_{x'\to x}\frac{f(x',y')-f(x,y')}{x'-x}=\lim_{x'\to x}\lim_{y'\to y}\frac{f(x',y')-f(x,y')}{x'-x}$$
But, $f$ is continuous, and so the function
$$\frac{f(x',~\cdot ~)-f(x,~\cdot~)}{x'-x}$$
Is also certainly continuous, which means by definition that
$$\lim_{y'\to y}\frac{f(x',y')-f(x,y')}{x'-x}=\frac{f(x',y)-f(x,y)}{x'-x}$$
Hence
$$\lim_{y'\to y}(\partial_x f)(x,y')\\=\lim_{x'\to x}\lim_{y'\to y}\frac{f(x',y')-f(x,y')}{x'-x}=\lim_{x'\to x}\frac{f(x',y)-f(x,y)}{x'-x} \\ =(\partial_x f)(x,y)$$
From $(*)$. Hence we have shown
$$\lim_{y'\to y}(\partial_x f)(x,y')=(\partial_x f)(x,y)$$
Hence $\partial_x f$ is continuous in its second argument.
$\blacksquare$

The intuition behind this rather ugly proof is that the $\partial_x$ operator "only acts along the $x$ axis." So if $f$ was continuous in its second argument to begin with, taking limits on its first argument won't change that.
