Tutorials › Real Analysis › When a Function Equals Its Taylor Series

Power Series · Tutorial 563 of 1000

When a Function Equals Its Taylor Series

The key question is whether the Taylor remainders tend to zero, not merely whether all derivatives exist.

Advanced 10 min read

What You'll Learn

  • Express equality with a Taylor series as convergence of the Taylor remainders to zero
  • Use derivative bounds to obtain a sufficient condition for that convergence
  • Prove that the exponential function equals its Taylor series at every real point
  • Verify the geometric Taylor expansion using an exact remainder
  • See why having derivatives of every order does not guarantee equality with the Taylor series

From Taylor Polynomials to Equality

The Taylor Series tutorial identified the coefficients that a power series must have if it represents a function near its center \(a\): the coefficient of \((x-a)^k\) is \(f^{(k)}(a)/k!\). The Taylor Series Versus Taylor Polynomial tutorial then defined the degree-\(n\) Taylor polynomial \(T_n\) and the remainder \(R_n(x)=f(x)-T_n(x)\). These finite polynomials are the partial sums of the Taylor series. The remaining question is whether they actually approach the function.

For each fixed \(x\), saying that \(f(x)\) equals its Taylor series centered at \(a\) means exactly that the sequence \(T_n(x)\) converges to \(f(x)\). Since \(R_n(x)=f(x)-T_n(x)\), this is equivalent to saying that \(R_n(x)\) tends to zero. Taylor’s theorem with Lagrange remainder gives a way to bound each remainder, but the bound must tend to zero as the degree increases. The fact that every finite-degree Taylor polynomial exists does not settle that limit.

Definition: Suppose \(f\) has derivatives of every order at \(a\). Its Taylor series centered at \(a\) is $$ \sum_{k=0}^{\infty}\frac{f^{(k)}(a)}{k!}(x-a)^k. $$ We say that \(f\) equals its Taylor series at a point \(x\) if this series converges to \(f(x)\). Equivalently, its Taylor remainders satisfy $$ \lim_{n\to\infty}R_n(x)=0. $$

The equivalence follows directly from \(R_n(x)=f(x)-T_n(x)\), where \(T_n(x)\) is the \(n\)th partial sum of the Taylor series. It is a pointwise statement: the limit is considered at a fixed \(x\). A stronger conclusion, such as convergence uniformly for all \(x\) in an interval, requires a bound that controls the remainders throughout that interval.

A Remainder Criterion

The remainder criterion turns Taylor’s theorem into a test for representation. Assume \(f\) has continuous derivatives of every order on an open interval containing the segment between \(a\) and \(x\). For each \(n\), Taylor’s theorem with Lagrange remainder gives a point \(\xi_n\) between \(a\) and \(x\) such that

$$ R_n(x)=\frac{f^{(n+1)}(\xi_n)}{(n+1)!}(x-a)^{n+1}. $$

The point \(\xi_n\) may change with \(n\). Thus, to conclude that the remainders tend to zero, it is enough to control the \((n+1)\)st derivative everywhere on the segment, with a bound that does not grow too quickly compared with \((n+1)!\).

Theorem (A Derivative-Bound Criterion for Taylor Representation): Suppose \(f\) has continuous derivatives of every order on an open interval containing the segment from \(a\) to \(x\). For each \(n\geq0\), suppose there is a finite number \(M_{n+1}\) such that $$ |f^{(n+1)}(t)|\leq M_{n+1} $$ for every \(t\) on that segment. If $$ \lim_{n\to\infty}\frac{M_{n+1}|x-a|^{n+1}}{(n+1)!}=0, $$ then \(f(x)\) equals its Taylor series centered at \(a\).

Proof. If \(x=a\), then \(R_n(a)=0\) for every \(n\), so the conclusion holds. Suppose \(x\neq a\). Taylor’s theorem with Lagrange remainder gives, for each \(n\), some \(\xi_n\) strictly between \(a\) and \(x\) such that $$ |R_n(x)|=\frac{|f^{(n+1)}(\xi_n)|}{(n+1)!}|x-a|^{n+1}. $$ The assumed derivative bound applies at \(\xi_n\), so $$ 0\leq |R_n(x)|\leq \frac{M_{n+1}|x-a|^{n+1}}{(n+1)!}. $$ The right-hand side tends to zero by hypothesis. The squeeze theorem therefore gives \(R_n(x)\to0\). By the remainder criterion, \(T_n(x)\to f(x)\), which says that the Taylor series converges to \(f(x)\). \(\square\)

A particularly useful case is a single bound \(M\) that works for all derivative orders on the segment. Then the remainder is bounded by \(M|x-a|^{n+1}/(n+1)!\), which tends to zero for every fixed \(x\). Indeed, if \(d=|x-a|\), the ratio of consecutive positive quantities \(d^{n+1}/(n+1)!\) is \(d/(n+2)\), which is at most \(1/2\) for all sufficiently large \(n\). The quantities therefore tend to zero. A bound on the derivatives that is allowed to depend on the order can also work, but its growth must be compared with the factorial in the denominator.

Worked Examples

Worked Example: The Exponential Equals Its Taylor Series Everywhere

Let \(E\) be the exponential function defined by its power series, and center the Taylor expansion at \(0\). The exponential-series results established earlier in the course give \(E^{(k)}(t)=E(t)\) for every \(k\geq0\), and \(E(t)>0\). For a fixed real \(x\), the segment from \(0\) to \(x\) is bounded. Since \(E\) is increasing, \(E(t)\leq E(x)\) on the segment when \(x\geq0\); when \(x<0\), \(E(t)\leq E(0)=1\) there. Consequently, on the segment we may use the finite bound $$ M=\max\{1,E(x)\}. $$ This bounds every derivative \(E^{(n+1)}\) on that segment.

Taylor’s theorem now gives $$ |R_n(x)|\leq \frac{M|x|^{n+1}}{(n+1)!}. $$ For \(x=0\), this remainder is zero. For \(x\neq0\), the ratio of consecutive terms in the sequence \(|x|^{n+1}/(n+1)!\) is \(|x|/(n+2)\). This ratio is at most \(1/2\) once \(n\) is large enough, so the sequence tends to zero. Thus \(R_n(x)\to0\) for every real \(x\). It follows that $$ E(x)=\sum_{k=0}^{\infty}\frac{x^k}{k!} $$ for every real \(x\). Here a bound on all the derivatives over the segment establishes equality, rather than merely showing that the Taylor polynomials are defined.

Worked Example: The Geometric Taylor Series Inside Its Interval

Let \(f(x)=1/(1+x)\), centered at \(0\). Its derivatives at the center are \(f^{(k)}(0)=(-1)^k k!\), so the degree-\(n\) Taylor polynomial is $$ T_n(x)=\sum_{k=0}^{n}(-1)^k x^k. $$ For \(x\neq-1\), direct multiplication verifies the finite-sum identity $$ (1+x)T_n(x)=1+(-1)^n x^{n+1}. $$ Indeed, multiplying the sum by \(1+x\) produces terms that cancel in pairs, leaving its constant term and its final term.

Subtracting \(T_n(x)\) from \(f(x)\) and using this identity gives the exact remainder $$ R_n(x)=\frac{1}{1+x}-T_n(x) =\frac{(-1)^{n+1}x^{n+1}}{1+x}. $$ For any fixed \(x\) with \(|x|<1\), the denominator is nonzero and $$ |R_n(x)|=\frac{|x|^{n+1}}{|1+x|}\longrightarrow0, $$ because \(|x|^{n+1}\to0\). Therefore, throughout \((-1,1)\), $$ \frac{1}{1+x}=\sum_{k=0}^{\infty}(-1)^k x^k. $$ The calculation also identifies why the argument does not prove equality at \(x=1\): there, the exact remainder has magnitude \(1/2\) for every \(n\), rather than tending to zero.

Worked Example: A Smooth Function Not Equal to Its Taylor Series

Define $$ f(x)= \begin{cases} e^{-1/x^2},&x\neq0,\\ 0,&x=0. \end{cases} $$ We show that \(f\) has derivatives of every order at \(0\), all equal to zero, even though \(f(x)>0\) whenever \(x\neq0\). This example shows why infinite differentiability alone does not ensure equality with the Taylor series.

For \(x\neq0\), repeated differentiation has the form $$ f^{(n)}(x)=P_n(1/x)e^{-1/x^2}, $$ where \(P_n\) is a polynomial. For \(n=0\), take \(P_0(t)=1\). If the formula holds for \(n\) and \(t=1/x\), differentiation gives $$ f^{(n+1)}(x)=\bigl(-t^2P_n'(t)+2t^3P_n(t)\bigr)e^{-t^2}. $$ The expression in parentheses is another polynomial in \(t\), proving the stated form by induction.

For every nonnegative integer \(m\), $$ |x|^{-m}e^{-1/x^2}\longrightarrow0\qquad\text{as }x\to0. $$ To see this, put \(y=1/x^2\). Then the expression is \(y^{m/2}e^{-y}\). Choose an integer \(k>m/2\). The exponential series gives \(e^y\geq y^k/k!\) for \(y>0\), so $$ 0\leq y^{m/2}e^{-y}\leq k!y^{m/2-k}\longrightarrow0 $$ as \(y\to\infty\). Since each \(P_n\) is a finite sum of powers, it follows that \(f^{(n)}(x)\to0\) as \(x\to0\) through nonzero values.

For completeness, this limit also verifies the derivatives at the center. Inductively, suppose the \(n\)th derivative is defined at \(0\) with value zero and has the displayed form away from \(0\). The limit just proved makes that derivative continuous at \(0\). Its difference quotient at \(0\) is \(P_n(1/h)e^{-1/h^2}/h\) for \(h\neq0\). This is a finite sum of powers of \(1/h\) multiplied by \(e^{-1/h^2}\), so the same limit argument shows that the quotient tends to zero. Thus the next derivative exists at \(0\) and equals zero. Starting with \(f(0)=0\), induction proves \(f^{(n)}(0)=0\) for every \(n\).

Every coefficient of the Taylor series at \(0\) is therefore zero, and that series has value \(0\) at every \(x\). But \(f(1)=e^{-1}>0\). Hence the Taylor series does not equal \(f\) at \(1\), despite \(f\) having derivatives of every order. In terms of the remainder criterion, \(R_n(1)=f(1)\) for every \(n\), so these remainders do not tend to zero.

What Equality Requires

The examples separate three statements that are easy to confuse. A function may have derivatives of every order at its center, so that its Taylor series is defined. The resulting series may converge at a point. And the series may converge to the function’s value at that point. The first statement does not imply the second, and convergence by itself does not identify the sum as \(f(x)\). To establish equality, one must show that the Taylor polynomials approach \(f(x)\), or equivalently that the remainders tend to zero.

Taylor’s theorem supplies a practical route: bound the relevant derivatives over the segment and show that the resulting remainder bound tends to zero. The exponential example works because the derivatives are uniformly bounded there by a fixed constant. The geometric example works by an exact remainder calculation. The smooth counterexample fails because its derivatives at the center contain no information that forces the remainders at other points to vanish.

Takeaway: A function equals its Taylor series at a point precisely when its Taylor remainders tend to zero there. Taylor’s theorem can prove this when derivative bounds make the remainders vanish, but having derivatives of every order alone is not enough.

Check Your Understanding

Use the remainder criterion and the examples above to answer the following questions.

  1. How is equality of a function with its Taylor series at \(x\) expressed in terms of \(R_n(x)\)?
  2. In the derivative-bound criterion, why must the bound control \(f^{(n+1)}\) on the entire segment between \(a\) and \(x\)?
  3. For the exponential example, why does \(|x|^{n+1}/(n+1)!\) tend to zero for a fixed \(x\)?
  4. What does the exact remainder for \(1/(1+x)\) show at \(x=1\), and why is this different from the case \(|x|<1\)?
  5. How can a function have every derivative at \(0\) equal to zero and still be nonzero away from \(0\)?