TITLE: Can a function be smooth at a single point?
QUESTION [13 upvotes]: I saw a thread (Find a function smooth at one isolated point) in which it is asked whether or not it is possible for a function to be smooth at a point, but not smooth on a deleted neighbourhood  of said point. The thread is closed with an accepted answer despite the answer seeming to be incorrect, so I would like to re-ask the question here.
I have read (here: Example of a function continuous at only one point.) that $$f=\begin{cases}x\,\mathrm{if}\,x\in\mathbb{Q}\\
0\,\mathrm{if}\,x\in\mathbb{R}\setminus\mathbb{Q}
\end{cases}$$
is only continuous at $x=0$. If it is continuous at $x=0$, then maybe
$$f=\begin{cases}\sum_{k=1}^{\infty}x^k\,\mathrm{if}\,x\in\mathbb{Q}\\
0\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\mathrm{if}\,x\in\mathbb{R}\setminus\mathbb{Q}
\end{cases}$$
is smooth at $x=0$ and nowhere else (does this work?).

REPLY [3 votes]: I think I have a simpler solution. It doesn't depend on nowhere differenitable functions and seems less computational to me.
For $f\in C^n=C^n(\mathbb R),$ define
$$\|f\|_n = \max_{|k|\le n} \sup_{\mathbb R}|D^k f|.$$
Suppose $a<b$ and $n$ is a positive integer. Define $g$ by setting 
$$g(x)=(x-a)^{n+1}(b-x)^{n+1}\,\,\text {for } x\in [a,b],\, g=0 \text { elsewhere}.$$
Then $g\in C^n,$ but $D^{n+1}g(a),$ $D^{n+1}g(b)$ both fail to exist. Furthermore the same is true for $cg,$ where $c$ is any small positive constant. Note $\|cg\|_n = c\|g\|_n.$ 
Now choose a sequence $b_1>a_1>b_2>a_2 > \cdots \to 0.$ In view of the above, we can choose $f_n$ such that i) $f_n$ is supported in $[a_n,b_n],$ ii) $f_n\in C^n,$ iii) $D^{n+1}f_n(a_n)$ fails to exist, and iv) $\|f_n\|_n < 1/2^n.$
Finally, define
$$f(x)= \sum_{n=1}^{\infty} f_n(x).$$
Because the supports of the $f_n$ are disjoint, the series converges for each $x.$ Observe that on $[-b_k,b_k],$ $f=\sum_{n=k}^{\infty}f_n.$ Furthermore,
$$D^j f(x) = \sum_{n=k}^{\infty}D^jf_n(x)\,\,\text {for }x\in [-b_k,b_k],\,j=0,1,\dots k.$$
This follows from the standard result on uniform convergence and differentiation. Note that the bound $\|f_n\|_n < 1/2^n$ is what gives the uniform convergence we need.
It follows that $D^j f(0)=0$ for each $j.$ Yet it is clear that because $f=f_n$ near $a_n$ and $D^{n+1}f_n(a_n)$ fails to exist, there is no neighborhood of $0$ where $f$ is $C^\infty.$