This is not a solution, but rather some history about the problem I uncovered while looking through my personal "library" this morning and from some brief on-line searches just now. **[2]** appears to give a rigorous proof of a slightly more general result, and I can email anyone interested a .pdf copy of **[2]**. See my stackexchange profile for my email address. In particular, I encourage someone to use this paper to write up a careful proof of the result, preferably a proof for the specific case that s.harp asked about (which will decrease the notational clutter involved in dealing with additional generalizations given in **[2]**).

As I mentioned in a comment above, this is basically Problem 1 on p. 2 of Bishop/Crittenden's 1964 book **Geometry of Manifolds**.

Maury Barbato asked how to do the Bishop/Crittenden problem in a 29 October 2009 sci.math post. That sci.math thread has 16 other posts in it, including posts by several very respectable sci.math participants, and no one was able to come up with a rigorous proof. Maury Barbato made a follow-up post on 12 November 2009 where he said that the problem remains unsolved for him.

This morning I found the following two relevant items in my folders of papers on this topic.

**[1]** Editorial Note, *Infinitely differentiable functions which are nowhere analytic* [Solution to Advanced Problem #5061], **American Mathematical Monthly** 70 #10 (December 1963), 1109.

*Editorial Note.* I. N. Baker proves that the following function $F(x)$ is infinitely differentiable but not analytic anywhere on the real axis: $\sum_{n=1}^{\infty}2^{-n}f_n(x),$ where $f(x) = \exp(-1/x^2),$ $x \neq 0,$ $f(0)=0,$ and $f_n(x) = f(x - p_n),$ with $p_n$ the rational numbers in a sequence. Many examples are in the literature. The following references are cited by readers: $[[\cdots]]$

**[2]** Paweł Grzegorz Walczak, *A proof of some theorem on the $C^{\infty}$-functions of one variable which are not analytic*, **Demonstratio Mathematica** 4 #4 (1972), 209-213. MR 49 #504; Zbl 253.26011

**(from top of p. 212)** As a corollary of the theorem we prove that a well known function defined by formula (2) when $r$ is the set of all rational numbers and

$$\varphi(x)=\begin{cases} e^{-\frac{1}{x}} & \text{ when } x > 0 \\ 0 & \text{ when } x \leq 0 \end{cases}$$

is a $C^{\infty}$-function which is not analytic at any point of $R.$

Walczak's paper has only two references --- the 1950 Russian edition of Markushevich's book "Theory of Analytic Functions" and Bishop/Crittenden's 1964 book "Geometry of Manifolds". Markushevich's book is only cited for a standard fact about bounds on the magnitudes of the derivatives of a function that is analytic on a specified bounded open interval. Bishop/Crittenden's book is not cited anywhere as far as I can tell, which I suspect was an editing oversight in the final draft of the paper. My guess is that Walczak's paper arose from a student project to give a rigorous proof of the claim made in Problem 1 on p. 2 of Bishop/Crittenden's book, although the paper gives no explicit mention of its purpose (aside from stating what is to be proved). I have sent an email to Walczak asking him what led him to write the paper, and I will give an update if/when I get a reply from him.

I am fairly certain that Bishop/Crittenden underestimated the difficulty of their Problem 1. Indeed, when their book was reprinted (with corrections) by AMS Chelsea in 2001, Problem 1 was replaced with

$$f(x) \; = \; \sum_{n=1}^{\infty} 2^{-2^{n}}\exp\left(-\csc^2\left(2^{n}x\right)\right)$$

along with the comment "*This replacement of the problem given in the first edition was formulated by Eric Bedford of Indiana University.*"

**(NEXT DAY UPDATE)** I have heard back from Paweł Walczak and my guess about the origin and context of his paper was correct. For those who might be interested, below is a description of what is proved in the paper. In what follows I have tried to convey exactly what is done mathematically, but the wording is my own and it differs quite a bit from the original wording.

Walczak's paper proves the following result and then gives a specific illustration of this result. (Here I use ${\mathbb R},$ $Q,$ ${\delta},$ where Walczak uses $R,$ $r,$ ${\delta}_{0}$ but otherwise the notation is essentially the same.) Let $Q = \{r_1,r_2,r_3,\ldots \}$ be an injectively-indexed countably infinite subset of ${\mathbb R}$ (i.e. $i \neq j$ implies $r_i \neq r_{j})$ and let $\{a_n \}$ be a sequence of nonzero real numbers such that $\sum_{n=1}^{\infty}|a_n| < \infty.$ Let $\varphi : {\mathbb R} \rightarrow {\mathbb R}$ be bounded on $\mathbb R$ and $C^{\infty}$ on $\mathbb R$ and real-analytic on ${\mathbb R} - \{0\}.$ Assume there exist $\delta > 0$ and $A > 0$ and $L > 0$ such that, for each $x \in \mathbb R$ with $|x| > A$ and for each $k \in \{0,1,2,\ldots\},$ we have $|\varphi^{(k)}(x)| < L \cdot k! \cdot {\delta}^{-k}.$ Finally, define $f: {\mathbb R} \rightarrow {\mathbb R}$ by $f(x) = \sum_{n=1}^{\infty}a_{n}\varphi(x-r_{n}).$ Then $f$ is $C^{\infty}$ at each $x \in {\mathbb R},$ and $f$ is real-analytic at each $x \in {\mathbb R} - \overline{Q},$ and $f$ is NOT real-analytic at each $x \in \overline{Q},$ where $\overline{Q}$ is the topological closure of $Q$ in ${\mathbb R}.$

As a corollary Walczak shows that the assumptions above hold if we let $Q = \mathbb Q$ and $\varphi(x)=\begin{cases} e^{-\frac{1}{x}} & \text{ when } x > 0 \\ 0 & \text{ when } x \leq 0. \end{cases}$ Doing this gives us a function $f:{\mathbb R} \rightarrow {\mathbb R}$ that is $C^{\infty}$ and nowhere real-analytic. Indeed, as Walczak mentions at the bottom of p. 211, given any (infinite) closed set $E \subseteq \mathbb R$ (the case for finite closed sets is easy without Walczak's result) and letting $Q$ be a countable dense subset of $E,$ we can get a $C^{\infty}$ function $f: {\mathbb R} \rightarrow {\mathbb R}$ that is real-analytic at each $x \in {\mathbb R} - E$ and NOT real-analytic at each $x \in E.$

**(2 DAYS AFTER LAST UPDATE)** A couple of days ago, shortly after my last update, I sent an email to Eric Bedford in which I mentioned this stackexchange web page and asked if he had anything to add to what I have written. Bedford said that during Fall 1969 or Spring 1970 (in Fall 1970 he began graduate school at University of Michigan) he worked through a large portion of Bishop/Crittenden's 1964 book in a reading course with Bishop, and at this time he came up with a replacement function for Problem 1. He did not actually say whether the function he came up with then is the same function that appears in the 2001 edition of the book. However, I strongly suspect it was the same function, because the function in the 2001 book is essentially the same function I have written on a piece of paper (which took me over an hour to locate this morning, by the way) that he gave me in his office in Fall 1982, a day or two after I had asked him in a class meeting (a first semester graduate complex analysis course I was taking at that time from him) whether there exists a function that is $C^{\infty}$ and nowhere analytic. He had just given us the $\exp(-1/x^2)$ example in class, and it seemed natural to me to wonder whether a $C^{\infty}$ function can actually be nowhere analytic (in analogy with the fact that a continuous function can be nowhere differentiable). I seem to recall that he said, when I asked the question, something to the effect that he was pretty sure he had an example, but he didn't remember the exact formulation and needed to look through his stuff in his office for it.

For what it's worth, here is the exact formulation---the exact same symbols and grouping symbols and such---of what is on this piece of paper from Fall 1982:

$$f(x) \; = \; \sum_{n=0}^{\infty} 2^{-2^{n}}\exp\left[\frac{-1}{\left(\sin\left(2^{n}x\right)\right)^{2}}\right]$$