Question regarding Gâteaux Derivative This is a question on an assignment for a grad engineering class that I cannot seem to figure out. The statement is as follows:
Consider $X$ the space of continuous functions on the interval [0,1]. Let $F:X\to\mathbb{R}$ be defined by $F(x)=\max\limits_{0\leq t\leq 1} f(x)$ for any $f\in X$.
We are supposed to show that the Gâteaux derivative of $F$ exists at $f\in C[0,1]$ if $f$ has a maximum at the unique point $x_0\in[0,1]$.
I used the definition of the Gâteaux derivative $\left[(\lim\limits_{t\to0}\frac{1}{t}(F(f+th)-F(f))\text{ for each increment $h\in X$}\right]$ to see that
$\lim\limits_{t\to0}\frac{1}{t}\left(F(f+th)-F(f)\right)
\\=\lim\limits_{t\to0}\frac{1}{t}\left(\max\limits_{x}(f+th)(x)-\max\limits_{x}f(x)\right)
\\=\lim\limits_{t\to0}\frac{1}{t}\left(\max\limits_{x}f(x)+\max\limits_{x}th(x)-\max\limits_{x}f(x)\right)
\\=\lim\limits_{t\to0}t\frac{\max\limits_{x}h(x)}{t}
\\=\max\limits_{x}h(x).$
I do not understand why $f$ having a maximum at $x_1\neq x_2\in[0,1]$ ruins the above argument. If anyone could shed some light on that, I would be most appreciative.
 A: To see what is going on, consider some examples, such as $F(x)=x(1-x)$ and $h(x)=\sin x$. What is $\lim_{t\to 0} t^{-1}(F(f+th)-F(f))$ in this case? I think it's $\sin (1/2)$. In general, the limit is $h(x_0)$, not $\max h$. 
The proof goes like this: given $\epsilon>0$, pick $\delta$ such that $|h(x)-h(x_0)|<\epsilon$  whenever $|x-x_0|<\delta$. Let $\gamma=f(x_0)-\max\{f(x):|x-x_0|\ge \delta\}$, which is a positive number. For sufficiently small $t$ 
$$\max\{f(x)+th(x):|x-x_0|\ge \delta\}<f(x_0)-\gamma/2$$
while for $|x-x_0|<\delta$ we have 
$$f(x_0)+th(x_0)-t\epsilon < f(x)+th(x) \le  f(x_0)+th(x_0)+t\epsilon$$
Hence, $$th(x_0)-t\epsilon\le F(f+th)-F(f)\le th(x_0)+t\epsilon$$ and the conclusion follows.

On the other hand, suppose $f$ attains its maximum at exactly two distinct points $x_1,x_2$. Take $h$ such that $h(x_1)<h(x_2)$. Then the above argument shows that the limit as $t\to 0^+$ is $h(x_2)$ while the limit as $t\to 0^-$ is $h(x_1)$. Hence, the derivative does not exist. The case of general set of maxima $M$ is similar: the one-sided limits are $\max_M h $ and $\min_M h$, which are not equal in general.
