TITLE: Show that there is a continuous real function $h$ on $[0,1]$ such that $\lim \sup |\frac{h(x+t)-h(x)}{t}| = \infty$ for all $x \in [0,1)$
QUESTION [7 upvotes]: From Gamelin and Greene's Introduction to Topology, 2nd edition, chapter 1 section 6 (Continuity):

Show that there is a continuous real function $h$ on $[0,1]$ such that $\lim \sup _{t \to 0^+}|\frac{h(x+t)-h(x)}{t}| = \infty$ for all $x \in [0,1)$. 

The book has a Hint: Consider the space $C([0,2])$ of continuous real valued functions on the interval $[0,2]$, with the metric of uniform convergence. Let $E_m$ be the set of $f \in C([0,2])$ for which there is $x \in [0,1]$ satisfying $|f(x+t) - f(x)|/|t| \leq m$ for $t$ positive, $x+t \leq 2$. Show that $E_m$ is a closed nowhere-dense subset of $C([0,2])$.
I am sure that the very last part of the question is hinting at the use of Baire category theorem, so it thus suffices to show $E_m$ is closed and nowhere dense (as any continuous function with compact preimage has compact image, and the set of all bounded functions from a compact subset of the reals are complete). I believe that I got the closed part right by the following argument (correctme if I am wrong): given $\{ f_n \}$ a sequence of functions in $C([0,2])$ converging to some $f$ in the metric of uniform convergence, we know that $f_n(x) \to f(x)$ uniformly. Then, for any given $\epsilon >0$ we can bound the fraction appearing in $E_m$ by the following, by finding sufficiently large $n$: $\frac{|f(x+t) - f(x)|}{t} \leq \frac{|f(x+t) - f_n(x+t)| + |f_n(x+t) - f_n(x)| + |f_n(x) - f(x)|}{t}  \leq \frac{2\epsilon}{t} + m$, for any fixed $t$ and $x$ of our concern. By letting $\epsilon \to 0$ we get that $f \in E_m$.
I do not get: (1) if my work so far is correct, (2) where the $2$ comes into play in $C([0,2])$, and (3) how to show the nowhere dense part.

REPLY [3 votes]: The reason the authors go to $C[0,2]$ is to give you room to the right: For $x\in[0,1],$ we have $x+t\in [0,2]$ for all $t\in [0,1].$ Myself, to make it a litle simpler, I would define $E_m$ to be the subset of $f\in C[0,2]$ such that there exists an $x\in [0,1]$ such that
$$\left | \frac{f(x+t)-f(x)}{t}\right|\le m$$
for all $t\in (0,1].$
There are some problems with your proof that $E_m$ is closed. You fix $x$ and $t$ and then take limits. But there is no reason to think that all $f_n$ behave well at this one $x.$ Note also that you used only pointwise convergence, and not uniform convergence.
Here is a remedy: Suppose $f_n$ is a sequence in $E_m$ and $f_m\to f$ uniformly on $[0,2].$ Then for each $n$ there exists $x_n\in [0,1]$ such that
$$\tag 1\left | \frac{f_n(x_n+t)-f_n(x_n)}{t}\right|\le m,\,\,t\in (0,1].$$
Now we can assume $x_n$ converges to some $x_0,$ for this is true of some subsequence. Fix $t\in (0,1]$ and then use uniform convergence to see 
$$\left | \frac{f_n(x_n+t)-f_n(x_n)}{t}\right| \to \left | \frac{f(x_0+t)-f(x_0)}{t}\right|$$
This shows $f\in E_m$ as desired.
Fix $m.$ Here's a sketch to show $E_m$ is nowhere dense in $C[0,2]:$ Define $g(x) = |x|$ on $[-1,1]$ and then extend $g$ to $\mathbb R$ by making $g$ periodic. (The function $g$ is your standard "accordion function".) Note that $g(kx)$ fails the $E_m$ condition at every $x\in [0,1]$ if $k>m.$
Let $p$ be a polynomial. Then $p(x)+g(k^2x)/k, k=1,2,\dots$ converges uniformly to $p.$ But $p$ is smooth and $g(k^2x)/k$ fails the $E_{k-1}$ condition at all $x.$ Letting $k\to \infty$ shows $p$ is the uniform limit of functions not in $E_m.$ Since the polynomials are dense in $C[0,2],$ $E_m$ is nowhere dense.