Loading [MathJax]/jax/element/mml/optable/BasicLatin.js
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

11.11: Taylor Series

( \newcommand{\kernel}{\mathrm{null}\,}\)

We have seen that some functions can be represented as series, which may give valuable information about the function. So far, we have seen only those examples that result from manipulation of our one fundamental example, the geometric series. We would like to start with a given function and produce a series to represent it, if possible.

Suppose that f(x)=n=0anxn on some interval of convergence. Then we know that we can compute derivatives of f by taking derivatives of the terms of the series. Let's look at the first few in general: f(x)=n=1nanxn1=a1+2a2x+3a3x2+4a4x3+f(x)=n=2n(n1)anxn2=2a2+32a3x+43a4x2+f(x)=n=3n(n1)(n2)anxn3=32a3+432a4x+ By examining these it's not hard to discern the general pattern. The kth derivative must be f(k)(x)=n=kn(n1)(n2)(nk+1)anxnk=k(k1)(k2)(2)(1)ak+(k+1)(k)(2)ak+1x++(k+2)(k+1)(3)ak+2x2+ We can shrink this quite a bit by using factorial notation: f(k)(x)=n=kn!(nk)!anxnk=k!ak+(k+1)!ak+1x+(k+2)!2!ak+2x2+ Now substitute x=0: f(k)(0)=k!ak+n=k+1n!(nk)!an0nk=k!ak, and solve for ak: ak=f(k)(0)k!. Note the special case, obtained from the series for f itself, that gives f(0)=a0.

So if a function f can be represented by a series, we know just what series it is. Given a function f, the series n=0f(n)(0)n!xn is called the Maclaurin series for f.

Example 11.10.1: Maclaurin series

Find the Maclaurin series for f(x)=1/(1x).

Solution

We need to compute the derivatives of f (and hope to spot a pattern).

f(x)=(1x)1f(x)=(1x)2f(x)=2(1x)3f(x)=6(1x)4f(4)(x)=4!(1x)5f(n)(x)=n!(1x)n1

So

f(n)(0)n!=n!(10)n1n!=1

and the Maclaurin series is

n=01xn=n=0xn,

the geometric series.

A warning is in order here. Given a function f we may be able to compute the Maclaurin series, but that does not mean we have found a series representation for f. We still need to know where the series converges, and if, where it converges, it converges to f(x). While for most commonly encountered functions the Maclaurin series does indeed converge to f on some interval, this is not true of all functions, so care is required.

As a practical matter, if we are interested in using a series to approximate a function, we will need some finite number of terms of the series. Even for functions with messy derivatives we can compute these using computer software like Sage. If we want to know the whole series, that is, a typical term in the series, we need a function whose derivatives fall into a pattern that we can discern. A few of the most important functions are fortunately very easy.

Example 11.10.2: Maclaurin series

Find the Maclaurin series for sinx.

Solution

The derivatives are quite easy: f(x)=cosx, f(x)=sinx, f(x)=cosx, f(4)(x)=sinx, and then the pattern repeats. We want to know the derivatives at zero: 1, 0, 1, 0, 1, 0, 1, 0,…, and so the Maclaurin series is

xx33!+x55!=n=0(1)nx2n+1(2n+1)!.

We should always determine the radius of convergence:

lim

so the series converges for every x. Since it turns out that this series does indeed converge to \sin x everywhere, we have a series representation for \sin x for every x.

Sometimes the formula for the nth derivative of a function f is difficult to discover, but a combination of a known Maclaurin series and some algebraic manipulation leads easily to the Maclaurin series for f.

Example 11.10.3: Maclaurin series

Find the Maclaurin series for x\sin(-x).

Solution

To get from \sin x to x\sin(-x) we substitute -x for x and then multiply by x. We can do the same thing to the series for \sin x:

x\sum_{n=0}^\infty (-1)^n{(-x)^{2n+1}\over (2n+1)!} =x\sum_{n=0}^\infty (-1)^{n}(-1)^{2n+1}{x^{2n+1}\over (2n+1)!} =\sum_{n=0}^\infty (-1)^{n+1}{x^{2n+2}\over (2n+1)!}.

As we have seen, a general power series can be centered at a point other than zero, and the method that produces the Maclaurin series can also produce such series.

Taylor series

Find a series centered at -2 for 1/(1-x).

Solution

If the series is

\sum_{n=0}^\infty a_n(x+2)^n

then looking at the kth derivative:

k!(1-x)^{-k-1}=\sum_{n=k}^\infty {n!\over (n-k)!}a_n(x+2)^{n-k}

and substituting x=-2 we get

k!3^{-k-1}=k!a_k

and

a_k=3^{-k-1}=1/3^{k+1},

so the series is

\sum_{n=0}^\infty {(x+2)^n\over 3^{n+1}}.

We've already seen this, in Section 11.8. Such a series is called the Taylor series for the function, and the general term has the form

{f^{(n)}(a)\over n!}(x-a)^n.

A Maclaurin series is simply a Taylor series with a=0.

Contributors

David Guichard (Whitman College)

  • Integrated by Justin Marshall.


This page titled 11.11: Taylor Series is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by David Guichard via source content that was edited to the style and standards of the LibreTexts platform.

  • Was this article helpful?

Support Center

How can we help?