Skip to main content
Logo image

Active Calculus

Section 8.5 Finding and Using Taylor Series

So far, we have focused our attention on a collection of five basic functions functions — 11x, ln(1+x), sin(x), cos(x), and ex — and their Taylor series centered at a=0. One of the reasons we were able to find these Taylor series is the patterns that arise in the derivatives of each of these functions. While we can always use Definition 8.4.1 to find the first few terms of the Taylor series, for most functions it is challenging to find a pattern among the various derivatives that allows us to state the general nth term of the series.
In Preview Activity 8.5.1, we explore this issue and investigate a different approach to finding the Taylor series of a given function.

Preview Activity 8.5.1.

Let
g(x)=11+x2.

(a)

We know the coefficients of the Taylor series for g(x) centered at a=0 are given by g(k)(0)k!, so we start calculating some derivatives. Note that we can write g(x)=(1+x2)1. Calculate g(x), and g(x).
g(x)= and g(x)=

(b)

If you simplify g(x), take the derivative again, and simplify the result, you’d find that
g(x)=24x24x3(1+x2)4.
If we don’t rewrite g(x) from the form shown above, what derivative rules would be needed to calculate g(4)(x)? Select all that apply.
  • Exponential
  • Quotient
  • Power
  • Constant Multiple
  • Product
  • Sum or Difference
  • Chain
  • All of the above

(c)

Find g(0), g(0), g(0), and g(0).
Use the results to determine T3(x).

(d)

Since the derivatives of g become so complicated, we consider a different approach to finding the Taylor series centered at a=0 for g(x)=11+x2. We take advantage of the fact that f(x)=11x has a Taylor series expansion we already know, and observe that f has an algebraic structure similar to g.
We introduce a new variable, u, and recall that
f(u)=11u=1+u+u2+u3++un+
for |u|<1.
Let u=x2. What equation results from evaluating f(x2) in the equation given above for f(u)?
f(x2)=11(x2)=+
How does the answer here compare to the formula you found for T3(x) in (c)?

(e)

Note that 1(x2)=1+x2, so we just found an infinite series representation for g(x)=11+x2 without calculating derivatives of g(x), by using the series we had already calculated for f(u)=11u. For what values of x do you expect this series for g(x) will converge?
Hint: Think about what you know about the values of u for which the series for f(u) will converge.

Subsection 8.5.1 Using substitution and algebra to find new Taylor series expressions

The substitution technique we used in Preview Activity 8.5.1 can be used to find the Taylor series for any function whose structure is similar to that of a Taylor series we already know.

Example 8.5.1.

Find the Taylor series expansion for g(x)=x4cos(x3) and determine the x-values for which the series converges.
Solution.
Because cos(x3) is part of the function whose Taylor series we seek, we start with the familiar series for cos(x). We know that
(8.5.1)f(u)=cos(u)=112!u2+14!u4+(1)n1(2n)!u2n+
for all real numbers u.
By letting u=x3 in Equation (8.5.1), it follows that
cos(x3)=112!(x3)2+14!(x3)4+(1)n1(2n)!(x3)2n+,
so
(8.5.2)cos(x3)=112!x6+14!x12+(1)n1(2n)!x6n+.
Then, multiplying both sides of Equation (8.5.2) by x4, we find that
g(x)=x4cos(x3)=x412!x10+14!x16+(1)n1(2n)!x6n+4+.
Since Equation (8.5.1) is valid for every real number u, letting u=x3 tells us that Equation (8.5.2) is valid for every real number x. The Ratio Test can be used to show that multiplying every term of a Taylor series by the same power of x does not change the set of x-values for which the series converges, so the Taylor series for g(x) also converges for every value of x.
Because the approaches in Preview Activity 8.5.1 and Example 8.5.1 each require us to use a known Taylor series, we restate the Taylor series we’ve established so far for 5 important functions in Table 8.5.2.

Important Taylor series representations.

Table 8.5.2. Taylor series and the x-values where they converge for 5 important functions.
function f(x) Taylor series, Tf, centered at 0 f(x)=Tf(x)
11x= k=0xk=1+x+x2+x3+ if |x|<1
ln(1+x)= k=1(1)k11kxk=x12x2+13x3 if |x|<1
sin(x)= k=0(1)k1(2k+1)!x2k+1=x13!x3+15!x5 for all real x
cos(x)= k=0(1)k1(2k)!x2k=112!x2+14!x4 for all real x
ex= k=01k!xk=1+x+12!x2+13!x3+ for all real x
In Activity 8.5.2, we find several Taylor series using substitution and algebraic techniques.

Activity 8.5.2.

Use known Taylor series and substitution and algebraic techniques to find a Taylor series representation for each of the following functions. In addition, state the interval of x-values for which you expect each Taylor series to converge.
  1. g(x)=x3sin(x2)
  2. h(x)=ex4
  3. p(x)=11+5x
  4. q(x)=x2ln(1+x4)
  5. r(x)=e3x13x

Subsection 8.5.2 Differentiating and integrating Taylor series

In Chapter 5, we discussed the challenge posed by definite integrals such as
01sin(x2)dx.
Because we are unable to find a simple algebraic antiderivative for the function sin(x2), we cannot use the First Fundamental Theorem of Calculus to evaluate the integral exactly. We learned in Section 5.2 that the Second Fundamental Theorem of Calculus provides us with an antiderivative of a given function by using an integral function: one antiderivative of f(x)=sin(x2) is
F(x)=0xsin(u2)du.
Our recent work with Taylor series now suggests another way to find an antiderivative F(x) for f(x)=sin(x2), and this approach also provides new options for finding additional Taylor series. In Activity 8.5.2, as part of our work in finding a Taylor series for x3sin(x2) we found that
(8.5.3)sin(x2)=x213!x6+15!x1017!x14++(1)n11(2n1)!x4n2+
and that this representation of sin(x2) is valid for every value of x. This infinite series representation suggests that we could find an antiderivative F(x) of sin(x2) by using Equation (8.5.3) to actually evaluate the integral 0xsin(u2)du. Doing so, we see
F(x)=(0xsin(u2)du=(0x(u213!u6+15!u10++(1)n+11(2n1)!u4n2+)du=(13u3173!u7+1115!u11++(1)n+1(4n1)(2n1)!u4n1+|0x=((13x3173!x7+1115!x11++(1)n+1(4n1)(2n1)!x4n1+)0=(13x3173!x7+1115!x11++(1)n+1(4n1)(2n1)!x4n1+
Hence we have found that
F(x)=13x3173!x7+1115!x11++(1)n+1(4n1)(2n1)!x4n1+
is an antiderivative of f(x)=sin(x2).
While it is natural to wonder how integrating a Taylor series might change the values of x for which the series converges, it turns out that integrating a Taylor series has almost no effect
 1 
It is possible for the convergence status at the endpoints of the interval to change, but we are normally not concerned with those specific x-values.
on where the series converges (nor does differentiating such a series). This fact is stated formally in a result called The Power Series Differentiation and Integration Theorem. (A power series is any series of the form f(x)=k=0ck(xa)k; every Taylor series is a power series, and a famous result called Borel’s Theorem tells us that every power series is in fact the Taylor series of a related function.)

The Power Series Differentiation and Integration Theorem.

If f(x)=k=0ck(xa)k converges for |xa|<R for a positive real number R, then
f(x)=k=1kck(xa)k1
and
f(x)dx=C+k=0ckk+1(xa)k+1
and both of these series converge if |xa|<R.
Stated more informally, the Power Series Differentiation and Integration Theorem tells us that when it comes to differentiating or integrating a Taylor series, we can do so just as if they were finite polynomials: we can differentiate or integrate the Taylor series term-wise following the Power Rule for differentiating or integrating xn. Moreover, doing so doesn’t change the interval on which the Taylor series converges
 2 
Differentiating or integrating can change the convergence status at the endpoints of the interval, but we again will not concern ourselves with that issue in this course.
. Since polynomials are the easiest of all functions to differentiate and integrate, we can now find many more Taylor series of interesting functions.

Activity 8.5.3.

In this activity we will determine the Taylor series expansion for arctan(x), plus we’ll explore a different way to find the Taylor series for ln(1+x).
  1. We begin with the function g(x)=arctan(x).
    1. What is g(x)?
    2. Recall that in Preview Activity 8.5.1, we found the Taylor series expansion for
      f(x)=11+x2.
      State the Taylor series for f(x) that you found in the preview activity.
    3. Explain why we can think of g(x) as being given by
      g(x)=0xf(u)du.
      Use this relationship to find a power series expansion for g(x).
    4. For what interval of x-values is the Taylor series for g(x)=arctan(x) guaranteed to converge?
  2. In Section 8.4, we used Definition 8.4.1 to find the Taylor series expansion for h(x)=ln(1+x). Here we use substitution and integration to develop the Taylor series of h(x) in a different way.
    1. State the Taylor series expansion for p(u)=11u.
    2. Let u=x and use the series in (i) to find the Taylor series expansion for r(x)=11+x.
    3. Recall that
      ln(1+x)=0x11+tdt.
      Use this result to find the Taylor series for h(x)=ln(1+x).

Activity 8.5.4.

In this activity we will determine the Taylor series expansion for the famous error function,
erf(x)=2π0xet2dt.
  1. Use the Taylor series for ex to find the Taylor series for et2.
  2. Next, evaluate the integral 0xet2dt by replacing et2 with its Taylor series.
  3. Use your work in (b) to state the Taylor series for erf(x)=2π0xet2dt
  4. For what interval of x-values will the Taylor series for erf(x) converge? Why?
  5. In probability theory, erf(x) is important because of its connection to the normal distribution, which is represented by a bell curve. Indeed, erf(x) represents the fraction of a normally distributed characteristic in a population that lies between 0 and x. How can you use your result in (c) to estimate erf(0.5)?
Near the end of Section 8.4, we noted the important big-picture perspective that for familiar basic functions that are infinitely differentiable, such as f(x)=sin(x), not only can we find the function’s Taylor series and determine the x-values for which the Taylor series converges, but the Taylor series converges to the function itself. Furthermore, we noted that these representations play a key role in how computers provide decimal approxations to quantities such as sin(1), which can be represented as
sin(1)=113!+15!17!+.
Our most recent work with Taylor series shows that the news is better still: now we can easily represent even more complicated functions with Taylor series, such as f(x)=ex2 and g(x)=sin(x2), and determine their antiderivatives using their infinite Taylor series and treating that representation just like a polynomial. In the last portion of this section, we investigate further how certain infinite series of numbers can be easily and accurately approximated using partial sums that result from evaluating Taylor series.

Subsection 8.5.3 Alternating series of real numbers

Let’s now consider the definite integral
01ex2dx.
While we are unable to find an elementary algebraic antiderivative of ex2, if we use the Taylor series
ex2=1x2+12!x413!x6++(1)n1n!x2n+
and apply the Fundamental Theorem of Calculus to the series representation of ex2, we find that
01ex2dx=(01(1x2+12!x413!x6++(1)n1n!x2n+)dx=(x13x3+152!x5++(1)n(2n+1)n!x2n+1+|01=((113+152!++(1)n(2n+1)n!+)(0)(8.5.4)=(113+152!173!++(1)n(2n+1)n!+
The infinite series in Equation (8.5.4) is an example of an alternating series of real numbers. It turns out to be straightforward to determine whether or not an alternating series converges, and also to estimate the value of a convergent alternating series.

Definition 8.5.3.

An alternating series is a series of the form
k=0(1)kak,
where ak>0 for each k.
We will only consider alternating series for which the sequence of positive numbers ak decreases to 0. The following example illustrates two general results that hold for any alternating series whose terms ak decrease to 0. We use a geometric series so that we can know its exact sum and compare certain computations to that sum.

Example 8.5.4.

Investigate the partial sums of the alternating geometric series S=k=0(1)k(45)k. How do the partial sums compare to the exact sum of the series, and how can partial sums accurately estimate the value of the sum?
Solution.
First, recall that the nth partial sum is the sum of the first n terms, so
Sn=k=0n1(1)k(45)k=145+1625+(1)n1(45)n1.
We compute the first 10 partial sums of the series and display the results in Table 8.5.5 and plot the points (n,Sn) in Figure 8.5.6.
n Sn
1 1
2 25=0.2
3 2125=0.84
4 41125=0.328
5 461625=0.7376
6 12813125=0.40992
7 1050115625=0.672064
8 3612178125=0.4623488
9 246141390625=0.63012096
10 9685611953125=0.495903232
Table 8.5.5. Partial sums of the alternating series
Figure 8.5.6. Partial sums of the alternating series and the horizontal line y=59.
Because the given series S=k=0(1)k(45)k is geometric with a=1 and r=45, we know the series converges and its sum is
S=a1r=11+45=195=590.5555.
Knowing this value helps us better understand the behavior of the partial sums.
In both the table and the figure, we see how consecutive partial sums move back and forth above and below the exact sum of the infinite series, 59, and moreover how the amount the next partial sum lies above or below 59 is less than the amount by which the previous partial sum deviated. For instance,
|S559|0.1820,
but
|S659|0.1456.
Moreover, since S6=S5(45)5, and (45)5=0.32768 is the last and smallest term (in absolute value) in S6, 0.32768 is the total vertical distance from the point (5,S5) to (6,S6) in Figure 8.5.6. This implies that 0.32768 is more than the error in comparing S5 and S. Said differently, we are guaranteed that
|SS5|<(45)5
so the next term in the sum provides a bound on the error in a given partial sum. A similar argument can be made for any value of n.
The arguments Example (8.5.4) can be made for any alternating series whose terms go to zero. This leads us to state two important results.

The Alternating Series Test.

Given an alternating series
k=0(1)kak,
if the positive terms ak decrease to 0 as k, then the alternating series converges.
If we were to compute the partial sums Sn of any alternating series whose terms decrease to zero and plot the points (n,Sn) as we did in Figure 8.5.6, we would see a similar picture: the partial sums alternate above and below the value to which the infinite alternating series converges. In addition, because the terms go to zero, the amount a given partial sum deviates from the total sum is at most the next term in the series. This result is formally stated as the Alternating Series Estimation Theorem.

Alternating Series Estimation Theorem.

If the alternating series k=1(1)k+1ak has positive terms ak that decrease to zero as k, and Sn=k=1n(1)k+1ak is the nth partial sum of the alternating series, then
|k=1(1)k+1akSn|an+1.
Again, this result simply says: if we use a partial sum to estimate the exact sum of an alternating series, the absolute error of the approximation is less than the next term in the series.

Example 8.5.7.

Determine how well the 100th partial sum S100 of
k=1(1)k+1k
approximates the value of the converging alternating series.
Solution.
If we let S be the value of the series k=1(1)k+1k, then we know that
|S100S|<a101.
Now
a101=11010.0099,
so the 100th partial sum is within 0.0099 of the exact value of the series. In addition, it turns out that S1000.688172 and S=ln(2)0.69314, so we see that the difference between S100 and S is indeed less than the error bound of 0.0099 from the Alternating Series Estimation Theorem.

Activity 8.5.5.

In this activity we encounter several different alternating series and approximate the value of each using the Alternating Series Estimation Theorem.
  1. Use the fact that sin(x)=x13!x3+15!x5 to estimate sin(1) to within 0.0001. Do so without entering “sin(1)” on a computational device. After you find your estimate, enter “sin(1)” on a computational device and compare the results.
  2. Recall our recent work with 01ex2dx in Equation (8.5.4), which states
    01ex2dx=113+152!173!++(1)n(2n+1)n!+.
    Use this series representation to estimate 01ex2dx to within 0.0001. Then, compare what a computational device reports when you use it to estimate the definite integral.
  3. Find the Taylor series for cos(x2) and then use the Taylor series and to estimate the value of 01cos(x2)dx to within 0.0001. Compare your result to what a computational device reports when you use it to estimate the definite integral.
  4. Recall that we know if |x|<1,
    ln(1+x)=x12x2+13x3+(1)n11nxn+.
    What happens if x=1? Explain why the series 11212+1313+(1)n11n1n+ must converge and estimate its sum to within 0.01. What is the exact sum of this series?

Subsection 8.5.4 Summary

  • Through substitution, we can use any known Taylor series to find the Taylor series of a related function. For example, we know that if |u|<1,
    ln(1+u)=u12u2+13u314u4+
    Letting u=4x2, it follows that
    ln(1+4x2)=4x21216x4+1364x614256x8+
    and that this representation converges if |4x2|<1, so for x such that |x|<12.
  • The Power Series Differentation and Integration Theorem tells us that we can differentiate or integrate a Taylor series in the natural way and that doing so has essentially no impact on the set of x-values for which the series converges. For instance, we might note that if we first found the Taylor series for sin(x), which is
    sin(x)=x13!x3+15!x517!x7+
    and converges for every value of x, it follows by differentating that
    cos(x)=(ddx[sin(x)]=(ddx[x13!x3+15!x517!x7+]=(113!3x2+15!5x417!7x6+=(112!x2+14!x416!x6+
    which is precisely the Taylor series for cos(x) that we found by taking derivatives and applying Definition 8.4.1.
  • An alternating series is one whose terms alternate in sign, usually represented by k=1(1)k+1ak where ak>0 for all values of k. Any alternating series whose terms ak approach zero as k is guaranteed to converge. Moreover, the Alternating Series Estimation Theorem tells us that we can estimate the exact value of a converging alternating series by using a partial sum, and the error of that approximation is at most the next term in the series. That is,
    |k=1(1)k+1ak(a1a2+a3a4++(1)n+1an)|<an+1.

Exercises 8.5.5 Exercises

1.

If y=k=0(k+1)xk+3 then y=k=0

2.

(a) Part 1.
Note that when the constant in the denominator is not 1, we still can use the geometric series, but we have to multiply by a form of 1 that helps us. We’ll use 1313.
1(3+x)=1313(3+x)=131+13x=1311+13x
And now we can use the geometric series expression to get
1(3+x)=1311+13x=13n=0(13x)n=13n=0(13)nxn
Use differentiation and/or integration to express the following function as a power series (centered at x=0).
f(x)=1(3+x)2
f(x)=n=0
(b) Part 2.
Use your answer above (and more differentiation/integration) to now express the following function as a power series (centered at x=0).
g(x)=1(3+x)3
g(x)=n=0
(c) Part 3.
Use your answers above to now express the function as a power series (centered at x=0).
h(x)=x2(3+x)3
h(x)=n=0

3.

For the following indefinite integral, find the full power series centered at t=0 and then give the first 5 nonzero terms of the power series and the open interval of convergence.
f(t)=t1+t5 dt
f(t)=C+n=0
f(t)=C+ + + + + +
The open interval of convergence is: (Give your answer in help (intervals)
 3 
/pg_files/helpFiles/IntervalNotation.html
.)

4.

For the following indefinite integral, find the full power series centered at x=0 and then give the first 5 nonzero terms of the power series and the open interval of convergence.
f(x)=xln(1+x) dx
f(x)=C+n=1
f(x)=C+ + + + + +
The open interval of convergence is: (Give your answer in help (intervals)
 4 
/pg_files/helpFiles/IntervalNotation.html
.)

5.

For the following alternating series,
n=1an=0.5(0.5)33!+(0.5)55!(0.5)77!+...
how many terms do you have to compute in order for your approximation (your partial sum) to be within 0.0000001 from the convergent value of that series?

6.

For the following alternating series,
n=1an=1110+110011000+...
how many terms do you have to go for your approximation (your partial sum) to be within 1e-07 from the convergent value of that series?

7.

In this exercise we find the Taylor series representation for two famous functions, the Fresnel integral functions
C(x)=0xcos(t2)dt
and
S(x)=0xsin(t2)dt.
The Fresnel integral functions are important in optics and are used in the design of Fresnel lenses such as those found in lighthouses along the Lake Michigan shore.
  1. Use the Taylor series for cos(x) to find the Taylor series for cos(t2) and hence write C(x) as a Taylor series.
  2. For what interval of x-values will the Taylor series for C(x) converge? Why?
  3. Apply your result from (a) to estimate C(0.5) to within 0.001.
  4. Similarly, use the Taylor series for sin(x) to find the Taylor series for sin(t2) and hence write S(x) as a Taylor series.
  5. For what interval of x-values will the Taylor series for S(x) converge? Why?
  6. Apply your result from (d) to estimate S(0.8) to within 0.001.

8.

The fact that we can differentiate or integrate a Taylor series reveals other important ways we can think about functions such as ex.
  1. Perhaps the most important property of the function h(x)=ex is that h(x)=ex; that is, the function ex is its own derivative. Suppose that we didn’t yet know the coefficients of the Taylor series expansion for ex, so we just said
    (8.5.5)ex=a0+a1x+a2x2+a3x3++anxn+.
    Let x=0 in Equation (8.5.5); what does this tell us about the value of a0?
  2. Take the derivative of both sides of Equation (8.5.5) and call your resulting equation for ex “Equation 2”. Why do Equation (8.5.5) and Equation 2 together tell us that a1=a0? Combine this observation with your conclusion in (b) and note that you now know the numerical value of both a0 and a1.
  3. Why do Equation (8.5.5) and Equation 2 together tell us that a2=12a1?
  4. Continue reasoning similarly to find the value of a3, a4, and a5. What do you observe?

9.

In this exercise we consider the definite integral
0141+x2dx
from two different perspectives.
  1. First, find the Taylor series for 41+x2 and use it to evaluate
    0141+x2dx
    as an infinite series of real numbers.
  2. Observe that your result in (a) is an alternating series. Estimate the value of that alternating series to within 0.01. How many terms of the series are needed to do so?
  3. Recall that ddx[arctan(x)]=11+x2. Use this fact and the First Fundamental Theorem of Calculus to evaluate
    0141+x2dx
    exactly.
  4. How are your results in (a) and (c) connected? What famous number can we now estimate using an alternating series?

10.

Taylor series also provide an alternate way to evaluate indeterminate limits.
  1. Find the Taylor series for sin(2t) and use it to evaluate the indeterminate limit given by
    limt0sin(2t)t.
    Compare your result to what follows from L’Hôpital’s Rule (see Section 2.8 as needed).
  2. Consider the indeterminate limit given by
    limx0ex1xcos(2x)1.
    Find the Taylor series representations for f(x)=ex1x and g(x)=cos(2x)1 and use them to evaluate the given limit. How does your result compare to using L’Hôpital’s Rule?
You have attempted 1 of 8 activities on this page.