# Gâteaux differentiable function (with linear continuous Gateaux derivative) that is not Fréchet differentiable

Currently, I am following a portion of the text Methods of Nonlinear Analysis. For normed real vector spaces $$(X,\|\cdot\|_X),(Y,\|\cdot\|_Y)$$ and $$a \in X$$, consider the following definitions from this text.

Directional Derivative: Let $$h \in X$$. If the limit $$\lim_{t \to 0;\ t \in \mathbb{R}} \frac{f(a+th)-f(a)}{t}$$ exists in $$Y$$, then the value of the limit is called the derivative of $$f$$ at $$a$$ in the direction $$h$$ and is denoted $$\delta f(a;h)$$.

Gâteaux Derivative: Suppose $$\delta f(a;h)$$ exists for all $$h \in X$$. If the function $$Df(a) : X \to Y$$ where $$h \mapsto \delta f(a;h)$$ is continuous and linear, then $$Df(a)$$ is called the Gâteaux derivative of $$f$$ at $$a$$.

Fréchet Derivative: If there exists a continuous linear transformation $$A : X \to Y$$ such that $$\lim_{\|h\|_X \to 0} \frac{\|f(a+h)-f(a)-Ah\|_Y}{\|h\|_X}$$ then we call $$A$$ the Fréchet derivative of $$f$$ at $$a$$ and denote it $$f'(a)$$.

Question: I am struggling to find an example of $$X,Y,a,f$$ such that the Gâteaux derivative of $$f$$ exists at $$a$$ but the Fréchet derivative of $$f$$ does not exist at $$a$$. Can anyone help provide such an example? Please note that the Gâteaux derivative must be linear and continuous. Since $$f$$ having a Fréchet derivative at $$a$$ implies the continuity of $$f$$ at $$a$$, I imagine there exists an example with $$X = \mathbb{R^2}, Y = \mathbb{R}, a = (0,0)$$ such that $$Df(0,0)$$ exists but $$f$$ is not continuous at $$(0,0)$$.

Among many other online sources, I have read the following stack exchange posts but I believe that each asks a slightly different question or uses a slightly different definition of the Gâteaux derivative:

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

What is an example of Gâteaux differentiable but not Fréchet differentiable at a point in a finite-dimensional space?

Question about discontinuous function with directional derivatives at a points

Another example that may help clarify the distinction is the following. Let $$C = \{(x_1,x_2): 0< x_1^3 and let $$f = \mathbb 1_C$$ be the indicator function of $$C$$, thus $$f(x_1,x_2)=1$$ if $$(x_1,x_2) \in C$$ and $$f(x_1,x_2)=0$$ otherwise.

Since $$\mathbb R^2$$ is finite-dimensional, all linear maps are continuous, so $$f$$ is Gateaux differentiable at $$a \in \mathbb R^2$$ precisely when the directional derivatives of $$f$$ at $$a$$ are given by a linear map. We claim that the directional derivatives of $$f$$ at $$0_2 \in \mathbb R^2$$, all exist and indeed they all vanish: if $$v = (v_1,v_2) \in \mathbb R^2$$ then if $$v_1.v_2\leq 0$$ then $$f(t.v)=0$$ for all $$t$$ and so $$\partial_v f(0)=0$$. If $$v_1v_2>0$$ then by symmetry we may assume that $$v_1,v_2$$ are positive, so that $$f(t.v)=0$$ when $$t<0$$ and if $$t>0$$ then $$f(tv_1,tv_2)=1$$ if $$t^3v_1^3, or $$v_2/v_1^2, so that $$f(t.v)=0$$ for $$t. Hence for $$|t| we have $$f(t.v)=0$$ so that $$\partial_v f(0)=0$$ for $$v$$ with $$v_1v_2>0$$ also.

Thus, once we fix a direction $$\mathbb R.v$$, that is, restricting $$f$$ to any line $$\mathbb R.v$$, the function $$f$$ is identically $$0$$ near $$0_2\in\mathbb R^2$$. It is immediate that $$Df(0_2) =0_{\text{Mat}_2(\mathbb R)}$$, i.e. the Gateaux derivative exists, but $$f$$ is obviously not even continuous at $$0_2$$.

What this example is emphasizing is that, once $$\dim(V)>1$$, the requirement that a limit exists as $$h\to 0$$, i.e. as $$\|h\|\to 0$$ is strictly stronger than the requirement that the limits exist as you tend to zero along each ray through the origin, even where all these directional limits are compatible in the sense that their values are a linear function of the direction: in the case of $$C$$, if $$p(t) = (t,1/2(t^2+t^3))$$, then $$f(p(t))=1$$ for all $$t \in (0,1)$$ and $$p(t)\to 0_2$$ as $$t\to 0$$.

Addendum: If you want an example where $$f$$ is continuous, and $$Df(0_2)$$ exists but $$f$$ is not Frechet differentiable at $$0_2$$, then let $$f(x) = \|x\|\mathbb 1_C$$. Then, since $$\|f(x)\|\leq \|x\|$$ for all $$x$$, $$f$$ is clearly continuous at the origin. The same reasoning as above shows that the directional derivatives $$\partial_v f(0_2)$$ all exist and are zero. To see that $$f$$ is nevertheless not Frechet differentiable at $$x=0_2$$, note first that, if the Frechet derivative exists, it must be equal to the Gateaux derivative, and since this vanishes in our case, the condition that $$f$$ is Frechet differentiable at $$0_2$$ becomes $$|f(h)|/\|h\| \to 0$$ as $$h \to 0$$. Since $$|f(p(t))|/\|p(t)\| = 1$$ for all $$t \in (0,1/2)$$, it follows that the Frechet derivative does not exist at $$0_2$$.

After more thinking and searching, I have found an example from this Wikipedia page which I have verified answers my question.

Suppose $$X = \mathbb{R}^2$$, $$Y = \mathbb{R}$$, and $$a = (0,0)$$. Moreover, for $$(x_1,x_2) \in \mathbb{R}^2$$, let $$f(x_1,x_2) := \begin{cases} 0 & \text{if } (x_1,x_2) = (0,0) \\ \frac{x_1^3x_2}{x_1^6+x_2^2} & \text{otherwise.} \end{cases}$$ Then, one computes by definition that the Gâteaux derivative of $$f$$ at $$(0,0)$$ exists and is the zero linear transformation. Yet, $$f$$ is not continuous at $$(0,0)$$ since $$f(x,x^3) = 1/2$$ for all $$x \in \mathbb{R} \setminus \{0\}$$. If $$f$$ were Fréchet differentiable at $$(0,0)$$, it would have to be continuous at $$(0,0)$$. Altogether, then, we have found a function $$f$$ such that the (linear and continuous) Gâteaux derivative exists at $$(0,0)$$ but the Fréchet derivative does not exist at $$(0,0)$$.

• A minor correction: $f(x,x^3)={x^6 \over x^6+x^6} = {1\over 2}$ (instead of claimed 1) for non-zero $x$. Sep 13, 2023 at 10:32
• Fixed the error, thanks very much @minorChaos Sep 13, 2023 at 20:21