# Nonanalytic functions with Taylor Series

According to Wikipedia:

Formally, a function $$f$$ is real analytic on an open set $$D$$ in the real line if for any $$x_0\in D$$ one can write

$$f(x)=\sum _{n=0}^{\infty }a_{n}\left(x-x_{0}\right)^{n}=a_{0}+a_{1}(x-x_{0})+a_{2}(x-x_{0})^{2}+a_{3}(x-x_{0})^{3}+\cdots$$

in which the coefficients $$a_{0},a_{1},\dots$$ are real numbers and the series is convergent to $$f(x)$$ for $$x$$ in a neighborhood of $$x_0$$.

This seems stronger than the requirement that $$f(x)$$ simply has a Taylor series about some point $$a$$, convergent everywhere in some neighborhood of $$a$$.

Does this mean that there is, e.g. a real function, $$q(x)$$, with a valid Taylor series expansion about $$a$$ but no valid convergent Taylor series of $$q(x)$$ about any other point arbitrarily close to $$a$$ (i.e. a real function with a Taylor series about $$a$$ that fails to be real analytic on any open set containing $$a$$) or does the fact that a function has a Taylor series about $$a$$ that converges over some neighborhood of $$a$$ to the function necessarily imply that it is real analytic on some neighborhood of $$a$$?

You can have a infinitely differentiable function $$f$$ whose Taylor series is convergent, but does not converge to $$f$$. Consider the function $$f$$ defined by $$f(x) = e^{-1/x^2}$$ for $$x \neq 0$$ and $$f(0) = 0$$. If you calculate its derivatives at $$0$$, you'll see that they're all $$0$$. So the Taylor series of $$f$$ at $$0$$ converges to the constant $$0$$ function.

You may wonder, after this, what Taylor's theorem actually says. It only says that the finite sums of the Taylor series are asymptotic to the function, not that they sum to it.

After clarification, it seems you are looking for a function $$f$$ such that:

i) $$f$$ has a Taylor series $$(a_n (z-x)^n)_{n \in \mathbb{N}}$$ at a point $$x$$.

ii) There exists some interval $$(v,w)$$ containing $$x$$ on which $$f = \sum_{n=1}^\infty a_n (z- x)^n$$ (this is implied by the statement with open neighbourhoods)

iii) But $$f$$ is not real analytic for points arbitrarily close to $$x$$.

In fact, (iii) cannot hold for any function for which (ii) holds, for the following reason. You can find in standard textbooks on complex analysis the fact that if a power series $$\sum_{n=1}^\infty a_i (z-x)$$ converges for some point $$y \in \mathbb{C}$$ such that $$y \neq x$$, then the power series converges to a complex analytic function on an open disc containing $$x$$ and $$y$$ (for example, Rudin's Real and Complex Analysis, Theorem 10.6 and its Corollary). A complex analytic function is real analytic on any subset of the reals on which it is defined (though it may still be complex-valued), so the power series defines a real analytic function on the interval $$(v,w)$$. As $$f$$ agrees with the power series there, and $$f$$ is real-valued, this shows that $$f$$ is a real-analytic function on the open interval $$(v,w)$$. Therefore the Taylor series of any $$y \in (v,w)$$ converges to $$f$$ in some open interval.

• Sorry I have been a bit sloppy with the question. I'll fix it. Apologies. Hope that clarifies - I am assuming the function has a convergent Taylor series expansion. Sep 24, 2019 at 4:19
• @Cardioid_Ass_22 The example I gave does have a convergent Taylor expansion. Sep 24, 2019 at 4:22
• I may be a bit unsure about the terminology here, but (as far as I know) generally a a function's series expansion is a series which converges to the function (over the relevant domain). Regardless, apologies for the possible lack of clarity. Sep 24, 2019 at 4:26
• @Cardioid_Ass_22 The Taylor series of some function $f$ at a point $x$ is a power series. It may converge to a function, or not (if not, the $f$ is not analytic). Even if it converges to a function $g$, it is only necessarily the case that $g(x) = f(x)$, and not necessarily $g(y) = f(y)$ for any other $y$, no matter how close to $x$. The function $f$ is analytic on a neighbourhood $U$ of $x$ if the Taylor series at $x$ converges and it converges to $f$ on $U$, not to some other function. Sep 24, 2019 at 4:29
• I am aware of this. I have clarified in the question and in my comments that requirement of my question is for a function, $q$ with a Taylor series about $a$ that converges to $q$ itself in some neighborhood of $a$ but has no valid Taylor series expansion about any other point arbitrarily near $a$, i.e. there is no open set $D$ that one can plug in to the Wikipedia definition of real analytic (in my question) that would satisfy the requirements for real analycity. Sep 24, 2019 at 4:32