Taylor Polynomials

Monday, October 11, 2010 - 14:00 - Friday, October 15, 2010 - 15:00
fall2010math2300_10-1-taylor-series-notes.pdf61.35 KB

Math 2300 Section 005 – Calculus II – Fall 2010

Notes on Taylor Polynomials – October 11 & 15, 2010

Definition of a Taylor Polynomial

The Taylor polynomial of degree n approximating f(x) near x=0 is

P_{n}(x)=f(0)+f^{{\prime}}(0)x+\frac{f^{{\prime\prime}}(0)}{2!}x^{2}+\frac{f^{{(3)}}(0)}{3!}x^{3}+\cdots+\frac{f^{{(n)}}(0)}{n!}x^{n}=\sum _{{k=0}}^{n}\frac{f^{{(k)}}(0)}{k!}x^{k}

Similarly, the Taylor polynomial of degree n approximating f(x) near x=a is

\displaystyle P_{n}(x) \displaystyle=f(a)+f^{{\prime}}(a)(x-a)+\frac{f^{{\prime\prime}}(a)}{2!}(x-a)^{2}+\frac{f^{{(3)}}(a)}{3!}(x-a)^{3}+\cdots+\frac{f^{{(n)}}(a)}{n!}(x-a)^{n}
\displaystyle=\sum _{{k=0}}^{n}\frac{f^{{(k)}}(a)}{k!}(x-a)^{k}

This may not at first seem obvious, but if you have calculated the nth Taylor Polynomial, you can find the (n+1)th Taylor polynomial by adding one more term. That is


Some Things to Notice

  • The 1st Taylor polynomial centered at x=0 (respectively x=a) is just the usual linear approximation that you did in first semester calculus, since P_{1}(x)=f(0)+f^{{\prime}}(0)x (respectively P_{1}(x)=f(a)+f^{{\prime}}(a)(x-a)). I.e., this is the tangent line to the function f(x) at the point (0,f(0)) (respectively (a,f(a))).

  • As your Taylor polynomials become higher and higher in degree, they approximate the function “locally” (i.e., near x=0 or near x=a) better and better. This is because you are encoding information about the value of the function at x=0 or x=a, then the value of the derivative, then the value of the second derivative and so on.

  • One of the important things to realize is that a higher degree Taylor polynomial will represent the function better for values closer to the center of the Taylor polynomial. If you graph this situation for higher and higher degree polynomials, this makes more sense. I am placing a few graphs on the website that you can examine to see what I mean here.

  • The Taylor polynomial will be identical to the function at the point where the Taylor polynomial is centered. This is easy to see, since all of the x-a components (those other than the first term of the Taylor polynomial) are zero. Also, the nth Taylor polynomial of an nth degree polynomial will be identical to the polynomial itself. I'll do an example of this below.

  • You can only create Taylor polynomials when the value of the function at x=a and the value of the function's derivatives at x=a can be determined.


  1. Find the first through fifth Taylor polynomials of f(x)=x^{3}-2x+6 centered at x=0.

    Solution: Since

    f(0)=6,\quad f^{{\prime}}(0)=3x^{2}-2\big|_{{x=0}}=-2,\quad f^{{\prime\prime}}(0)=6x\big|_{{x=0}}=0,\quad f^{{(3)}}(0)=6,

    and all higher derivatives are zero, we find the following.


    You should notice that this first Taylor polynomial is just the tangent line approximation to f(x).


    Since the second derivative is zero, the first and second Taylor polynomials are identical.


    The main point here is that P_{3}(x)=f(x). Also, since the remaining derivatives are zero, we have

    P_{n}(x)=P_{3}(x)=f(x)\qquad\text{for all }n\ge 3.
  2. Find the 3rd Taylor polynomials of e^{x}, \cos x and \sin x around x=0. Now calculate the same polynomials around x=\pi.

    Solution: Your text does this quite well for the polynomials centered around x=0, so I'll put the x=\pi cases here. In many cases, you can simply write out the polynomial term by term (skipping entirely any terms with a derivative equal to zero) if all of the derivatives are easy to calculate, which they are in this situation.

    3rd Degree Taylor Polynomials Centered at x=\pi

    \displaystyle e^{x} \displaystyle\approx e^{\pi}+e^{\pi}(x-\pi)+\frac{e^{\pi}}{2!}(x-\pi)^{2}+\frac{e^{\pi}}{3!}(x-\pi)^{3}
    \displaystyle\cos(x) \displaystyle\approx-1+\frac{1}{2!}(x-\pi)^{2}
    \displaystyle\sin(x) \displaystyle\approx-(x-\pi)+\frac{1}{3!}(x-\pi)^{3}

    Notice that these have some considerable difference with the usual Taylor polynomials centered at x=0.

  3. Find the nth degree Taylor polynomial for f(x)=\ln(x+1) around x=0.

    Solution: This is an interesting Taylor polynomial, since the function \ln(x+1) is simply the function \ln(x) shifted to the left by one unit and \ln(x) isn't defined for x\le 0. So, we know that \ln(x+1) is not defined for x\le-1. The key idea here is that the Taylor polynomials are nice because they are polynomials (and polynomials are easy to work with), but they may not accurately reflect the functions they approximate as you move farther away from where the Taylor polynomials are centered (in this case, the center is zero). Thus, we expect out Taylor polynomials to have some value at, say x=-10, while \ln(x+1) isn't defined there. The derivatives we will need are as follows.

    \displaystyle f(0) \displaystyle=\ln(0+1)=\ln(1)=0
    \displaystyle f^{{\prime}}(0) \displaystyle=\frac{1}{x+1}\big|_{{x=0}}=\frac{1}{1}=1
    \displaystyle f^{{\prime\prime}}(0) \displaystyle=-\frac{1}{(x+1)^{2}}\big|_{{x=0}}=-\frac{1}{1}=-1
    \displaystyle f^{{(3)}}(0) \displaystyle=\frac{2}{(x+1)^{3}}\big|_{{x=0}}=\frac{2}{1}=2
    \displaystyle f^{{(4)}}(0) \displaystyle=-\frac{6}{(x+1)^{4}}\big|_{{x=0}}=-\frac{6}{1}=-6

    Now, I'll admit that this next step takes practice. What we want to do is to generalize any pattern that we see coming out of these derivatives. Notice that every other derivative is negative. If we then consider the absolute values, we have the sequence 1,1,2,6,\ldots which is the factorial sequence. (Do more derivatives if you need convincing of this.) So, we have the kth derivative given by


    Remember that the formula for forming a Taylor polynomial includes dividing by factorials for each term. Therefore, the nth Taylor polynomial for \ln(x+1) around x=0 is given by

    \displaystyle P_{n}(x) \displaystyle=0+\frac{1}{1!}x-\frac{1}{2!}x^{2}+\frac{2}{3!}x^{3}-\frac{6}{4!}x^{4}+\cdots+(-1)^{{n+1}}\frac{(n-1)!}{n!}x^{n}
    \displaystyle=\sum _{{k=1}}^{n}\frac{(-1)^{{k+1}}(k-1)!}{k!}x^{k}
    \displaystyle=\sum _{{k=1}}^{n}\frac{(-1)^{{k+1}}}{k}x^{k}

Taylor Polynomials You Should Know

Some of this will be repeated a bit in coming sections, but I will record it here for completeness. These are all centered at x=0. If you want the nth Taylor polynomial, you just consider any of the following expansions until you reach or surpass n in degree.

\displaystyle\sin x \displaystyle\approx x-\frac{x^{3}}{3!}+\frac{x^{5}}{5!}-\frac{x^{7}}{7!}+\cdots=\sum _{{k=0}}\frac{(-1)^{k}}{(2k+1)!}x^{{2k+1}}
\displaystyle\cos x \displaystyle\approx 1-\frac{x^{2}}{2!}+\frac{x^{4}}{4!}-\frac{x^{6}}{6!}+\cdots=\sum _{{k=0}}\frac{(-1)^{k}}{(2k)!}x^{{2k}}
\displaystyle e^{x} \displaystyle\approx 1+x+\frac{x^{2}}{2!}+\frac{x^{3}}{3!}+\cdots=\sum _{{k=0}}\frac{x^{k}}{k!}
\displaystyle(1+x)^{p} \displaystyle\approx 1+px+\frac{p(p-1)}{2!}x^{2}+\frac{p(p-1)(p-2)}{3!}x^{3}+\cdots=\sum _{{k=0}}\binom{p}{k}x^{k}
\displaystyle\ln(x+1) \displaystyle\approx x-\frac{x^{2}}{2}+\frac{x^{3}}{3}-\frac{x^{4}}{4}+\cdots=\sum _{{k=1}}\frac{(-1)^{{k+1}}}{k}x^{k}

We will add to this list in upcoming sections. Also, recall that


© 2011 Jason B. Hill. All Rights Reserved.