# How does the Taylor Series converge at all points for certain functions

The way my professor defined Taylor polynomials is: the $$n^{th}$$ degree Taylor polynomial $$p(x)$$ of $$f(x)$$ is a polynomial that satisfies $$\lim_{x\to 0}{f(x)-p(x) \over x^n} = 0$$. This is actually the little-o notation $$o(x^n)$$, which means $$(f(x)-p(x)) \ll x^n$$ as $$x$$ approaches $$0$$. From this I have got the intuition that Taylor Polynomials work only for $$|x| < 1$$ because $$x^n$$ gets smaller as $$n$$ gets bigger only when $$|x| < 1$$. And the textbook seemed to agree with my intuition, because the textbook says “Taylor polynomial near the origin” (probably implying $$|x| < 1$$).

Since Taylor Series is basically Taylor polynomial with $$n\to\infty$$, I intuitively thought that the Taylor Series would also only converge to the function it represents in the interval $$(-1, 1)$$.

For example, in the case of $$1\over1-x$$, it is well known that the Taylor series only converges at $$|x| < 1$$.

However, all of a sudden, the textbook says that the Taylor series of $$\cos x$$ converges for all real $$x$$. It confused me because previously I thought the Taylor series would only work for $$|x|<1$$. Now, I know that the Taylor Series is defined like this: $$f(x) = Tf(x) \Leftrightarrow \lim_{n\to\infty}R_{n}f(x) = 0$$

And I know how to get the maximum of Taylor Remainder for $$\cos x$$ using Taylor's Theorem, and I know that the limit of that Taylor Remainder is $$0$$ for all real $$x$$, which makes the Taylor Series of $$cosx$$ converge to $$\cos x$$, pointwise. However, I just can't get why my initial intuition is wrong (why taylor series converges for all $$x$$ for certain functions, like $$\cos x$$, also $$\sin x$$ and $$e^x$$, etc.)

• For the specific example $e^x$, the terms in its series are $x^n/n!$. Note that $n!$ grows much faster than $x^n$ as $n$ grows. That's one reason to believe the Taylor series of $e^x$ converges. – trisct Apr 24 at 18:10
• In my mind, the key idea of calculus is the local linear approximation $f(x) \approx f(a) + f'(a)(x - a)$, which is a good approximation when $x$ is near $a$. It is natural to ask, what if we approximate $f$ locally by a quadratic or cubic function rather than by a linear function. This leads to the idea of Taylor polynomial approximation, which is indeed initially intended to be a local approximation to $f$. But when we look at the remainder term in Taylor's theorem, there's something kind of amazing, surprising that happens which is that often it's small even when $x$ is far from $a$. – littleO Apr 24 at 18:11
• @trisct Yes that is true indeed. The limit of Taylor remainder for $e^x$ is also zero for all x, which further explains why the Taylor Series converges. But I still I can't see why my initial intuition is wrong. – linearAlg Apr 24 at 18:12
• @littleO So it just happened to be that the Taylor remainder's limit is zero even for x far away? – linearAlg Apr 24 at 18:14
• @linearAlg In my mind, yes. It is just one of the miracles of math, which makes us wonder why things have worked out more nicely than we deserved. – littleO Apr 24 at 18:16

Actually, things may go wrong in $$(-1,1)$$. For instance, the Taylor series centered at $$0$$ of $$f(x)=\frac1{1-nx}$$ only converges to $$f(x)$$ on $$\left(-\frac1n,\frac1n\right)$$. And if$$f(x)=\begin{cases}e^{-1/x^2}&\text{ if }x\ne0\\0&\text{ if }x=0,\end{cases}$$then the Taylor series of $$f$$ only converges to $$f(x)$$ if $$x=0$$.
On the other hand, yes, Taylor series centered at $$0$$ are made to converge to $$f(x)$$ near $$0$$. But that's no reason to expect that they don't converge to $$f(x)$$ when $$x$$ is way from $$0$$. That would be like expecting that a non-constant power series $$a_0+a_1x+a_2x^2+\cdots$$ takes larger and larger values as the distance from $$x$$ to $$0$$. That happens often, but $$1-\frac1{2!}x^2+\frac1{4!}x^4-\cdots=\cos(x)$$, which is bounded.
In other words, you have gone from $$a\implies b$$ to $$\tilde a\implies \tilde b,$$ which you can see to be clearly false, identically. That is, it is not necessarily true for all $$a,\,b.$$
Since you already know why the series for entire functions like $$\cos x$$ converges everywhere (as you explain towards the end of your post), you should now see where your original intuition (I would say erroneous belief) misled you.