[Math] A function whose partial derivatives exist everywhere, but is nowhere continuous

multivariable-calculus

Consider $f: \mathbb{R}^2 \rightarrow \mathbb{R}$. Unlike functions of one variable, the partial derivatives may exist at a point even though $f$ is not continuous there. I have seen examples where $f_x$ and $f_y$ exist in the neighbourhood of a point, but $f$ is not continuous at that point.

Can anyone provide an example of a function such that $f_x$ and $f_y$ exist everywhere but $f$ is nowhere continuous? It seems likely that such a function should exist, but I haven't been able to find any candidate.

Best Answer

There is no such function.

Every function that has partial derivatives is obviously continuous in $x$ for fixed $y$ and vice versa, so it must be of first Baire class, hence continuous almost everywhere in the category sense.

To prove this, we may "mollify" $f$ in $x$ for every fixed $y$ - consider, e.g., $f_\varepsilon := f \ast_x \varphi_\varepsilon$, where $\varphi_\varepsilon$ is a smooth compactly supported function of one variable, and $\ast_x$ is convolution with respect to $x$. Since $\varphi_\varepsilon$ is smooth, $f_\varepsilon(\cdot,y)$ are equicontinuous on compact sets; since they also inherit from $f$ its separate continuity, they become actually continuous in both variables. On the other hand, if $\varphi_\varepsilon$ approaches $\delta_0$, $f_\varepsilon$ converge to $f$ pointwise, so $f$ is indeed of first Baire class.

Related Question