Tutorials › Calculus II › Taylor Polynomials for the Exponential Function

Taylor Polynomials · Tutorial 807 of 998

Taylor Polynomials for the Exponential Function

Learn to build and verify Taylor polynomials for the exponential function at zero or any chosen center.

Beginner 10 min read

What You'll Learn

  • State the degree-n Taylor polynomial at a center and identify each of its ingredients.
  • Use the repeated-derivative pattern of the exponential function to find all required coefficients.
  • Construct Maclaurin polynomials of specified degrees.
  • Shift the polynomial center and retain the factor contributed by the exponential at that center.
  • Verify a Taylor polynomial by checking its derivatives at the center.
  • Identify and correct a common factorial error.

Why the Exponential Function Is a Useful Example

The exponential function has a particularly simple pattern of derivatives: differentiating \(e^x\) any number of times leaves the function unchanged. This makes its Taylor polynomials a clear illustration of how the choice of center determines the powers and coefficients in a polynomial model.

At zero, the resulting polynomial is called a Maclaurin polynomial. At another center, the powers are measured from that center instead. The calculations are closely related, but the factor \(e^a\) at a center \(a\) must be included.

Key idea: For \(e^x\), every derivative is \(e^x\). Therefore, at a center \(a\), every derivative value used in a Taylor polynomial is \(e^a\).

The Taylor Polynomial at a Center

For a function \(f\) with derivatives through order \(n\) at \(a\), its degree-\(n\) Taylor polynomial centered at \(a\) is

$$ P_{n,a}(x)=\sum_{k=0}^{n}\frac{f^{(k)}(a)}{k!}(x-a)^k. $$

Here, \(n\) is a nonnegative integer, \(f^{(0)}=f\), and \(0!=1\). The notation \(f^{(k)}(a)\) means the value at \(a\) of the \(k\)th derivative. The powers are \(1,(x-a),(x-a)^2,\ldots,(x-a)^n\), so the center is visible in each term.

For the exponential function, \(f(x)=e^x\), and differentiating repeatedly gives

$$ f^{(k)}(x)=e^x \qquad\text{and hence}\qquad f^{(k)}(a)=e^a $$

for every nonnegative integer \(k\). It follows that the degree-\(n\) Taylor polynomial at \(a\) is

$$ P_{n,a}(x) = e^a\sum_{k=0}^{n}\frac{(x-a)^k}{k!} = e^a\left( 1+(x-a)+\frac{(x-a)^2}{2!} +\cdots+\frac{(x-a)^n}{n!} \right). $$

At zero, \(e^0=1\) and \(x-a=x\). Thus the degree-\(n\) Maclaurin polynomial is

$$ P_{n,0}(x)=\sum_{k=0}^{n}\frac{x^k}{k!} = 1+x+\frac{x^2}{2!}+\cdots+\frac{x^n}{n!}. $$

These formulas describe finite polynomials. A degree-\(n\) polynomial stops at the \(n\)th power; it is not an infinite series. Its defining feature is that it matches the function's value and derivatives through order \(n\) at the chosen center.

Why These Coefficients Work

The coefficients in a Taylor polynomial are chosen to make the polynomial agree with the function's derivative data at the center. The reason for the factorial in the denominator can be seen directly from differentiating powers of \(x-a\).

1
Start with a general polynomial.
Write a polynomial of degree at most \(n\) in centered powers as \(Q(x)=\sum_{k=0}^{n}c_k(x-a)^k\).
2
Differentiate \(j\) times and evaluate at \(a\).
For a term with \(k<j\), the \(j\)th derivative is zero. For \(k>j\), its \(j\)th derivative still contains a positive power of \(x-a\), so it is zero at \(a\). The term with \(k=j\) contributes \(j!c_j\). Therefore \(Q^{(j)}(a)=j!c_j\).
3
Choose the coefficients to match \(f\).
Requiring \(Q^{(j)}(a)=f^{(j)}(a)\) gives \(c_j=f^{(j)}(a)/j!\) for each \(j=0,\ldots,n\).

Consequently, there is exactly one polynomial of degree at most \(n\) whose derivatives through order \(n\) match those of \(f\) at \(a\): substituting the required coefficients produces the Taylor polynomial formula. For \(e^x\), each matching derivative value is \(e^a\), which gives the stated exponential formula.

Worked Examples

Worked Example: The Degree-Four Maclaurin Polynomial

Find the degree-four Taylor polynomial for \(e^x\) at zero, then verify that its derivatives through order four agree with \(e^x\) at zero.

Since each derivative of \(e^x\) is \(e^x\), the derivative values at zero are all \(e^0=1\). The Taylor formula gives

$$ P_{4,0}(x) = 1+\frac{1}{1!}x+\frac{1}{2!}x^2 +\frac{1}{3!}x^3+\frac{1}{4!}x^4 = 1+x+\frac{x^2}{2}+\frac{x^3}{6}+\frac{x^4}{24}. $$

Differentiate to check the matching:

$$ \begin{aligned} P_{4,0}(0)&=1,\\ P_{4,0}'(x)&=1+x+\frac{x^2}{2}+\frac{x^3}{6}, & P_{4,0}'(0)&=1,\\ P_{4,0}''(x)&=1+x+\frac{x^2}{2}, & P_{4,0}''(0)&=1,\\ P_{4,0}'''(x)&=1+x, & P_{4,0}'''(0)&=1,\\ P_{4,0}^{(4)}(x)&=1, & P_{4,0}^{(4)}(0)&=1. \end{aligned} $$

For \(e^x\), the function and each of these four derivatives have value \(1\) at zero. The polynomial therefore has the required derivative data through order four.

Worked Example: A Degree-Three Polynomial Centered at One

Find the degree-three Taylor polynomial for \(e^x\) centered at \(a=1\), and use it to evaluate the polynomial at \(x=\frac65\).

At the center, every derivative value is \(e^1=e\). The formula is

$$ P_{3,1}(x) = e\left(1+(x-1)+\frac{(x-1)^2}{2} +\frac{(x-1)^3}{6}\right). $$

To evaluate this polynomial at \(x=\frac65\), first calculate the centered difference:

$$ x-1=\frac65-1=\frac15. $$

Substitute that value and combine the terms using denominator \(750\):

$$ \begin{aligned} P_{3,1}\left(\frac65\right) &=e\left(1+\frac15+\frac{(1/5)^2}{2} +\frac{(1/5)^3}{6}\right)\\ &=e\left(1+\frac15+\frac1{50}+\frac1{750}\right)\\ &=e\left(\frac{750+150+15+1}{750}\right)\\ &=\frac{458e}{375}. \end{aligned} $$

To verify the construction, differentiate the polynomial:

$$ \begin{aligned} P_{3,1}(1)&=e,\\ P_{3,1}'(x)&=e\left(1+(x-1)+\frac{(x-1)^2}{2}\right), & P_{3,1}'(1)&=e,\\ P_{3,1}''(x)&=e\left(1+(x-1)\right), & P_{3,1}''(1)&=e,\\ P_{3,1}'''(x)&=e, & P_{3,1}'''(1)&=e. \end{aligned} $$

The function \(e^x\) and its first three derivatives all equal \(e\) at \(x=1\), as required.

Worked Example: A Degree-Four Polynomial Centered at Minus One

Find the degree-four Taylor polynomial for \(e^x\) centered at \(a=-1\), and evaluate it at \(x=-\frac12\).

At \(a=-1\), each derivative value is \(e^{-1}=\frac1e\). Also, \(x-a=x+1\). Therefore,

$$ P_{4,-1}(x) = \frac1e\left( 1+(x+1)+\frac{(x+1)^2}{2} +\frac{(x+1)^3}{6}+\frac{(x+1)^4}{24} \right). $$

At \(x=-\frac12\), the centered difference is

$$ x+1=-\frac12+1=\frac12. $$

Substitution gives

$$ \begin{aligned} P_{4,-1}\left(-\frac12\right) &=\frac1e\left(1+\frac12+\frac{(1/2)^2}{2} +\frac{(1/2)^3}{6}+\frac{(1/2)^4}{24}\right)\\ &=\frac1e\left(1+\frac12+\frac18+\frac1{48}+\frac1{384}\right)\\ &=\frac1e\left(\frac{384+192+48+8+1}{384}\right)\\ &=\frac{633}{384e} =\frac{211}{128e}. \end{aligned} $$

For the check, differentiating successively and evaluating at \(-1\) gives

$$ P_{4,-1}(-1) =P_{4,-1}'(-1) =P_{4,-1}''(-1) =P_{4,-1}'''(-1) =P_{4,-1}^{(4)}(-1) =\frac1e. $$

These are exactly the values of \(e^x\) and its first four derivatives at \(-1\). The polynomial has the required center and degree.

A Common Factorial Error

The denominator \(k!\) is essential. Omitting it changes the derivative values, even when the powers and the center are correct. For example, a mistaken degree-two polynomial at \(a=1\) might be written as

$$ Q(x)=e\left(1+(x-1)+(x-1)^2\right). $$

This expression has the wrong quadratic coefficient. Differentiating twice gives \(Q''(x)=2e\), so \(Q''(1)=2e\), whereas the second derivative of \(e^x\) at \(1\) is \(e\). The correction is to divide the quadratic term by \(2!=2\):

$$ P_{2,1}(x)=e\left(1+(x-1)+\frac{(x-1)^2}{2}\right), \qquad P_{2,1}''(1)=e. $$

A second check is to keep track of the center factor: at \(a=1\) the coefficients include \(e\), while at \(a=-1\) they include \(e^{-1}\). Only at zero is this factor \(1\).

Using the Formula Carefully

For a Taylor polynomial of \(e^x\), the calculation can be organized into three decisions: choose the center \(a\), choose the degree \(n\), and then substitute them into the formula. The center determines the powers \((x-a)^k\) and the common factor \(e^a\); the degree determines the final power included.

  • For a Maclaurin polynomial, set \(a=0\), so the powers are \(x^k\) and the common factor is \(1\).
  • For a nonzero center, retain both the shifted powers \((x-a)^k\) and the factor \(e^a\).
  • Include exactly the terms with indices \(k=0,1,\ldots,n\).
  • When checking the result, compare the polynomial's derivatives at \(a\) with \(e^a\).

The polynomial matches the exponential's value and derivatives through its specified degree at its center. This explains why the center is important: changing it changes the derivative values and the powers used in the polynomial. The formula alone does not provide an error bound at a point away from the center; determining how accurate a particular approximation is requires additional analysis.

Check Your Understanding

Use the Taylor formula and the derivative pattern of \(e^x\) to answer these questions.

  1. Write the degree-two Maclaurin polynomial for \(e^x\), and verify its second derivative at zero.
  2. What common factor appears in a Taylor polynomial for \(e^x\) centered at \(a=2\)?
  3. Write the degree-three Taylor polynomial for \(e^x\) centered at \(a=-2\).
  4. For a Taylor polynomial centered at \(a\), why does the coefficient of \((x-a)^k\) contain \(k!\) in its denominator?
  5. A proposed degree-two polynomial centered at \(a=0\) is \(1+x+x^2\). What derivative check reveals the error, and what is the correct polynomial?