# Settle a classroom argument - do there exist any functions that satisfy this property involving Taylor polynomials?

I'm going to apologize in advance; I might at some points say Taylor series instead of Maclaurin series.

OK, so backstory: My calculus class recently went over Taylor series and Taylor polynomials. It seemed basic enough. Using the ratio test we were able to prove the radius of convergence of these series as well. For example, we derived that:

$$e^x = \sum_{n=0}^\infty\dfrac{x^n}{n!}$$

using the ratio test we can find that the series converges $\forall x$

However, today we had a substitute that talked about Taylor's theorem and Taylor's formula defined as the sum of an $n$th order Taylor polynomial plus the remainder.

$$f(x) = P_n(x) + R(x)$$ $$R(x) = \dfrac{f^{n+1}(c)(x-a)^{n+1}}{(n+1)!}$$

The substitute teacher then told us that in order to prove that the Taylor polynomial converges to the original function, you must show that $$\lim_{n\rightarrow\infty}R(x)=0$$

Well, after this statement the flood gates opened with a few students asking why you can't just use the ratio test to show the Taylor series converges $\forall x$ like we did for $e^x$.

The substitute said that the ratio test only proved convergence, while this proved it converged to the actual function. The students then said that if we already proved that the Taylor series is the function at an infinite amount of points, if the series converges, doesn't that mean that it converges to the function?

We had already done an example previously in class where: $$f(x)=\begin{cases} 0,&\text{ if }x=0;\\ e^{-\frac{1}{x^2}},&\text{ if }x\neq 0. \end{cases}$$

This function's Taylor polynomial converges to 0 at every point. However, it doesn't converge to the function at every point.

My classmates said this was a cop-out and "didn't count" because it was a piecewise function. So is there an example of a function whose Taylor polynomial converges on some interval, but does not converge to the function entirely on that interval?

Also a proof would be cool if you could explain why the students or the teacher were wrong.

• "Being piecewise" is not a property of a function, it's a way of defining a function. There's nothing illegitimate or "wrong" about defining a function piecewise, and nothing which makes it a "cop out". Mar 23, 2017 at 20:40
• Students wrong, sub right. Easy call.
– zhw.
Mar 23, 2017 at 20:40
• There is a tendency for people learning math to think of some functions as "legitimate" or "natural" and to call things like piece-wise functions illegitimate. The reality is that every function you can think of started as a human made concept which we made up symbols for. Mar 23, 2017 at 20:42
• By the way, when the usual teacher "derived" $e^x= \sum x^n/n!,$ how was it done? Just by saying the sum converges everywhere? That's not a proof.
– zhw.
Mar 23, 2017 at 20:48
• A Maclaurin series is a Taylor series, so I'm not sure why you're apologizing. The emphasis placed on the term "Maclaurin series" in early calculus doesn't make sense to me. According to Google Scholar, there are 14,000 documents in that corpus that reference "Maclaurin series" and 1,000,000 that reference "Taylor series". If you had no idea what "Maclaurin series" stood for, you'd be completely fine in the rest of your mathematical career. Mar 24, 2017 at 0:19

First, yes, in practical terms, it is very hard to define (indefinitely differentiable) functions that are non-analytic except by doing so piecewise. That's basically because all the usual "pieces" are themselves analytic in the interior of the region where they converge. This itself is an artifact of our history on this subject. In fact, some more-exotic (but standard for 100+ years) functions are not analytic... but their very definition depends on more complicated procedures, so would probably not be very satisfying, either.

A secondary but important point is that proving that the Taylor-Maclaurin series of a function at some point has infinite radius of convergence (or any other radius of convergence $>0$) does not in itself prove that the thing converges to the function whose Taylor-Maclaurin series it is. Rather, the error terms must go to zero. Of course, from our viewpoint, it takes considerable effort to arrange infinite radius of convergence but error terms not going to zero ... again because we must produce an exotic/un-natural function (from our artifactual viewpoint) one way or another, since "natural" (indefinitely differentiable) functions seem to be analytic.

Historically, indeed, many people (Euler, Lagrange) counted piecewise-defined functions as artificial, and not real functions. Sometimes, the very definition of "function" (in those days) was that the thing was representable by a power series. And, since most of the elementary functions we encounter do have such representations (which often requires proof... but sometimes ignorance is bliss), naively presuming that "all" functions have such expansions does not immediately lead to disaster... and, in fact is marvelously effective, because that is a correct assumption in many contexts.

This isn't quite your question, but maybe it'll clear up some confusion: Let $f(x) = \frac{1}{1-x}$ which has Maclauren series $1+x+x^2+x^3+\cdots.$ The ratio test shows where the series converges, (not whether the series converges) namely $-1<x<1$, but note that the series doesn't converge to the function if $x\geq 1$.

The sub is right in saying that you have to prove $R(x) \to 0.$ The ratio test is one way of finding out where that happens.

• "The ratio test shows where the series converges, (not whether the series converges)..." I don't understand the intended distinction. The ratio test can be used to determine whether and where the series converges. Just not what it converges to. "but note that the series doesn't converge to the function if $x\geq 1$." The series doesn't converge then at all, so it isn't relevant to the question being asked. "The ratio test is one way of finding out where that happens" How is the ratio test used in finding out where the remainder goes to $0$? Mar 24, 2017 at 3:29
• @JonasMeyer The confusion comes from sloppiness in language. "The series converges" is vague because for some $x$ it converges and for some it doesn't. This is "relevant" because this is the exact point where the confusion arises. Yes, the series doesn't converge at all for $x\geq 1$. That means it doesn't converge to the function at those points. Mar 24, 2017 at 4:59
• The question reveals awareness of using the ratio test to determine where the series converges, e.g. when it is pointed out that the ratio test shows convergence of the Taylor series for $e^x$ at all $x$. The question is about Taylor series that do converge for sets of $x$ values but might not converge to the intended target for those same $x$ values. That is why I don't understand the relevance of pointing out a Taylor series doesn't converge to the function where it doesn't converge at all. Mar 24, 2017 at 5:31
• @JonasMeyer The question was, "The students then said that if we already proved that the Taylor series is the function at an infinite amount of terms, if the series converges, doesn't that mean that it converges to the function?" I gave a simple example that points up the vagueness in this language, and shows that the answer is "no." Mar 24, 2017 at 12:12

Short answer: the teacher is right as his example shows.

There is a very cute result that says given any sequence of real numbers $a_n$ there exists a smooth function $f$ with these as its Taylor series.

$$| f(x) - \sum \limits_{j<n} a_j x^j| \leq C_n |x|^n$$ near 0.

So we could have $a_j = j^j$ and still get a Taylor series. The series would converge nowhere however.