Calculus Volume 2

# 6.3Taylor and Maclaurin Series

Calculus Volume 26.3 Taylor and Maclaurin Series

### Learning Objectives

• 6.3.1. Describe the procedure for finding a Taylor polynomial of a given order for a function.
• 6.3.2. Explain the meaning and significance of Taylor’s theorem with remainder.
• 6.3.3. Estimate the remainder for a Taylor series approximation of a given function.

In the previous two sections we discussed how to find power series representations for certain types of functions––specifically, functions related to geometric series. Here we discuss power series representations for other types of functions. In particular, we address the following questions: Which functions can be represented by power series and how do we find such representations? If we can find a power series representation for a particular function $ff$ and the series converges on some interval, how do we prove that the series actually converges to $f?f?$

### Overview of Taylor/Maclaurin Series

Consider a function $ff$ that has a power series representation at $x=a.x=a.$ Then the series has the form

$∑n=0∞cn(x−a)n=c0+c1(x−a)+c2(x−a)2+⋯.∑n=0∞cn(x−a)n=c0+c1(x−a)+c2(x−a)2+⋯.$
6.4

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 Equation 6.4 is a representation for $ff$ at $x=a,x=a,$ we certainly want the series to equal $f(a)f(a)$ at $x=a.x=a.$ Evaluating the series at $x=a,x=a,$ we see that

$∑n=0∞cn(x−a)n=c0+c1(a−a)+c2(a−a)2+⋯=c0.∑n=0∞cn(x−a)n=c0+c1(a−a)+c2(a−a)2+⋯=c0.$

Thus, the series equals $f(a)f(a)$ if the coefficient $c0=f(a).c0=f(a).$ In addition, we would like the first derivative of the power series to equal $f′(a)f′(a)$ at $x=a.x=a.$ Differentiating Equation 6.4 term-by-term, we see that

$ddx(∑n=0∞cn(x−a)n)=c1+2c2(x−a)+3c3(x−a)2+⋯.ddx(∑n=0∞cn(x−a)n)=c1+2c2(x−a)+3c3(x−a)2+⋯.$

Therefore, at $x=a,x=a,$ the derivative is

$ddx(∑n=0∞cn(x−a)n)=c1+2c2(a−a)+3c3(a−a)2+⋯=c1.ddx(∑n=0∞cn(x−a)n)=c1+2c2(a−a)+3c3(a−a)2+⋯=c1.$

Therefore, the derivative of the series equals $f′(a)f′(a)$ if the coefficient $c1=f′(a).c1=f′(a).$ Continuing in this way, we look for coefficients cn such that all the derivatives of the power series Equation 6.4 will agree with all the corresponding derivatives of $ff$ at $x=a.x=a.$ The second and third derivatives of Equation 6.4 are given by

$d2dx2(∑n=0∞cn(x−a)n)=2c2+3·2c3(x−a)+4·3c4(x−a)2+⋯d2dx2(∑n=0∞cn(x−a)n)=2c2+3·2c3(x−a)+4·3c4(x−a)2+⋯$

and

$d3dx3(∑n=0∞cn(x−a)n)=3·2c3+4·3·2c4(x−a)+5·4·3c5(x−a)2+⋯.d3dx3(∑n=0∞cn(x−a)n)=3·2c3+4·3·2c4(x−a)+5·4·3c5(x−a)2+⋯.$

Therefore, at $x=a,x=a,$ the second and third derivatives

$d2dx2(∑n=0∞cn(x−a)n)=2c2+3·2c3(a−a)+4·3c4(a−a)2+⋯=2c2d2dx2(∑n=0∞cn(x−a)n)=2c2+3·2c3(a−a)+4·3c4(a−a)2+⋯=2c2$

and

$d3dx3(∑n=0∞cn(x−a)n)=3·2c3+4·3·2c4(a−a)+5·4·3c5(a−a)2+⋯=3·2c3d3dx3(∑n=0∞cn(x−a)n)=3·2c3+4·3·2c4(a−a)+5·4·3c5(a−a)2+⋯=3·2c3$

equal $f″(a)f″(a)$ and $f‴(a),f‴(a),$ respectively, if $c2=f″(a)2c2=f″(a)2$ and $c3=f‴(a)3·2.c3=f‴(a)3·2.$ More generally, we see that if $ff$ has a power series representation at $x=a,x=a,$ then the coefficients should be given by $cn=f(n)(a)n!.cn=f(n)(a)n!.$ That is, the series should be

$∑n=0∞f(n)(a)n!(x−a)n=f(a)+f′(a)(x−a)+f″(a)2!(x−a)2+f‴(a)3!(x−a)3+⋯.∑n=0∞f(n)(a)n!(x−a)n=f(a)+f′(a)(x−a)+f″(a)2!(x−a)2+f‴(a)3!(x−a)3+⋯.$

This power series for $ff$ is known as the Taylor series for $ff$ at $a.a.$ If $a=0,a=0,$ then this series is known as the Maclaurin series for $f.f.$

### Definition

If $ff$ has derivatives of all orders at $x=a,x=a,$ then the Taylor series for the function $ff$ at $aa$ is

$∑n=0∞f(n)(a)n!(x−a)n=f(a)+f′(a)(x−a)+f″(a)2!(x−a)2+⋯+f(n)(a)n!(x−a)n+⋯.∑n=0∞f(n)(a)n!(x−a)n=f(a)+f′(a)(x−a)+f″(a)2!(x−a)2+⋯+f(n)(a)n!(x−a)n+⋯.$
6.5

The Taylor series for $ff$ at 0 is known as the Maclaurin series for $f.f.$

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 $ff$ has a power series at $a,a,$ then it must be the Taylor series for $ff$ at $a.a.$

Theorem 6.6

#### Uniqueness of Taylor Series

If a function $ff$ has a power series at a that converges to $ff$ on some open interval containing a, then that power series is the Taylor series for $ff$ 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.

### Media

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

### Taylor Polynomials

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

$p0(x)=f(a),p1(x)=f(a)+f′(a)(x−a),p2(x)=f(a)+f′(a)(x−a)+f″(a)2!(x−a)2,p3(x)=f(a)+f′(a)(x−a)+f″(a)2!(x−a)2+f‴(a)3!(x−a)3,p0(x)=f(a),p1(x)=f(a)+f′(a)(x−a),p2(x)=f(a)+f′(a)(x−a)+f″(a)2!(x−a)2,p3(x)=f(a)+f′(a)(x−a)+f″(a)2!(x−a)2+f‴(a)3!(x−a)3,$

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

### Definition

If $ff$ has n derivatives at $x=a,x=a,$ then the nth Taylor polynomial for $ff$ at $aa$ is

$pn(x)=f(a)+f′(a)(x−a)+f″(a)2!(x−a)2+f‴(a)3!(x−a)3+⋯+f(n)(a)n!(x−a)n.pn(x)=f(a)+f′(a)(x−a)+f″(a)2!(x−a)2+f‴(a)3!(x−a)3+⋯+f(n)(a)n!(x−a)n.$

The nth Taylor polynomial for $ff$ at 0 is known as the nth Maclaurin polynomial for $f.f.$

We now show how to use this definition to find several Taylor polynomials for $f(x)=lnxf(x)=lnx$ at $x=1.x=1.$

### Example 6.11

#### Finding Taylor Polynomials

Find the Taylor polynomials $p0,p1,p2p0,p1,p2$ and $p3p3$ for $f(x)=lnxf(x)=lnx$ at $x=1.x=1.$ Use a graphing utility to compare the graph of $ff$ with the graphs of $p0,p1,p2p0,p1,p2$ and $p3.p3.$

#### Solution

To find these Taylor polynomials, we need to evaluate $ff$ and its first three derivatives at $x=1.x=1.$

$f(x)=lnxf(1)=0f′(x)=1xf′(1)=1f″(x)=−1x2f″(1)=−1f‴(x)=2x3f‴(1)=2f(x)=lnxf(1)=0f′(x)=1xf′(1)=1f″(x)=−1x2f″(1)=−1f‴(x)=2x3f‴(1)=2$

Therefore,

$p0(x)=f(1)=0,p1(x)=f(1)+f′(1)(x−1)=x−1,p2(x)=f(1)+f′(1)(x−1)+f″(1)2(x−1)2=(x−1)−12(x−1)2,p3(x)=f(1)+f′(1)(x−1)+f″(1)2(x−1)2+f‴(1)3!(x−1)3=(x−1)−12(x−1)2+13(x−1)3.p0(x)=f(1)=0,p1(x)=f(1)+f′(1)(x−1)=x−1,p2(x)=f(1)+f′(1)(x−1)+f″(1)2(x−1)2=(x−1)−12(x−1)2,p3(x)=f(1)+f′(1)(x−1)+f″(1)2(x−1)2+f‴(1)3!(x−1)3=(x−1)−12(x−1)2+13(x−1)3.$

The graphs of $y=f(x)y=f(x)$ and the first three Taylor polynomials are shown in Figure 6.5.

Figure 6.5 The function $y=lnxy=lnx$ and the Taylor polynomials $p0,p1,p2p0,p1,p2$ and $p3p3$ at $x=1x=1$ are plotted on this graph.
Checkpoint 6.10

Find the Taylor polynomials $p0,p1,p2p0,p1,p2$ and $p3p3$ for $f(x)=1x2f(x)=1x2$ at $x=1.x=1.$

We now show how to find Maclaurin polynomials for ex, $sinx,sinx,$ and $cosx.cosx.$ As stated above, Maclaurin polynomials are Taylor polynomials centered at zero.

### Example 6.12

#### Finding Maclaurin Polynomials

For each of the following functions, find formulas for the Maclaurin polynomials $p0,p1,p2p0,p1,p2$ and $p3.p3.$ Find a formula for the nth Maclaurin polynomial and write it using sigma notation. Use a graphing utilty to compare the graphs of $p0,p1,p2p0,p1,p2$ and $p3p3$ with $f.f.$

1. $f(x)=exf(x)=ex$
2. $f(x)=sinxf(x)=sinx$
3. $f(x)=cosxf(x)=cosx$

#### Solution

1. Since $f(x)=ex,f(x)=ex,$ we know that $f(x)=f′(x)=f″(x)=⋯=f(n)(x)=exf(x)=f′(x)=f″(x)=⋯=f(n)(x)=ex$ for all positive integers n. Therefore,
$f(0)=f′(0)=f″(0)=⋯=f(n)(0)=1f(0)=f′(0)=f″(0)=⋯=f(n)(0)=1$

for all positive integers n. Therefore, we have
$p0(x)=f(0)=1,p1(x)=f(0)+f′(0)x=1+x,p2(x)=f(0)+f′(0)x+f″(0)2!x2=1+x+12x2,p3(x)=f(0)+f′(0)x+f″(0)2x2+f‴(0)3!x3=1+x+12x2+13!x3,pn(x)=f(0)+f′(0)x+f″(0)2x2+f‴(0)3!x3+⋯+f(n)(0)n!xn=1+x+x22!+x33!+⋯+xnn!=∑k=0nxkk!.p0(x)=f(0)=1,p1(x)=f(0)+f′(0)x=1+x,p2(x)=f(0)+f′(0)x+f″(0)2!x2=1+x+12x2,p3(x)=f(0)+f′(0)x+f″(0)2x2+f‴(0)3!x3=1+x+12x2+13!x3,pn(x)=f(0)+f′(0)x+f″(0)2x2+f‴(0)3!x3+⋯+f(n)(0)n!xn=1+x+x22!+x33!+⋯+xnn!=∑k=0nxkk!.$

The function and the first three Maclaurin polynomials are shown in Figure 6.6.
Figure 6.6 The graph shows the function $y=exy=ex$ and the Maclaurin polynomials $p0,p1,p2p0,p1,p2$ and $p3.p3.$
2. For $f(x)=sinx,f(x)=sinx,$ the values of the function and its first four derivatives at $x=0x=0$ are given as follows:
$f(x)=sinxf(0)=0f′(x)=cosxf′(0)=1f″(x)=−sinxf″(0)=0f‴(x)=−cosxf‴(0)=−1f(4)(x)=sinxf(4)(0)=0.f(x)=sinxf(0)=0f′(x)=cosxf′(0)=1f″(x)=−sinxf″(0)=0f‴(x)=−cosxf‴(0)=−1f(4)(x)=sinxf(4)(0)=0.$

Since the fourth derivative is $sinx,sinx,$ the pattern repeats. That is, $f(2m)(0)=0f(2m)(0)=0$ and $f(2m+1)(0)=(−1)mf(2m+1)(0)=(−1)m$ for $m≥0.m≥0.$ Thus, we have
$p0(x)=0,p1(x)=0+x=x,p2(x)=0+x+0=x,p3(x)=0+x+0−13!x3=x−x33!,p4(x)=0+x+0−13!x3+0=x−x33!,p5(x)=0+x+0−13!x3+0+15!x5=x−x33!+x55!,p0(x)=0,p1(x)=0+x=x,p2(x)=0+x+0=x,p3(x)=0+x+0−13!x3=x−x33!,p4(x)=0+x+0−13!x3+0=x−x33!,p5(x)=0+x+0−13!x3+0+15!x5=x−x33!+x55!,$

and for $m≥0,m≥0,$
$p2m+1(x)=p2m+2(x)=x−x33!+x55!−⋯+(−1)mx2m+1(2m+1)!=∑k=0m(−1)kx2k+1(2k+1)!.p2m+1(x)=p2m+2(x)=x−x33!+x55!−⋯+(−1)mx2m+1(2m+1)!=∑k=0m(−1)kx2k+1(2k+1)!.$

Graphs of the function and its Maclaurin polynomials are shown in Figure 6.7.
Figure 6.7 The graph shows the function $y=sinxy=sinx$ and the Maclaurin polynomials $p1,p3p1,p3$ and $p5.p5.$
3. For $f(x)=cosx,f(x)=cosx,$ the values of the function and its first four derivatives at $x=0x=0$ are given as follows:
$f(x)=cosxf(0)=1f′(x)=−sinxf′(0)=0f″(x)=−cosxf″(0)=−1f‴(x)=sinxf‴(0)=0f(4)(x)=cosxf(4)(0)=1.f(x)=cosxf(0)=1f′(x)=−sinxf′(0)=0f″(x)=−cosxf″(0)=−1f‴(x)=sinxf‴(0)=0f(4)(x)=cosxf(4)(0)=1.$

Since the fourth derivative is $sinx,sinx,$ the pattern repeats. In other words, $f(2m)(0)=(−1)mf(2m)(0)=(−1)m$ and $f(2m+1)=0f(2m+1)=0$ for $m≥0.m≥0.$ Therefore,
$p0(x)=1,p1(x)=1+0=1,p2(x)=1+0−12!x2=1−x22!,p3(x)=1+0−12!x2+0=1−x22!,p4(x)=1+0−12!x2+0+14!x4=1−x22!+x44!,p5(x)=1+0−12!x2+0+14!x4+0=1−x22!+x44!,p0(x)=1,p1(x)=1+0=1,p2(x)=1+0−12!x2=1−x22!,p3(x)=1+0−12!x2+0=1−x22!,p4(x)=1+0−12!x2+0+14!x4=1−x22!+x44!,p5(x)=1+0−12!x2+0+14!x4+0=1−x22!+x44!,$

and for $n≥0,n≥0,$
$p2m(x)=p2m+1(x)=1−x22!+x44!−⋯+(−1)mx2m(2m)!=∑k=0m(−1)kx2k(2k)!.p2m(x)=p2m+1(x)=1−x22!+x44!−⋯+(−1)mx2m(2m)!=∑k=0m(−1)kx2k(2k)!.$

Graphs of the function and the Maclaurin polynomials appear in Figure 6.8.
Figure 6.8 The function $y=cosxy=cosx$ and the Maclaurin polynomials $p0,p2p0,p2$ and $p4p4$ are plotted on this graph.
Checkpoint 6.11

Find formulas for the Maclaurin polynomials $p0,p1,p2p0,p1,p2$ and $p3p3$ for $f(x)=11+x.f(x)=11+x.$ Find a formula for the nth Maclaurin polynomial. Write your anwer using sigma notation.

### Taylor’s Theorem with Remainder

Recall that the nth Taylor polynomial for a function $ff$ at a is the nth partial sum of the Taylor series for $ff$ at a. Therefore, to determine if the Taylor series converges, we need to determine whether the sequence of Taylor polynomials ${pn}{pn}$ converges. However, not only do we want to know if the sequence of Taylor polynomials converges, we want to know if it converges to $f.f.$ To answer this question, we define the remainder $Rn(x)Rn(x)$ as

$Rn(x)=f(x)−pn(x).Rn(x)=f(x)−pn(x).$

For the sequence of Taylor polynomials to converge to $f,f,$ we need the remainder Rn to converge to zero. To determine if Rn converges to zero, we introduce Taylor’s theorem with remainder. Not only is this theorem useful in proving that a Taylor series converges to its related function, but it will also allow us to quantify how well the nth Taylor polynomial approximates the function.

Here we look for a bound on $|Rn|.|Rn|.$ Consider the simplest case: $n=0.n=0.$ Let p0 be the 0th Taylor polynomial at a for a function $f.f.$ The remainder R0 satisfies

$R0(x)=f(x)−p0(x)=f(x)−f(a).R0(x)=f(x)−p0(x)=f(x)−f(a).$

If $ff$ is differentiable on an interval I containing a and x, then by the Mean Value Theorem there exists a real number c between a and x such that $f(x)−f(a)=f′(c)(x−a).f(x)−f(a)=f′(c)(x−a).$ Therefore,

$R0(x)=f′(c)(x−a).R0(x)=f′(c)(x−a).$

Using the Mean Value Theorem in a similar argument, we can show that if $ff$ is n times differentiable on an interval I containing a and x, then the nth remainder Rn satisfies

$Rn(x)=f(n+1)(c)(n+1)!(x−a)n+1Rn(x)=f(n+1)(c)(n+1)!(x−a)n+1$

for some real number c between a and x. It is important to note that the value c in the numerator above is not the center a, but rather an unknown value c between a and x. This formula allows us to get a bound on the remainder Rn. If we happen to know that $|f(n+1)(x)||f(n+1)(x)|$ is bounded by some real number M on this interval I, then

$|Rn(x)|≤M(n+1)!|x−a|n+1|Rn(x)|≤M(n+1)!|x−a|n+1$

for all x in the interval I.

We now state Taylor’s theorem, which provides the formal relationship between a function $ff$ and its nth degree Taylor polynomial $pn(x).pn(x).$ This theorem allows us to bound the error when using a Taylor polynomial to approximate a function value, and will be important in proving that a Taylor series for $ff$ converges to $f.f.$

Theorem 6.7

#### Taylor’s Theorem with Remainder

Let $ff$ be a function that can be differentiated $n+1n+1$ times on an interval I containing the real number a. Let pn be the nth Taylor polynomial of $ff$ at a and let

$Rn(x)=f(x)−pn(x)Rn(x)=f(x)−pn(x)$

be the nth remainder. Then for each x in the interval I, there exists a real number c between a and x such that

$Rn(x)=f(n+1)(c)(n+1)!(x−a)n+1.Rn(x)=f(n+1)(c)(n+1)!(x−a)n+1.$

If there exists a real number M such that $|f(n+1)(x)|≤M|f(n+1)(x)|≤M$ for all $x∈I,x∈I,$ then

$|Rn(x)|≤M(n+1)!|x−a|n+1|Rn(x)|≤M(n+1)!|x−a|n+1$

for all x in I.

#### Proof

Fix a point $x∈Ix∈I$ and introduce the function g such that

$g(t)=f(x)−f(t)−f′(t)(x−t)−f″(t)2!(x−t)2−⋯−f(n)(t)n!(x−t)n−Rn(x)(x−t)n+1(x−a)n+1.g(t)=f(x)−f(t)−f′(t)(x−t)−f″(t)2!(x−t)2−⋯−f(n)(t)n!(x−t)n−Rn(x)(x−t)n+1(x−a)n+1.$

We claim that g satisfies the criteria of Rolle’s theorem. Since g is a polynomial function (in t), it is a differentiable function. Also, g is zero at $t=at=a$ and $t=xt=x$ because

$g(a)=f(x)−f(a)−f′(a)(x−a)−f″(a)2!(x−a)2+⋯+f(n)(a)n!(x−a)n−Rn(x)=f(x)−pn(x)−Rn(x)=0,g(x)=f(x)−f(x)−0−⋯−0=0.g(a)=f(x)−f(a)−f′(a)(x−a)−f″(a)2!(x−a)2+⋯+f(n)(a)n!(x−a)n−Rn(x)=f(x)−pn(x)−Rn(x)=0,g(x)=f(x)−f(x)−0−⋯−0=0.$

Therefore, g satisfies Rolle’s theorem, and consequently, there exists c between a and x such that $g′(c)=0.g′(c)=0.$ We now calculate $g′.g′.$ Using the product rule, we note that

$ddt[f(n)(t)n!(x−t)n]=−f(n)(t)(n−1)!(x−t)n−1+f(n+1)(t)n!(x−t)n.ddt[f(n)(t)n!(x−t)n]=−f(n)(t)(n−1)!(x−t)n−1+f(n+1)(t)n!(x−t)n.$

Consequently,

$g′(t)=−f′(t)+[f′(t)−f″(t)(x−t)]+[f″(t)(x−t)−f‴(t)2!(x−t)2]+⋯+[f(n)(t)(n−1)!(x−t)n−1−f(n+1)(t)n!(x−t)n]+(n+1)Rn(x)(x−t)n(x−a)n+1.g′(t)=−f′(t)+[f′(t)−f″(t)(x−t)]+[f″(t)(x−t)−f‴(t)2!(x−t)2]+⋯+[f(n)(t)(n−1)!(x−t)n−1−f(n+1)(t)n!(x−t)n]+(n+1)Rn(x)(x−t)n(x−a)n+1.$

Notice that there is a telescoping effect. Therefore,

$g′(t)=−f(n+1)(t)n!(x−t)n+(n+1)Rn(x)(x−t)n(x−a)n+1.g′(t)=−f(n+1)(t)n!(x−t)n+(n+1)Rn(x)(x−t)n(x−a)n+1.$

By Rolle’s theorem, we conclude that there exists a number c between a and x such that $g′(c)=0.g′(c)=0.$ Since

$g′(c)=−f(n+1)(c)n!(x−c)n+(n+1)Rn(x)(x−c)n(x−a)n+1g′(c)=−f(n+1)(c)n!(x−c)n+(n+1)Rn(x)(x−c)n(x−a)n+1$

we conclude that

$−f(n+1)(c)n!(x−c)n+(n+1)Rn(x)(x−c)n(x−a)n+1=0.−f(n+1)(c)n!(x−c)n+(n+1)Rn(x)(x−c)n(x−a)n+1=0.$

Adding the first term on the left-hand side to both sides of the equation and dividing both sides of the equation by $n+1,n+1,$ we conclude that

$Rn(x)=f(n+1)(c)(n+1)!(x−a)n+1Rn(x)=f(n+1)(c)(n+1)!(x−a)n+1$

as desired. From this fact, it follows that if there exists M such that $|f(n+1)(x)|≤M|f(n+1)(x)|≤M$ for all x in I, then

$|Rn(x)|≤M(n+1)!|x−a|n+1.|Rn(x)|≤M(n+1)!|x−a|n+1.$

Not only does Taylor’s theorem allow us to prove that a Taylor series converges to a function, but it also allows us to estimate the accuracy of Taylor polynomials in approximating function values. We begin by looking at linear and quadratic approximations of $f(x)=x3f(x)=x3$ at $x=8x=8$ and determine how accurate these approximations are at estimating $113.113.$

### Example 6.13

#### Using Linear and Quadratic Approximations to Estimate Function Values

Consider the function $f(x)=x3.f(x)=x3.$

1. Find the first and second Taylor polynomials for $ff$ at $x=8.x=8.$ Use a graphing utility to compare these polynomials with $ff$ near $x=8.x=8.$
2. Use these two polynomials to estimate $113.113.$
3. Use Taylor’s theorem to bound the error.

#### Solution

1. For $f(x)=x3,f(x)=x3,$ the values of the function and its first two derivatives at $x=8x=8$ are as follows:
$f(x)=x3f(8)=2f′(x)=13x2/3f′(8)=112f″(x)=−29x5/3f″(8)=−1144.f(x)=x3f(8)=2f′(x)=13x2/3f′(8)=112f″(x)=−29x5/3f″(8)=−1144.$

Thus, the first and second Taylor polynomials at $x=8x=8$ are given by
$p1(x)=f(8)+f′(8)(x−8)=2+112(x−8)p2(x)=f(8)+f′(8)(x−8)+f″(8)2!(x−8)2=2+112(x−8)−1288(x−8)2.p1(x)=f(8)+f′(8)(x−8)=2+112(x−8)p2(x)=f(8)+f′(8)(x−8)+f″(8)2!(x−8)2=2+112(x−8)−1288(x−8)2.$

The function and the Taylor polynomials are shown in Figure 6.9.
Figure 6.9 The graphs of $f(x)=x3f(x)=x3$ and the linear and quadratic approximations $p1(x)p1(x)$ and $p2(x).p2(x).$
2. Using the first Taylor polynomial at $x=8,x=8,$ we can estimate
$113≈p1(11)=2+112(11−8)=2.25.113≈p1(11)=2+112(11−8)=2.25.$

Using the second Taylor polynomial at $x=8,x=8,$ we obtain
$113≈p2(11)=2+112(11−8)−1288(11−8)2=2.21875.113≈p2(11)=2+112(11−8)−1288(11−8)2=2.21875.$
3. By Uniqueness of Taylor Series, there exists a c in the interval $(8,11)(8,11)$ such that the remainder when approximating $113113$ by the first Taylor polynomial satisfies
$R1(11)=f″(c)2!(11−8)2.R1(11)=f″(c)2!(11−8)2.$

We do not know the exact value of c, so we find an upper bound on $R1(11)R1(11)$ by determining the maximum value of $f″f″$ on the interval $(8,11).(8,11).$ Since $f″(x)=−29x5/3,f″(x)=−29x5/3,$ the largest value for $|f″(x)||f″(x)|$ on that interval occurs at $x=8.x=8.$ Using the fact that $f″(8)=−1144,f″(8)=−1144,$ we obtain
$|R1(11)|≤1144·2!(11−8)2=0.03125.|R1(11)|≤1144·2!(11−8)2=0.03125.$

Similarly, to estimate $R2(11),R2(11),$ we use the fact that
$R2(11)=f‴(c)3!(11−8)3.R2(11)=f‴(c)3!(11−8)3.$

Since $f‴(x)=1027x8/3,f‴(x)=1027x8/3,$ the maximum value of $f‴f‴$ on the interval $(8,11)(8,11)$ is $f‴(8)≈0.0014468.f‴(8)≈0.0014468.$ Therefore, we have
$|R2(11)|≤0.00114683!(11−8)3≈0.0065104.|R2(11)|≤0.00114683!(11−8)3≈0.0065104.$

### Checkpoint 6.12

Find the first and second Taylor polynomials for $f(x)=xf(x)=x$ at $x=4.x=4.$ Use these polynomials to estimate $6.6.$ Use Taylor’s theorem to bound the error.

### Example 6.14

#### Approximating sin x Using Maclaurin Polynomials

From Example 6.12b., the Maclaurin polynomials for $sinxsinx$ are given by

$p2m+1(x)=p2m+2(x)=x−x33!+x55!−x77!+⋯+(−1)mx2m+1(2m+1)!p2m+1(x)=p2m+2(x)=x−x33!+x55!−x77!+⋯+(−1)mx2m+1(2m+1)!$

for $m=0,1,2,….m=0,1,2,….$

1. Use the fifth Maclaurin polynomial for $sinxsinx$ to approximate $sin(π18)sin(π18)$ and bound the error.
2. For what values of x does the fifth Maclaurin polynomial approximate $sinxsinx$ to within 0.0001?

#### Solution

1. The fifth Maclaurin polynomial is
$p5(x)=x−x33!+x55!.p5(x)=x−x33!+x55!.$

Using this polynomial, we can estimate as follows:
$sin(π18)≈p5(π18)=π18−13!(π18)3+15!(π18)5≈0.173648.sin(π18)≈p5(π18)=π18−13!(π18)3+15!(π18)5≈0.173648.$

To estimate the error, use the fact that the sixth Maclaurin polynomial is $p6(x)=p5(x)p6(x)=p5(x)$ and calculate a bound on $R6(π18).R6(π18).$ By Uniqueness of Taylor Series, the remainder is
$R6(π18)=f(7)(c)7!(π18)7R6(π18)=f(7)(c)7!(π18)7$

for some c between 0 and $π18.π18.$ Using the fact that $|f(7)(x)|≤1|f(7)(x)|≤1$ for all x, we find that the magnitude of the error is at most
$17!·(π18)7≤9.8×10−10.17!·(π18)7≤9.8×10−10.$
2. We need to find the values of x such that
$17!|x|7≤0.0001.17!|x|7≤0.0001.$

Solving this inequality for x, we have that the fifth Maclaurin polynomial gives an estimate to within 0.0001 as long as $|x|<0.907.|x|<0.907.$

### Checkpoint 6.13

Use the fourth Maclaurin polynomial for $cosxcosx$ to approximate $cos(π12).cos(π12).$

Now that we are able to bound the remainder $Rn(x),Rn(x),$ we can use this bound to prove that a Taylor series for $ff$ at a converges to $f.f.$

### Representing Functions with Taylor and Maclaurin Series

We now discuss issues of convergence for Taylor series. We begin by showing how to find a Taylor series for a function, and how to find its interval of convergence.

### Example 6.15

#### Finding a Taylor Series

Find the Taylor series for $f(x)=1xf(x)=1x$ at $x=1.x=1.$ Determine the interval of convergence.

#### Solution

For $f(x)=1x,f(x)=1x,$ the values of the function and its first four derivatives at $x=1x=1$ are

$f(x)=1xf(1)=1f′(x)=−1x2f′(1)=−1f″(x)=2x3f″(1)=2!f‴(x)=−3·2x4f‴(1)=−3!f(4)(x)=4·3·2x5f(4)(1)=4!.f(x)=1xf(1)=1f′(x)=−1x2f′(1)=−1f″(x)=2x3f″(1)=2!f‴(x)=−3·2x4f‴(1)=−3!f(4)(x)=4·3·2x5f(4)(1)=4!.$

That is, we have $f(n)(1)=(−1)nn!f(n)(1)=(−1)nn!$ for all $n≥0.n≥0.$ Therefore, the Taylor series for $ff$ at $x=1x=1$ is given by

$∑n=0∞f(n)(1)n!(x−1)n=∑n=0∞(−1)n(x−1)n.∑n=0∞f(n)(1)n!(x−1)n=∑n=0∞(−1)n(x−1)n.$

To find the interval of convergence, we use the ratio test. We find that

$|an+1||an|=|(−1)n+1(x−1)n+1||(−1)n(x−1)n|=|x−1|.|an+1||an|=|(−1)n+1(x−1)n+1||(−1)n(x−1)n|=|x−1|.$

Thus, the series converges if $|x−1|<1.|x−1|<1.$ That is, the series converges for $0 Next, we need to check the endpoints. At $x=2,x=2,$ we see that

$∑n=0∞(−1)n(2−1)n=∑n=0∞(−1)n∑n=0∞(−1)n(2−1)n=∑n=0∞(−1)n$

diverges by the divergence test. Similarly, at $x=0,x=0,$

$∑n=0∞(−1)n(0−1)n=∑n=0∞(−1)2n=∑n=0∞1∑n=0∞(−1)n(0−1)n=∑n=0∞(−1)2n=∑n=0∞1$

diverges. Therefore, the interval of convergence is $(0,2).(0,2).$

Checkpoint 6.14

Find the Taylor series for $f(x)=12xf(x)=12x$ at $x=2x=2$ and determine its interval of convergence.

We know that the Taylor series found in this example converges on the interval $(0,2),(0,2),$ but how do we know it actually converges to $f?f?$ We consider this question in more generality in a moment, but for this example, we can answer this question by writing

$f(x)=1x=11−(1−x).f(x)=1x=11−(1−x).$

That is, $ff$ can be represented by the geometric series $∑n=0∞(1−x)n.∑n=0∞(1−x)n.$ Since this is a geometric series, it converges to $1x1x$ as long as $|1−x|<1.|1−x|<1.$ Therefore, the Taylor series found in Example 6.15 does converge to $f(x)=1xf(x)=1x$ on $(0,2).(0,2).$

We now consider the more general question: if a Taylor series for a function $ff$ converges on some interval, how can we determine if it actually converges to $f?f?$ To answer this question, recall that a series converges to a particular value if and only if its sequence of partial sums converges to that value. Given a Taylor series for $ff$ at a, the nth partial sum is given by the nth Taylor polynomial pn. Therefore, to determine if the Taylor series converges to $f,f,$ we need to determine whether

$limn→∞pn(x)=f(x).limn→∞pn(x)=f(x).$

Since the remainder $Rn(x)=f(x)−pn(x),Rn(x)=f(x)−pn(x),$ the Taylor series converges to $ff$ if and only if

$limn→∞Rn(x)=0.limn→∞Rn(x)=0.$

We now state this theorem formally.

Theorem 6.8

#### Convergence of Taylor Series

Suppose that $ff$ has derivatives of all orders on an interval I containing a. Then the Taylor series

$∑n=0∞f(n)(a)n!(x−a)n∑n=0∞f(n)(a)n!(x−a)n$

converges to $f(x)f(x)$ for all x in I if and only if

$limn→∞Rn(x)=0limn→∞Rn(x)=0$

for all x in I.

With this theorem, we can prove that a Taylor series for $ff$ at a converges to $ff$ if we can prove that the remainder $Rn(x)→0.Rn(x)→0.$ To prove that $Rn(x)→0,Rn(x)→0,$ we typically use the bound

$|Rn(x)|≤M(n+1)!|x−a|n+1|Rn(x)|≤M(n+1)!|x−a|n+1$

from Taylor’s theorem with remainder.

In the next example, we find the Maclaurin series for ex and $sinxsinx$ and show that these series converge to the corresponding functions for all real numbers by proving that the remainders $Rn(x)→0Rn(x)→0$ for all real numbers x.

### Example 6.16

#### Finding Maclaurin Series

For each of the following functions, find the Maclaurin series and its interval of convergence. Use Taylor’s Theorem with Remainder to prove that the Maclaurin series for $ff$ converges to $ff$ on that interval.

1. ex
2. $sinxsinx$

#### Solution

1. Using the nth Maclaurin polynomial for ex found in Example 6.12a., we find that the Maclaurin series for ex is given by
$∑n=0∞xnn!.∑n=0∞xnn!.$

To determine the interval of convergence, we use the ratio test. Since
$|an+1||an|=|x|n+1(n+1)!·n!|x|n=|x|n+1,|an+1||an|=|x|n+1(n+1)!·n!|x|n=|x|n+1,$

we have
$limn→∞|an+1||an|=limn→∞|x|n+1=0limn→∞|an+1||an|=limn→∞|x|n+1=0$

for all x. Therefore, the series converges absolutely for all x, and thus, the interval of convergence is $(−∞,∞).(−∞,∞).$ To show that the series converges to ex for all x, we use the fact that $f(n)(x)=exf(n)(x)=ex$ for all $n≥0n≥0$ and ex is an increasing function on $(−∞,∞).(−∞,∞).$ Therefore, for any real number b, the maximum value of ex for all $|x|≤b|x|≤b$ is eb. Thus,
$|Rn(x)|≤eb(n+1)!|x|n+1.|Rn(x)|≤eb(n+1)!|x|n+1.$

Since we just showed that
$∑n=0∞|x|nn!∑n=0∞|x|nn!$

converges for all x, by the divergence test, we know that
$limn→∞|x|n+1(n+1)!=0limn→∞|x|n+1(n+1)!=0$

for any real number x. By combining this fact with the squeeze theorem, the result is $limn→∞Rn(x)=0.limn→∞Rn(x)=0.$
2. Using the nth Maclaurin polynomial for $sinxsinx$ found in Example 6.12b., we find that the Maclaurin series for $sinxsinx$ is given by
$∑n=0∞(−1)nx2n+1(2n+1)!.∑n=0∞(−1)nx2n+1(2n+1)!.$

In order to apply the ratio test, consider
$|an+1||an|=|x|2n+3(2n+3)!·(2n+1)!|x|2n+1=|x|2(2n+3)(2n+2).|an+1||an|=|x|2n+3(2n+3)!·(2n+1)!|x|2n+1=|x|2(2n+3)(2n+2).$

Since
$limn→∞|x|2(2n+3)(2n+2)=0limn→∞|x|2(2n+3)(2n+2)=0$

for all x, we obtain the interval of convergence as $(−∞,∞).(−∞,∞).$ To show that the Maclaurin series converges to $sinx,sinx,$ look at $Rn(x).Rn(x).$ For each x there exists a real number c between 0 and x such that
$Rn(x)=f(n+1)(c)(n+1)!xn+1.Rn(x)=f(n+1)(c)(n+1)!xn+1.$

Since $|f(n+1)(c)|≤1|f(n+1)(c)|≤1$ for all integers n and all real numbers c, we have
$|Rn(x)|≤|x|n+1(n+1)!|Rn(x)|≤|x|n+1(n+1)!$

for all real numbers x. Using the same idea as in part a., the result is $limn→∞Rn(x)=0limn→∞Rn(x)=0$ for all x, and therefore, the Maclaurin series for $sinxsinx$ converges to $sinxsinx$ for all real x.
Checkpoint 6.15

Find the Maclaurin series for $f(x)=cosx.f(x)=cosx.$ Use the ratio test to show that the interval of convergence is $(−∞,∞).(−∞,∞).$ Show that the Maclaurin series converges to $cosxcosx$ for all real numbers x.

### Student Project

#### Proving that e is Irrational

In this project, we use the Maclaurin polynomials for ex to prove that e is irrational. The proof relies on supposing that e is rational and arriving at a contradiction. Therefore, in the following steps, we suppose $e=r/se=r/s$ for some integers r and s where $s≠0.s≠0.$

1. Write the Maclaurin polynomials $p0(x),p1(x),p2(x),p3(x),p4(x)p0(x),p1(x),p2(x),p3(x),p4(x)$ for ex. Evaluate $p0(1),p1(1),p2(1),p3(1),p4(1)p0(1),p1(1),p2(1),p3(1),p4(1)$ to estimate e.
2. Let $Rn(x)Rn(x)$ denote the remainder when using $pn(x)pn(x)$ to estimate ex. Therefore, $Rn(x)=ex−pn(x),Rn(x)=ex−pn(x),$ and $Rn(1)=e−pn(1).Rn(1)=e−pn(1).$ Assuming that $e=rse=rs$ for integers r and s, evaluate $R0(1),R1(1),R2(1),R3(1),R4(1).R0(1),R1(1),R2(1),R3(1),R4(1).$
3. Using the results from part 2, show that for each remainder $R0(1),R1(1),R2(1),R3(1),R4(1),R0(1),R1(1),R2(1),R3(1),R4(1),$ we can find an integer k such that $kRn(1)kRn(1)$ is an integer for $n=0,1,2,3,4.n=0,1,2,3,4.$
4. Write down the formula for the nth Maclaurin polynomial $pn(x)pn(x)$ for ex and the corresponding remainder $Rn(x).Rn(x).$ Show that $sn!Rn(1)sn!Rn(1)$ is an integer.
5. Use Taylor’s theorem to write down an explicit formula for $Rn(1).Rn(1).$ Conclude that $Rn(1)≠0,Rn(1)≠0,$ and therefore, $sn!Rn(1)≠0.sn!Rn(1)≠0.$
6. Use Taylor’s theorem to find an estimate on $Rn(1).Rn(1).$ Use this estimate combined with the result from part 5 to show that $|sn!Rn(1)| Conclude that if n is large enough, then $|sn!Rn(1)|<1.|sn!Rn(1)|<1.$ Therefore, $sn!Rn(1)sn!Rn(1)$ is an integer with magnitude less than 1. Thus, $sn!Rn(1)=0.sn!Rn(1)=0.$ But from part 5, we know that $sn!Rn(1)≠0.sn!Rn(1)≠0.$ We have arrived at a contradiction, and consequently, the original supposition that e is rational must be false.

### Section 6.3 Exercises

In the following exercises, find the Taylor polynomials of degree two approximating the given function centered at the given point.

116.

$f(x)=1+x+x2f(x)=1+x+x2$ at $a=1a=1$

117.

$f(x)=1+x+x2f(x)=1+x+x2$ at $a=−1a=−1$

118.

$f(x)=cos(2x)f(x)=cos(2x)$ at $a=πa=π$

119.

$f(x)=sin(2x)f(x)=sin(2x)$ at $a=π2a=π2$

120.

$f(x)=xf(x)=x$ at $a=4a=4$

121.

$f(x)=lnxf(x)=lnx$ at $a=1a=1$

122.

$f(x)=1xf(x)=1x$ at $a=1a=1$

123.

$f(x)=exf(x)=ex$ at $a=1a=1$

In the following exercises, verify that the given choice of n in the remainder estimate $|Rn|≤M(n+1)!(x−a)n+1,|Rn|≤M(n+1)!(x−a)n+1,$ where M is the maximum value of $|f(n+1)(z)||f(n+1)(z)|$ on the interval between a and the indicated point, yields $|Rn|≤11000.|Rn|≤11000.$ Find the value of the Taylor polynomial pn of $ff$ at the indicated point.

124.

[T] $10;a=9,n=310;a=9,n=3$

125.

[T] $(28)1/3;a=27,n=1(28)1/3;a=27,n=1$

126.

[T] $sin(6);a=2π,n=5sin(6);a=2π,n=5$

127.

[T] e2; $a=0,n=9a=0,n=9$

128.

[T] $cos(π5);a=0,n=4cos(π5);a=0,n=4$

129.

[T] $ln(2);a=1,n=1000ln(2);a=1,n=1000$

130.

Integrate the approximation $sint≈t−t36+t5120−t75040sint≈t−t36+t5120−t75040$ evaluated at πt to approximate $∫01sinπtπtdt.∫01sinπtπtdt.$

131.

Integrate the approximation $ex≈1+x+x22+⋯+x6720ex≈1+x+x22+⋯+x6720$ evaluated at −x2 to approximate $∫01e−x2dx.∫01e−x2dx.$

In the following exercises, find the smallest value of n such that the remainder estimate $|Rn|≤M(n+1)!(x−a)n+1,|Rn|≤M(n+1)!(x−a)n+1,$ where M is the maximum value of $|f(n+1)(z)||f(n+1)(z)|$ on the interval between a and the indicated point, yields $|Rn|≤11000|Rn|≤11000$ on the indicated interval.

132.

$f(x)=sinxf(x)=sinx$ on $[−π,π],a=0[−π,π],a=0$

133.

$f(x)=cosxf(x)=cosx$ on $[−π2,π2],a=0[−π2,π2],a=0$

134.

$f(x)=e−2xf(x)=e−2x$ on $[−1,1],a=0[−1,1],a=0$

135.

$f(x)=e−xf(x)=e−x$ on $[−3,3],a=0[−3,3],a=0$

In the following exercises, the maximum of the right-hand side of the remainder estimate $|R1|≤max|f″(z)|2R2|R1|≤max|f″(z)|2R2$ on $[a−R,a+R][a−R,a+R]$ occurs at a or $a±R.a±R.$ Estimate the maximum value of R such that $max|f″(z)|2R2≤0.1max|f″(z)|2R2≤0.1$ on $[a−R,a+R][a−R,a+R]$ by plotting this maximum as a function of R.

136.

[T] ex approximated by $1+x,a=01+x,a=0$

137.

[T] $sinxsinx$ approximated by x, $a=0a=0$

138.

[T] $lnxlnx$ approximated by $x−1,a=1x−1,a=1$

139.

[T] $cosxcosx$ approximated by $1,a=01,a=0$

In the following exercises, find the Taylor series of the given function centered at the indicated point.

140.

$x4x4$ at $a=−1a=−1$

141.

$1+x+x2+x31+x+x2+x3$ at $a=−1a=−1$

142.

$sinxsinx$ at $a=πa=π$

143.

$cosxcosx$ at $a=2πa=2π$

144.

$sinxsinx$ at $x=π2x=π2$

145.

$cosxcosx$ at $x=π2x=π2$

146.

$exex$ at $a=−1a=−1$

147.

$exex$ at $a=1a=1$

148.

$1(x−1)21(x−1)2$ at $a=0a=0$ (Hint: Differentiate $11−x.)11−x.)$

149.

$1(x−1)31(x−1)3$ at $a=0a=0$

150.

$F(x)=∫0xcos(t)dt;f(t)=∑n=0∞(−1)ntn(2n)!F(x)=∫0xcos(t)dt;f(t)=∑n=0∞(−1)ntn(2n)!$ at $a=0a=0$ (Note: $ff$ is the Taylor series of $cos(t).)cos(t).)$

In the following exercises, compute the Taylor series of each function around $x=1.x=1.$

151.

$f(x)=2−xf(x)=2−x$

152.

$f(x)=x3f(x)=x3$

153.

$f(x)=(x−2)2f(x)=(x−2)2$

154.

$f(x)=lnxf(x)=lnx$

155.

$f(x)=1xf(x)=1x$

156.

$f(x)=12x−x2f(x)=12x−x2$

157.

$f(x)=x4x−2x2−1f(x)=x4x−2x2−1$

158.

$f(x)=e−xf(x)=e−x$

159.

$f(x)=e2xf(x)=e2x$

[T] In the following exercises, identify the value of x such that the given series $∑n=0∞an∑n=0∞an$ is the value of the Maclaurin series of $f(x)f(x)$ at $x.x.$ Approximate the value of $f(x)f(x)$ using $S10=∑n=010an.S10=∑n=010an.$

160.

$∑n=0∞1n!∑n=0∞1n!$

161.

$∑n=0∞2nn!∑n=0∞2nn!$

162.

$∑n=0∞(−1)n(2π)2n(2n)!∑n=0∞(−1)n(2π)2n(2n)!$

163.

$∑n=0∞(−1)n(2π)2n+1(2n+1)!∑n=0∞(−1)n(2π)2n+1(2n+1)!$

The following exercises make use of the functions $S5(x)=x−x36+x5120S5(x)=x−x36+x5120$ and $C4(x)=1−x22+x424C4(x)=1−x22+x424$ on $[−π,π].[−π,π].$

164.

[T] Plot $sin2x−(S5(x))2sin2x−(S5(x))2$ on $[−π,π].[−π,π].$ Compare the maximum difference with the square of the Taylor remainder estimate for $sinx.sinx.$

165.

[T] Plot $cos2x−(C4(x))2cos2x−(C4(x))2$ on $[−π,π].[−π,π].$ Compare the maximum difference with the square of the Taylor remainder estimate for $cosx.cosx.$

166.

[T] Plot $|2S5(x)C4(x)−sin(2x)||2S5(x)C4(x)−sin(2x)|$ on $[−π,π].[−π,π].$

167.

[T] Compare $S5(x)C4(x)S5(x)C4(x)$ on $[−1,1][−1,1]$ to $tanx.tanx.$ Compare this with the Taylor remainder estimate for the approximation of $tanxtanx$ by $x+x33+2x515.x+x33+2x515.$

168.

[T] Plot $ex−e4(x)ex−e4(x)$ where $e4(x)=1+x+x22+x36+x424e4(x)=1+x+x22+x36+x424$ on $[0,2].[0,2].$ Compare the maximum error with the Taylor remainder estimate.

169.

(Taylor approximations and root finding.) Recall that Newton’s method $xn+1=xn−f(xn)f′(xn)xn+1=xn−f(xn)f′(xn)$ approximates solutions of $f(x)=0f(x)=0$ near the input $x0.x0.$

1. If $ff$ and $gg$ are inverse functions, explain why a solution of $g(x)=ag(x)=a$ is the value $f(a)off.f(a)off.$
2. Let $pN(x)pN(x)$ be the $NthNth$ degree Maclaurin polynomial of $ex.ex.$ Use Newton’s method to approximate solutions of $pN(x)−2=0pN(x)−2=0$ for $N=4,5,6.N=4,5,6.$
3. Explain why the approximate roots of $pN(x)−2=0pN(x)−2=0$ are approximate values of $ln(2).ln(2).$

In the following exercises, use the fact that if $q(x)=∑n=1∞an(x−c)nq(x)=∑n=1∞an(x−c)n$ converges in an interval containing $c,c,$ then $limx→cq(x)=a0limx→cq(x)=a0$ to evaluate each limit using Taylor series.

170.

$limx→0cosx−1x2limx→0cosx−1x2$

171.

$limx→0ln(1−x2)x2limx→0ln(1−x2)x2$

172.

$limx→0ex2−x2−1x4limx→0ex2−x2−1x4$

173.

$limx→0+cos(x)−12xlimx→0+cos(x)−12x$