[Math] Finding an example which is Gâteaux-differentiable in one point but not continuous in this point

derivatives

Find an example for a $f\colon X\to Y$ which is Gâteaux-differentiable in a point $x_0$ but not continuous in this point $x_0$.

I am not good in finding examples but I thought of
$$
f\colon\mathbb{R}\to\mathbb{R}, f(x):=\begin{cases}0, & x\leq 1\\1, & x>1\end{cases}
$$
I guess on the one hand this function is not continuous in $x_0=1$ but the Gâteaux derivative
$$
\eta=Df(1)[h]=\lim\limits_{t\to 0}\frac{f(1+th)-f(1)}{t}=0
$$
exists to my opinion.

Is this an appropriate example?

Edit

Isn't the function
$$
F\colon\mathbb{R}\to\mathbb{R}, F(x):=\begin{cases}1, & x\neq z\\0, & x=z\end{cases}
$$
Gâteaux-differentiable in $z$ and not continuous in $z$?

Best Answer

The function $f:\mathbb R\to\mathbb R$ defined by $f(x)=\mathbf 1_{x\gt1}$ is not Gâteaux-differentiable at $x=1$ since $t^{-1}(f(x+th)-f(x))=t^{-1}$ diverges when $t\to0$, $t\gt0$, for $x=1$ and $h=1$. In fact, in dimension $1$, Gâteaux-differentiability implies continuity.

On the other hand, consider a point $z$ in $\mathbb R^2$, a circle $\bar C$ passing through $z$, $C=\bar C\setminus\{z\}$, and the function $g=\mathbf 1_C$.

For every $h\ne(0,0)$ in $\mathbb R^2$, the line $z+h\mathbb R$ does not meet $C$ in a neighborhood of $z$, that is, there exists some positive $t_{h,z}$ such that $\{z+th\mid|t|\lt t_{h,z}\}\cap C$ is empty. (To see this, note that $C$ intersects each line passing through $z$ at one point at most, which is never $z$.)

In particular, for every $|t|\lt t_{h,z}$, $t^{-1}(g(z+th)-g(z))=0$ hence the Gâteaux-differential of $g$ at $z$ in the direction $h$ exists and is $0$, although $g$ is not continuous at $z$ since the point $z$ is in the boundary of $C$.

Related Question