Finding Taylor Polynomials

Learning Outcomes

  • Describe the procedure for finding a Taylor polynomial of a given order for a function

Overview of Taylor/Maclaurin Series

Consider a function [latex]f[/latex] that has a power series representation at [latex]x=a[/latex]. Then the series has the form

[latex]\displaystyle\sum _{n=0}^{\infty }{c}_{n}{\left(x-a\right)}^{n}={c}_{0}+{c}_{1}\left(x-a\right)+{c}_{2}{\left(x-a\right)}^{2}+\cdots [/latex].

 

What should the coefficients be? For now, we ignore issues of convergence, but instead focus on what the series should be, if one exists. We return to discuss convergence later in this section. If the series in the above equation is a representation for [latex]f[/latex] at [latex]x=a[/latex], we certainly want the series to equal [latex]f\left(a\right)[/latex] at [latex]x=a[/latex]. Evaluating the series at [latex]x=a[/latex], we see that

[latex]\begin{array}{cc}\hfill \displaystyle\sum _{n=0}^{\infty }{c}_{n}{\left(x-a\right)}^{n}& ={c}_{0}+{c}_{1}\left(a-a\right)+{c}_{2}{\left(a-a\right)}^{2}+\cdots \hfill \\ & ={c}_{0}.\hfill \end{array}[/latex]

 

Thus, the series equals [latex]f\left(a\right)[/latex] if the coefficient [latex]{c}_{0}=f\left(a\right)[/latex]. In addition, we would like the first derivative of the power series to equal [latex]{f}^{\prime }\left(a\right)[/latex] at [latex]x=a[/latex]. Differentiating our initial equation term-by-term, we see that

[latex]\frac{d}{dx}\left(\displaystyle\sum _{n=0}^{\infty }{c}_{n}{\left(x-a\right)}^{n}\right)={c}_{1}+2{c}_{2}\left(x-a\right)+3{c}_{3}{\left(x-a\right)}^{2}+\cdots [/latex].

 

Therefore, at [latex]x=a[/latex], the derivative is

[latex]\begin{array}{}\\ \\ \hfill \frac{d}{dx}\left(\displaystyle\sum _{n=0}^{\infty }{c}_{n}{\left(x-a\right)}^{n}\right)& ={c}_{1}+2{c}_{2}\left(a-a\right)+3{c}_{3}{\left(a-a\right)}^{2}+\cdots \hfill \\ & ={c}_{1}.\hfill \end{array}[/latex]

 

Therefore, the derivative of the series equals [latex]{f}^{\prime }\left(a\right)[/latex] if the coefficient [latex]{c}_{1}={f}^{\prime }\left(a\right)[/latex]. Continuing in this way, we look for coefficients cn such that all the derivatives of the power series will agree with all the corresponding derivatives of [latex]f[/latex] at [latex]x=a[/latex]. The second and third derivatives of our initial equation are given by

[latex]\frac{{d}^{2}}{d{x}^{2}}\left(\displaystyle\sum _{n=0}^{\infty }{c}_{n}{\left(x-a\right)}^{n}\right)=2{c}_{2}+3\cdot 2{c}_{3}\left(x-a\right)+4\cdot 3{c}_{4}{\left(x-a\right)}^{2}+\cdots [/latex]

 

and

[latex]\frac{{d}^{3}}{d{x}^{3}}\left(\displaystyle\sum _{n=0}^{\infty }{c}_{n}{\left(x-a\right)}^{n}\right)=3\cdot 2{c}_{3}+4\cdot 3\cdot 2{c}_{4}\left(x-a\right)+5\cdot 4\cdot 3{c}_{5}{\left(x-a\right)}^{2}+\cdots [/latex].

 

Therefore, at [latex]x=a[/latex], the second and third derivatives

[latex]\begin{array}{cc}\hfill \frac{{d}^{2}}{d{x}^{2}}\left(\displaystyle\sum _{n=0}^{\infty }{c}_{n}{\left(x-a\right)}^{n}\right)& =2{c}_{2}+3\cdot 2{c}_{3}\left(a-a\right)+4\cdot 3{c}_{4}{\left(a-a\right)}^{2}+\cdots \hfill \\ & =2{c}_{2}\hfill \end{array}[/latex]

 

and

[latex]\begin{array}{cc}\hfill \frac{{d}^{3}}{d{x}^{3}}\left(\displaystyle\sum _{n=0}^{\infty }{c}_{n}{\left(x-a\right)}^{n}\right)& =3\cdot 2{c}_{3}+4\cdot 3\cdot 2{c}_{4}\left(a-a\right)+5\cdot 4\cdot 3{c}_{5}{\left(a-a\right)}^{2}+\cdots \hfill \\ & =3\cdot 2{c}_{3}\hfill \end{array}[/latex]

 

equal [latex]f^{\prime\prime} \left(a\right)[/latex] and [latex]f^{\prime\prime\prime}\left(a\right)[/latex], respectively, if [latex]{c}_{2}=\frac{f^{\prime\prime}\left(a\right)}{2}[/latex] and [latex]{c}_{3}=\frac{f^{\prime\prime\prime}\left(a\right)}{3}\cdot 2[/latex]. More generally, we see that if [latex]f[/latex] has a power series representation at [latex]x=a[/latex], then the coefficients should be given by [latex]{c}_{n}=\frac{{f}^{\left(n\right)}\left(a\right)}{n\text{!}}[/latex]. That is, the series should be

[latex]\displaystyle\sum _{n=0}^{\infty }\frac{{f}^{\left(n\right)}\left(a\right)}{n\text{!}}{\left(x-a\right)}^{n}=f\left(a\right)+{f}^{\prime }\left(a\right)\left(x-a\right)+\frac{f^{\prime\prime}\left(a\right)}{2\text{!}}{\left(x-a\right)}^{2}+\frac{f^{\prime\prime\prime}\left(a\right)}{3\text{!}}{\left(x-a\right)}^{3}+\cdots [/latex].

 

This power series for [latex]f[/latex] is known as the Taylor series for [latex]f[/latex] at [latex]a[/latex]. If [latex]a=0[/latex], then this series is known as the Maclaurin series for [latex]f[/latex].

Definition


If [latex]f[/latex] has derivatives of all orders at [latex]x=a[/latex], then the Taylor series for the function [latex]f[/latex] at [latex]a[/latex] is

[latex]\displaystyle\sum _{n=0}^{\infty }\frac{{f}^{\left(n\right)}\left(a\right)}{n\text{!}}{\left(x-a\right)}^{n}=f\left(a\right)+{f}^{\prime }\left(a\right)\left(x-a\right)+\frac{f^{\prime\prime}\left(a\right)}{2\text{!}}{\left(x-a\right)}^{2}+\cdots +\frac{{f}^{\left(n\right)}\left(a\right)}{n\text{!}}{\left(x-a\right)}^{n}+\cdots [/latex].

 

The Taylor series for [latex]f[/latex] at 0 is known as the Maclaurin series for [latex]f[/latex].

Later in this section, we will show examples of finding Taylor series and discuss conditions under which the Taylor series for a function will converge to that function. Here, we state an important result. Recall from Uniqueness of Power Series that power series representations are unique. Therefore, if a function [latex]f[/latex] has a power series at [latex]a[/latex], then it must be the Taylor series for [latex]f[/latex] at [latex]a[/latex].

theorem: Uniqueness of Taylor Series


If a function [latex]f[/latex] has a power series at a that converges to [latex]f[/latex] on some open interval containing a, then that power series is the Taylor series for [latex]f[/latex] at a.

The proof follows directly from Uniqueness of Power Series.

To determine if a Taylor series converges, we need to look at its sequence of partial sums. These partial sums are finite polynomials, known as Taylor polynomials.

Interactive

Visit the MacTutor History of Mathematics archive to read a biography of Brook Taylor and a biography of Colin Maclaurin and how they developed the concepts named after them.

Taylor Polynomials

The nth partial sum of the Taylor series for a function [latex]f[/latex] at [latex]a[/latex] is known as the nth Taylor polynomial. For example, the 0th, 1st, 2nd, and 3rd partial sums of the Taylor series are given by

[latex]\begin{array}{c}{p}_{0}\left(x\right)=f\left(a\right),\hfill \\ {p}_{1}\left(x\right)=f\left(a\right)+{f}^{\prime }\left(a\right)\left(x-a\right),\hfill \\ {p}_{2}\left(x\right)=f\left(a\right)+{f}^{\prime }\left(a\right)\left(x-a\right)+\frac{f^{\prime\prime}\left(a\right)}{2\text{!}}{\left(x-a\right)}^{2},\hfill \\ {p}_{3}\left(x\right)=f\left(a\right)+{f}^{\prime }\left(a\right)\left(x-a\right)+\frac{f^{\prime\prime}\left(a\right)}{2\text{!}}{\left(x-a\right)}^{2}+\frac{f^{\prime\prime\prime}\left(a\right)}{3\text{!}}{\left(x-a\right)}^{3},\hfill \end{array}[/latex]

 

respectively. These partial sums are known as the 0th, 1st, 2nd, and 3rd Taylor polynomials of [latex]f[/latex] at [latex]a[/latex], respectively. If [latex]a=0[/latex], then these polynomials are known as Maclaurin polynomials for [latex]f[/latex]. We now provide a formal definition of Taylor and Maclaurin polynomials for a function [latex]f[/latex].

Definition


If [latex]f[/latex] has n derivatives at [latex]x=a[/latex], then the nth Taylor polynomial for [latex]f[/latex] at [latex]a[/latex] is

[latex]{p}_{n}\left(x\right)=f\left(a\right)+{f}^{\prime }\left(a\right)\left(x-a\right)+\frac{f^{\prime\prime}\left(a\right)}{2\text{!}}{\left(x-a\right)}^{2}+\frac{f^{\prime\prime\prime}\left(a\right)}{3\text{!}}{\left(x-a\right)}^{3}+\cdots +\frac{{f}^{\left(n\right)}\left(a\right)}{n\text{!}}{\left(x-a\right)}^{n}[/latex].

 

The [latex]n[/latex]th Taylor polynomial for [latex]f[/latex] at [latex]0[/latex] is known as the [latex]n[/latex]th Maclaurin polynomial for [latex]f[/latex].

We now show how to use this definition to find several Taylor polynomials for [latex]f\left(x\right)=\text{ln}x[/latex] at [latex]x=1[/latex].

Example: Finding Taylor Polynomials

Find the Taylor polynomials [latex]{p}_{0},{p}_{1},{p}_{2}[/latex] and [latex]{p}_{3}[/latex] for [latex]f\left(x\right)=\text{ln}x[/latex] at [latex]x=1[/latex]. Use a graphing utility to compare the graph of [latex]f[/latex] with the graphs of [latex]{p}_{0},{p}_{1},{p}_{2}[/latex] and [latex]{p}_{3}[/latex].

Watch the following video to see the worked solution to Example: Finding Taylor Polynomials.

For closed captioning, open the video on its original page by clicking the Youtube logo in the lower right-hand corner of the video display. In YouTube, the video will begin at the same starting point as this clip, but will continue playing until the very end.

You can view the transcript for this segmented clip of “6.3 Taylor and Maclaurin Series” here (opens in new window).

try it

Find the Taylor polynomials [latex]{p}_{0},{p}_{1},{p}_{2}[/latex] and [latex]{p}_{3}[/latex] for [latex]f\left(x\right)=\frac{1}{{x}^{2}}[/latex] at [latex]x=1[/latex].

Try It

We now show how to find Maclaurin polynomials for ex, [latex]\sin{x}[/latex], and [latex]\cos{x}[/latex]. As stated above, Maclaurin polynomials are Taylor polynomials centered at zero.

Example: Finding Maclaurin Polynomials

For each of the following functions, find formulas for the Maclaurin polynomials [latex]{p}_{0},{p}_{1},{p}_{2}[/latex] and [latex]{p}_{3}[/latex]. Find a formula for the nth Maclaurin polynomial and write it using sigma notation. Use a graphing utilty to compare the graphs of [latex]{p}_{0},{p}_{1},{p}_{2}[/latex] and [latex]{p}_{3}[/latex] with [latex]f[/latex].

  1. [latex]f\left(x\right)={e}^{x}[/latex]
  2. [latex]f\left(x\right)=\sin{x}[/latex]
  3. [latex]f\left(x\right)=\cos{x}[/latex]

Watch the following video to see the worked solution to Example: Finding Maclaurin Polynomials.

For closed captioning, open the video on its original page by clicking the Youtube logo in the lower right-hand corner of the video display. In YouTube, the video will begin at the same starting point as this clip, but will continue playing until the very end.

You can view the transcript for this segmented clip of “6.3 Taylor and Maclaurin Series” here (opens in new window).

try it

Find formulas for the Maclaurin polynomials [latex]{p}_{0},{p}_{1},{p}_{2}[/latex] and [latex]{p}_{3}[/latex] for [latex]f\left(x\right)=\frac{1}{1+x}[/latex]. Find a formula for the nth Maclaurin polynomial. Write your anwer using sigma notation.