In treatments like Spivak's Calculus, and in Pete Clark's notes here, the motivation is to describe a set of real functions of one real variable with "sufficiently nice properties" -- that is to say, a taxonomy of such functions. It seems to me that we can think of this taxonomy as analytic$\subset$infintely differentiable$\subset$n-times differentiable$\subset$continuous$\subset$general functions. I am trying (I think) to understand the jump from infinitely differentiable to analytic.
I am at the end of Spivak's Chapter 24 where the statement is made that "a convergent power series is always the Taylor series of the function which it defines". That is (WLOG considering Maclaurin rather than Taylor series), if in some interval $J=(-R,R)$ we have that the function $f(x) = \sum_0^\infty a_n x^n$ converges, then it is in fact equal to its Taylor series $$a_n = \frac{f^{(n)}(0)}{n!}.$$ But as noted in Prof. Clark's notes, we can ask the more general question:
Question 12.5. Let $f : I → R$ be an infinitely differentiable function and $T(x) = \sum_0^\infty \frac{f^{(n)}(0)}{n!} x^n$ be its Taylor series. We may then ask: a) For which values of $x$ does $T(x)$ converge? b) If for $x \in I$, $T(x)$ converges, do we have $T(x) = f(x)$?
I want to ask whether the following are the only possibilities other than $f$ being analytic (I think this means equal to it's Taylor series?) everywhere it's defined:
The interval of convergence $J$ of the Taylor series of $f$ is a subset of $I$ (the interval on which $f$ is defined), but $f$ is given by its Taylor series on $J$. I believe this is given e.g. by $f(x) = \textrm{ln}(1+x)$. I have not yet studied later chapters in Spivak but I suspect this case arises when the complex version of the function encounters a singularity at that radius.
The interval of convergence $J$ of the Taylor series of $f$ equals $I$ (the interval on which $f$ is defined), but $f$ is NOT given by its Taylor series on all of $J$. I believe this is given e.g. by $f(x) = e^{-1/x^2} \ \textrm{for} \ x \neq 0, f(0) = 0$.
Further, with respect to question 2, I'm wondering if it's possible to comment on "what goes wrong". Prof. Clark provides sufficient conditions for analyticity in his Theorem 12.6, but I can't quite understand why something that has the limit of its Taylor remainder converge (so that the limit of Taylor polynomials converges) would equal anything other than the function from which the Taylor polynomials were constructed? I suspect this has something to do with uniform convergence but I'm not sure.
Edit: With respect to the question in the last paragraph, I suppose a possibility is that the Taylor polynomials $P_{n,f}$ of $f$ converge to some function which is not $f$, so that the remainder $R_{n,f}$ converges too (unlike in possibility 1 above, where I think the reason the sequence of Taylor polynomial does not converge is because the remainder blows up), but it does not converge to 0?