How nonanalytic can a function be while being infinitely differentiable everywhere?

68 Views Asked by At

Let us assign to the function $g:x\mapsto\exp(-1/x^2)$ the value $0$ at $x=0$, so that it is in $\mathrm C^\infty(\Bbb R)$; namely it is infinitely differentiable everywhere in $\Bbb R$. It is well known that $g$ is nonanalytic at $0$, although analytic everywhere else. Now let $(r_n:n\in \Bbb N)$ be an enumeration of a countable dense subset $D$ of $\Bbb R$ (e.g. $D=\Bbb Q)$. Then $f:\Bbb R\to\Bbb R$ defined by $$f(x)=\sum_{n\in \Bbb N}\frac1{2^n}g(x-r_n)$$is nonanalytic at any point in $D$. Edit: Moreover, as pointed out by @MartinR, it is nonanalytic everywhere, and it is not true, as claimed in the original question, that “... it is analytic everywhere in $\Bbb R\setminus D$ ”. Consequently the question below is answered affirmatively by the example already given above.

Can a function in $\mathrm C^\infty(\Bbb R)$ be nonanalytic on an uncountable set?