Tutorials › Real Analysis › Higher-Order Taylor Polynomials

Differentiation · Tutorial 442 of 1000

Higher-Order Taylor Polynomials

Construct higher-order Taylor polynomials by matching derivatives at a point, and see how those polynomials behave for products.

Advanced 9 min read

What You'll Learn

  • Define the Taylor polynomial of a chosen order at a point
  • Derive its coefficients from derivative-matching conditions
  • Prove that the matching polynomial is unique
  • Compute Taylor polynomials for exponential, logarithmic, and rational functions
  • Find the Taylor polynomial of a product by truncating a polynomial product
  • Distinguish derivative matching from an error estimate

From Curvature to Higher-Order Information

The Second Derivative Test used the first two derivatives at a point to classify local behavior when the first derivative vanishes. Higher derivatives let us record more information: a polynomial can be chosen to match a function’s value, slope, curvature, and successive higher derivatives at one point. Such a polynomial is called a Taylor polynomial. It is determined by the function and the chosen point, together with the order through which derivatives are matched.

The construction is algebraic: we choose the coefficients so that the polynomial and the function have equal derivatives at the specified point. The results in this tutorial establish the polynomial’s formula and uniqueness, and show how to calculate it in examples. They do not yet estimate how close the polynomial is to the function away from the point; that question requires a separate result.

Definition and Coefficients

Let \(n\) be a nonnegative integer, let \(I\) be an open interval, and let \(a\in I\). Suppose \(f:I\to\mathbb{R}\) has derivatives through order \(n\) on \(I\). We use the convention \(f^{(0)}=f\), so order zero includes the function’s value. The goal is to find a polynomial of degree at most \(n\) whose \(k\)th derivative at \(a\) equals \(f^{(k)}(a)\), for each \(k\) from zero through \(n\).

Definition (Taylor Polynomial of Order \(n\) at \(a\)): The Taylor polynomial of \(f\) of order \(n\) at \(a\) is $$ T_{n,f,a}(x)=\sum_{k=0}^{n}\frac{f^{(k)}(a)}{k!}(x-a)^k. $$ Here \(0!=1\), and the sum has one term when \(n=0\). When the function and point are understood, we may write \(T_n(x)\).

The factorial in the denominator is forced by differentiation. The \(k\)th derivative of \((x-a)^k\), evaluated at \(a\), is \(k!\). Terms of higher degree have zero \(k\)th derivative at \(a\), while terms of lower degree have already become zero after \(k\) differentiations. Consequently, the coefficient of \((x-a)^k\) must be \(f^{(k)}(a)/k!\) if the \(k\)th derivative is to match. The following result makes this observation precise and proves that the formula gives the only possible polynomial with the required matches.

Theorem (Existence and Uniqueness of the Derivative-Matching Polynomial): Suppose \(f:I\to\mathbb{R}\) has derivatives through order \(n\) on an open interval \(I\), and \(a\in I\). There is exactly one polynomial \(P\) of degree at most \(n\) such that $$ P^{(k)}(a)=f^{(k)}(a)\qquad (0\leq k\leq n). $$ It is \(P=T_{n,f,a}\).

Proof. Write any polynomial \(P\) of degree at most \(n\) in powers of \(x-a\):

$$ P(x)=\sum_{j=0}^{n}c_j(x-a)^j. $$

For a fixed integer \(k\) between zero and \(n\), differentiating \(k\) times gives a zero contribution at \(x=a\) from every term with \(j<k\), since those terms become zero polynomials. Every term with \(j>k\) still contains a positive power of \(x-a\) after \(k\) differentiations, so it vanishes at \(a\). The term with \(j=k\) contributes \(k!c_k\). Thus

$$ P^{(k)}(a)=k!c_k. $$

If \(P\) matches the derivatives of \(f\), then \(k!c_k=f^{(k)}(a)\), so

$$ c_k=\frac{f^{(k)}(a)}{k!} $$

for every \(k=0,\ldots,n\). These equations determine every coefficient of \(P\), and they give exactly the displayed formula for \(T_{n,f,a}\). Conversely, choosing those coefficients gives \(P^{(k)}(a)=f^{(k)}(a)\) for each \(k\), by the same derivative calculation. This proves both existence and uniqueness. \(\square\)

The representation in powers of \(x-a\) is useful even when the polynomial could be expanded in powers of \(x\). It keeps the role of the chosen point visible: the constant coefficient is the function value at \(a\), the coefficient of \(x-a\) is its first derivative there, and the subsequent coefficients are the higher derivatives divided by their factorials.

Computing Taylor Polynomials

Worked Example: A Taylor Polynomial for an Exponential Function

Let \(f(x)=e^{2x}\), and find its Taylor polynomial of order four at \(a=0\). Repeated differentiation, using the Chain Rule, gives \(f^{(k)}(x)=2^ke^{2x}\) for \(k=0,1,2,3,4\). In particular, \(f^{(k)}(0)=2^k\). Substitution into the definition yields

$$ T_{4,f,0}(x) =1+2x+\frac{4}{2!}x^2+\frac{8}{3!}x^3+\frac{16}{4!}x^4 =1+2x+2x^2+\frac{4}{3}x^3+\frac{2}{3}x^4. $$

For example, the coefficient of \(x^3\) is \(f^{(3)}(0)/3!=8/6=4/3\), and the coefficient of \(x^4\) is \(f^{(4)}(0)/4!=16/24=2/3\). The polynomial matches the function’s derivatives through order four at zero; the theorem guarantees that no other polynomial of degree at most four has all those same derivative values there.

Worked Example: A Taylor Polynomial for a Reciprocal Function

Consider \(g(x)=1/(2+x)\) at \(a=0\). On the interval \((-2,\infty)\), its successive derivatives through order three are

$$ g(x)=\frac{1}{2+x},\qquad g'(x)=-\frac{1}{(2+x)^2},\qquad g''(x)=\frac{2}{(2+x)^3},\qquad g'''(x)=-\frac{6}{(2+x)^4}. $$

Evaluating at zero gives \(g(0)=1/2\), \(g'(0)=-1/4\), \(g''(0)=1/4\), and \(g'''(0)=-3/8\). Therefore,

$$ T_{3,g,0}(x) =\frac12-\frac14x+\frac{1/4}{2!}x^2+\frac{-3/8}{3!}x^3 =\frac12-\frac14x+\frac18x^2-\frac1{16}x^3. $$

The denominators matter: the coefficient of \(x^2\) is \(g''(0)/2!=1/8\), not \(1/4\), and the coefficient of \(x^3\) is \(g'''(0)/3!=-1/16\). This illustrates why the derivative values themselves are not the coefficients unless the corresponding factorial is one.

Worked Example: A Taylor Polynomial at a Nonzero Point

Let \(h(x)=\ln x\), defined for \(x>0\), and construct its Taylor polynomial of order four at \(a=1\). Its derivatives are

$$ h'(x)=\frac1x,\quad h''(x)=-\frac1{x^2},\quad h'''(x)=\frac2{x^3},\quad h^{(4)}(x)=-\frac6{x^4}. $$

Since \(h(1)=0\), the derivative values at one are \(1,-1,2,-6\) in orders one through four. The Taylor polynomial is therefore

$$ T_{4,h,1}(x) =(x-1)-\frac{(x-1)^2}{2} +\frac{2}{3!}(x-1)^3-\frac{6}{4!}(x-1)^4 =(x-1)-\frac{(x-1)^2}{2} +\frac{(x-1)^3}{3}-\frac{(x-1)^4}{4}. $$

This example shows why the center appears in every power. The polynomial is written in powers of \(x-1\), not \(x\), because its derivative conditions are imposed at \(x=1\). In particular, its value there is zero, matching \(\ln 1=0\).

Products and Truncated Polynomial Multiplication

Taylor polynomials also interact neatly with products. To find the Taylor polynomial of a product through order \(n\), multiply the two Taylor polynomials and discard terms whose degrees exceed \(n\). The reason is that the coefficient of degree \(k\) in a product depends only on derivative information through order \(k\). The proof uses the Generalized Product Rule established in “Higher Derivatives.”

Theorem (Taylor Polynomial of a Product): Suppose \(f\) and \(g\) have derivatives through order \(n\) on an open interval containing \(a\). The Taylor polynomial of \(fg\) of order \(n\) at \(a\) is obtained by multiplying \(T_{n,f,a}\) and \(T_{n,g,a}\) and retaining only terms of degree at most \(n\) in powers of \(x-a\).

Proof. Fix \(k\) with \(0\leq k\leq n\). By the Generalized Product Rule,

$$ (fg)^{(k)}(a) =\sum_{j=0}^{k}\binom{k}{j}f^{(j)}(a)g^{(k-j)}(a). $$

The coefficient of \((x-a)^k\) in the Taylor polynomial of \(fg\) is this derivative divided by \(k!\). Since \(\binom{k}{j}/k!=1/(j!(k-j)!)\), that coefficient is

$$ \frac{(fg)^{(k)}(a)}{k!} =\sum_{j=0}^{k}\frac{f^{(j)}(a)}{j!}\frac{g^{(k-j)}(a)}{(k-j)!}. $$

On the other hand, the coefficient of \((x-a)^k\) in the product \(T_{n,f,a}(x)T_{n,g,a}(x)\) is the sum of the products of coefficients whose degrees add to \(k\). Those pairs of degrees are \(j\) and \(k-j\), for \(j=0,\ldots,k\), so the coefficient is exactly the same sum. Terms of total degree greater than \(n\) cannot affect any coefficient of degree at most \(n\). Thus retaining only terms through degree \(n\) gives the Taylor polynomial of \(fg\). \(\square\)

Worked Example: Multiplying Taylor Polynomials

Let \(q(x)=(1+x)e^x\), and find its Taylor polynomial of order three at zero. The Taylor polynomial of \(1+x\) through order three is \(1+x\), and that of \(e^x\) is \(1+x+x^2/2+x^3/6\). Multiply and retain only terms through degree three:

$$ (1+x)\left(1+x+\frac{x^2}{2}+\frac{x^3}{6}\right) =1+2x+\frac32x^2+\frac23x^3+\frac16x^4, $$

so

$$ T_{3,q,0}(x)=1+2x+\frac32x^2+\frac23x^3. $$

The discarded \(x^4\) term cannot change the coefficients through degree three. The result can also be checked by differentiating \(q\): \(q(0)=1\), \(q'(x)=(2+x)e^x\), \(q''(x)=(3+x)e^x\), and \(q'''(x)=(4+x)e^x\). Hence \(q'(0)=2\), \(q''(0)=3\), and \(q'''(0)=4\), giving coefficients \(2\), \(3/2\), and \(4/3!=2/3\), as calculated.

What the Polynomial Does—and Does Not—Say

The Taylor polynomial is characterized by derivative matching at one point. Its uniqueness is a statement about polynomials of degree at most \(n\) satisfying those conditions. If a matched derivative is zero, the corresponding coefficient is zero; the resulting polynomial may therefore have degree less than \(n\). For instance, the order-four Taylor polynomial of a function can have no fourth-degree term if its fourth derivative at the center is zero.

It is important not to confuse matching derivatives with an error estimate. The definition tells us that \(T_{n,f,a}^{(k)}(a)=f^{(k)}(a)\) for \(0\leq k\leq n\). By itself, this equality at one point does not quantify the difference \(f(x)-T_{n,f,a}(x)\) for nearby \(x\), nor does it guarantee that the polynomial equals the function on an interval. For example, the Taylor polynomial of \(e^x\) at zero has finitely many terms, while \(e^x\) is not that polynomial. Taylor’s Theorem, the next topic, supplies hypotheses and a precise way to bound or represent the difference.

A useful practical discipline is to keep three choices visible: the function, the center \(a\), and the order \(n\). Changing the center changes the derivative values used and the powers in the formula; changing the order adds another derivative condition and possibly another term. Once these choices are fixed, the coefficient of \((x-a)^k\) is determined, with no additional freedom.

Check Your Understanding

Use the definition and results in this tutorial to answer the following questions.

  1. What is the coefficient of \((x-a)^k\) in the Taylor polynomial of order \(n\) at \(a\)?
  2. Why is there exactly one polynomial of degree at most \(n\) whose derivatives through order \(n\) match those of \(f\) at \(a\)?
  3. Find the Taylor polynomial of order two for \(f(x)=x^3\) at \(a=1\).
  4. When multiplying two Taylor polynomials to find the order-\(n\) polynomial of their product, why can terms of degree greater than \(n\) be discarded?
  5. What does the definition of a Taylor polynomial establish, and what kind of conclusion must wait for Taylor’s Theorem?