# If f is infinitely differentiable and analytic on a dense set is f analytic?

Let f: R->R. If f is infinitely differentiable and analytic on a dense set is f analytic? Is this true if we restric f to [0,1]?

note: by analytic I mean the radius of convergence of the taylor expansion is non-zero about every point.

Maybe this is simple but I was thinking about it and can't figure it out

Depending on what you want, the bump function

$$\mathbb{R}\rightarrow \mathbb{R}:x\rightarrow \left\{\begin{array}{cc} e^{-1/x^2} & \text{if}~x\geq 0\\ 0 & \text{if}~x=0\end{array}\right.$$

is a counterexample. It is analytic on $\mathbb{R}\setminus \{0\}$ but it is not analytic on entire $\mathbb{R}$.

Bacle2