# Example of a continuous and Gâteaux differentiable function that is not Fréchet differentiable.

Is there an example of a function $f:\mathbb{R}^2 \to \mathbb{R}$, with $f(0,0) = 0$, that is Gâteaux differentiable (all directional derivatives exist) and continuous at $(0,0)$, but is not Fréchet differentiable at $(0,0)$?

Edit: By Gâteaux differentiable, I use the definition that the Gâteaux derivative is not required to be a linear map, but just all the directional derivatives to exist in all directions.

Let $f \colon \mathbb R^2 \to \mathbb R$ be given by $$f(x,y) = \begin{cases} x & x \ne 0, y = x^2, \\ 0 & \text{else}.\end{cases}$$ This function is directionally differentiable (with a linear derivative) and continuous in $(0,0)$.

With your definition of Gâteaux differentiability, you can even use any norm on $\mathbb R^2$, e.g., $$f(x,y) = \sqrt{x^2 + y^2}$$ or $$f(x,y) = |x| + |y|.$$

• That's not continuous at $(0,0).$ – zhw. May 26 '17 at 22:07
• @zhw: fixed it. – gerw May 27 '17 at 20:34
• This still does not work. It's not Gâteaux differentiable at $(0,0)$ since the directional derivative at $(0,0)$ in direction $(1,0)$, ie. the partial derivative with respect to $x$, does not exist. You have $\lim_{h \to 0} \frac{1}{h}(f(h,0) - f(0,0)) = \lim_{h \to 0} \frac{|h|}{h}$, which does not exist. – AlexError May 28 '17 at 2:17
• @AlexError: My definition of directional differentiability only requires $\lim_{h \searrow 0} \ldots$. Nevertheless, the first example still works. – gerw May 28 '17 at 6:42
• That would be the right directional derivative. Let $f: U \subset X \to Y$ be a function, where $X$ and $Y$ are normed vector spaces. The directional derivative at point $x \in U$ in direction $v \in X\setminus \{0\}$ is defined to be: $\lim_{h \to 0} \frac{1}{h}(f(x+hv) - f(x))$. – AlexError May 28 '17 at 12:02

Let $f \colon \mathbb R^2 \to \mathbb R$ be given by:

\begin{align} f(x,y) = \begin{cases} 0, \quad (x,y)=(0,0),\\ \frac{x^3}{x^2+y^2}, \quad (x,y) \neq(0,0). \end{cases} \end{align}

• This is discontinuous at $(0,0)$, when approaching from $y=x^2$. – AlexError May 26 '17 at 23:01
• Ah right - missed the continuous part. – Martin May 27 '17 at 2:31
• The current example is continuos (to clarify) – ijuneja Oct 4 '19 at 4:39

Let $f:\mathbb{R}^2 \to \mathbb{R}$ be defined by $$f(x,y) = \left\{ \begin{array}{ll} x, & \quad \frac{1}{2}x^2<y<2x^2; \\ 0, & \quad \mbox{otherwise}. \end{array} \right.$$ This is continuous and Gâteaux differentiable at $(0,0)$, but not Fréchet differentiable at $(0,0)$.

• This is essentially my example. – gerw May 28 '17 at 6:41