### Learning Objectives

- 4.9.1 Describe the steps of Newton’s method.
- 4.9.2 Explain what an iterative process means.
- 4.9.3 Recognize when Newton’s method does not work.
- 4.9.4 Apply iterative processes to various situations.

In many areas of pure and applied mathematics, we are interested in finding solutions to an equation of the form $f\left(x\right)=0.$ For most functions, however, it is difficult—if not impossible—to calculate their zeroes explicitly. In this section, we take a look at a technique that provides a very efficient way of approximating the zeroes of functions. This technique makes use of tangent line approximations and is behind the method used often by calculators and computers to find zeroes.

### Describing Newton’s Method

Consider the task of finding the solutions of $f\left(x\right)=0.$ If $f$ is the first-degree polynomial $f\left(x\right)=ax+b,$ then the solution of $f\left(x\right)=0$ is given by the formula $x=-\frac{b}{a}.$ If $f$ is the second-degree polynomial $f\left(x\right)=a{x}^{2}+bx+c,$ the solutions of $f\left(x\right)=0$ can be found by using the quadratic formula. However, for polynomials of degree $3$ or more, finding roots of $f$ becomes more complicated. Although formulas exist for third- and fourth-degree polynomials, they are quite complicated. Also, if $f$ is a polynomial of degree $5$ or greater, it is known that no such formulas exist. For example, consider the function

No formula exists that allows us to find the solutions of $f\left(x\right)=0.$ Similar difficulties exist for nonpolynomial functions. For example, consider the task of finding solutions of $\text{tan}\left(x\right)-x=0.$ No simple formula exists for the solutions of this equation. In cases such as these, we can use Newton’s method to approximate the roots.

Newton’s method makes use of the following idea to approximate the solutions of $f\left(x\right)=0.$ By sketching a graph of $f,$ we can estimate a root of $f\left(x\right)=0.$ Let’s call this estimate ${x}_{0}.$ We then draw the tangent line to $f$ at ${x}_{0}.$ If ${f}^{\prime}\left({x}_{0}\right)\ne 0,$ this tangent line intersects the $x$-axis at some point $\left({x}_{1},0\right).$ Now let ${x}_{1}$ be the next approximation to the actual root. Typically, ${x}_{1}$ is closer than ${x}_{0}$ to an actual root. Next we draw the tangent line to $f$ at ${x}_{1}.$ If ${f}^{\prime}\left({x}_{1}\right)\ne 0,$ this tangent line also intersects the $x$-axis, producing another approximation, ${x}_{2}.$ We continue in this way, deriving a list of approximations: ${x}_{0},{x}_{1},{x}_{2}\text{,\u2026}.$ Typically, the numbers ${x}_{0},{x}_{1},{x}_{2}\text{,\u2026}$ quickly approach an actual root $x*,$ as shown in the following figure.

Now let’s look at how to calculate the approximations ${x}_{0},{x}_{1},{x}_{2}\text{,\u2026}.$ If ${x}_{0}$ is our first approximation, the approximation ${x}_{1}$ is defined by letting $\left({x}_{1},0\right)$ be the $x$-intercept of the tangent line to $f$ at ${x}_{0}.$ The equation of this tangent line is given by

Therefore, ${x}_{1}$ must satisfy

Solving this equation for ${x}_{1},$ we conclude that

Similarly, the point $\left({x}_{2},0\right)$ is the $x$-intercept of the tangent line to $f$ at ${x}_{1}.$ Therefore, ${x}_{2}$ satisfies the equation

In general, for $n>0,{x}_{n}$ satisfies

Next we see how to make use of this technique to approximate the root of the polynomial $f\left(x\right)={x}^{3}-3x+1.$

### Example 4.46

#### Finding a Root of a Polynomial

Use Newton’s method to approximate a root of $f\left(x\right)={x}^{3}-3x+1$ in the interval $\left[1,2\right].$ Let ${x}_{0}=2$ and find ${x}_{1},{x}_{2},{x}_{3},{x}_{4},$ and ${x}_{5}.$

### Checkpoint 4.45

Letting ${x}_{0}=0,$ let’s use Newton’s method to approximate the root of $f\left(x\right)={x}^{3}-3x+1$ over the interval $\left[0,1\right]$ by calculating ${x}_{1}$ and ${x}_{2}.$

Newton’s method can also be used to approximate square roots. Here we show how to approximate $\sqrt{2}.$ This method can be modified to approximate the square root of any positive number.

### Example 4.47

#### Finding a Square Root

Use Newton’s method to approximate $\sqrt{2}$ (Figure 4.79). Let $f\left(x\right)={x}^{2}-2,$ let ${x}_{0}=2,$ and calculate ${x}_{1},{x}_{2},{x}_{3},{x}_{4},{x}_{5}.$ (We note that since $f\left(x\right)={x}^{2}-2$ has a zero at $\sqrt{2},$ the initial value ${x}_{0}=2$ is a reasonable choice to approximate $\sqrt{2}.)$

### Checkpoint 4.46

Use Newton’s method to approximate $\sqrt{3}$ by letting $f\left(x\right)={x}^{2}-3$ and ${x}_{0}=3.$ Find ${x}_{1}$ and ${x}_{2}.$

When using Newton’s method, each approximation after the initial guess is defined in terms of the previous approximation by using the same formula. In particular, by defining the function $F\left(x\right)=x-\left[\frac{f\left(x\right)}{{f}^{\prime}\left(x\right)}\right],$ we can rewrite Equation 4.8 as ${x}_{n}=F\left({x}_{n-1}\right).$ This type of process, where each ${x}_{n}$ is defined in terms of ${x}_{n-1}$ by repeating the same function, is an example of an iterative process. Shortly, we examine other iterative processes. First, let’s look at the reasons why Newton’s method could fail to find a root.

### Failures of Newton’s Method

Typically, Newton’s method is used to find roots fairly quickly. However, things can go wrong. Some reasons why Newton’s method might fail include the following:

- At one of the approximations ${x}_{n},$ the derivative ${f}^{\prime}$ is zero at ${x}_{n},$ but $f\left({x}_{n}\right)\ne 0.$ As a result, the tangent line of $f$ at ${x}_{n}$ does not intersect the $x$-axis. Therefore, we cannot continue the iterative process.
- The approximations ${x}_{0},{x}_{1},{x}_{2}\text{,\u2026}$ may approach a different root. If the function $f$ has more than one root, it is possible that our approximations do not approach the one for which we are looking, but approach a different root (see Figure 4.80). This event most often occurs when we do not choose the approximation ${x}_{0}$ close enough to the desired root.
- The approximations may fail to approach a root entirely. In Example 4.48, we provide an example of a function and an initial guess ${x}_{0}$ such that the successive approximations never approach a root because the successive approximations continue to alternate back and forth between two values.

### Example 4.48

#### When Newton’s Method Fails

Consider the function $f\left(x\right)={x}^{3}-2x+2.$ Let ${x}_{0}=0.$ Show that the sequence ${x}_{1},{x}_{2}\text{,\u2026}$ fails to approach a root of $f.$

### Checkpoint 4.47

For $f\left(x\right)={x}^{3}-2x+2,$ let ${x}_{0}=\mathrm{-1.5}$ and find ${x}_{1}$ and ${x}_{2}.$

From Example 4.48, we see that Newton’s method does not always work. However, when it does work, the sequence of approximations approaches the root very quickly. Discussions of how quickly the sequence of approximations approach a root found using Newton’s method are included in texts on numerical analysis.

### Other Iterative Processes

As mentioned earlier, Newton’s method is a type of iterative process. We now look at an example of a different type of iterative process.

Consider a function $F$ and an initial number ${x}_{0}.$ Define the subsequent numbers ${x}_{n}$ by the formula ${x}_{n}=F\left({x}_{n-1}\right).$ This process is an iterative process that creates a list of numbers ${x}_{0},{x}_{1},{x}_{2}\text{,\u2026},{x}_{n}\text{,\u2026}.$ This list of numbers may approach a finite number $x*$ as $n$ gets larger, or it may not. In Example 4.49, we see an example of a function $F$ and an initial guess ${x}_{0}$ such that the resulting list of numbers approaches a finite value.

### Example 4.49

#### Finding a Limit for an Iterative Process

Let $F\left(x\right)=\frac{1}{2}x+4$ and let ${x}_{0}=0.$ For all $n\ge 1,$ let ${x}_{n}=F\left({x}_{n-1}\right).$ Find the values ${x}_{1},{x}_{2},{x}_{3},{x}_{4},{x}_{5}.$ Make a conjecture about what happens to this list of numbers ${x}_{1},{x}_{2},{x}_{3}\text{\u2026},{x}_{n}\text{,\u2026}$ as $n\to \infty .$ If the list of numbers ${x}_{1},{x}_{2},{x}_{3}\text{,\u2026}$ approaches a finite number $x*,$ then $x*$ satisfies $x*=F\left(x*\right),$ and $x*$ is called a fixed point of $F.$

### Checkpoint 4.48

Consider the function $F\left(x\right)=\frac{1}{3}x+6.$ Let ${x}_{0}=0$ and let ${x}_{n}=F\left({x}_{n-1}\right)$ for $n\ge 2.$ Find ${x}_{1},{x}_{2},{x}_{3},{x}_{4},{x}_{5}.$ Make a conjecture about what happens to the list of numbers ${x}_{1},{x}_{2},{x}_{3}\text{,\u2026}{x}_{n}\text{,\u2026}$ as $n\to \infty .$

### Student Project

#### Iterative Processes and Chaos

Iterative processes can yield some very interesting behavior. In this section, we have seen several examples of iterative processes that converge to a fixed point. We also saw in Example 4.48 that the iterative process bounced back and forth between two values. We call this kind of behavior a $2$-*cycle*. Iterative processes can converge to cycles with various periodicities, such as $2-\text{cycles},\phantom{\rule{0.2em}{0ex}}4-\text{cycles}$ (where the iterative process repeats a sequence of four values), 8-cycles, and so on.

Some iterative processes yield what mathematicians call *chaos*. In this case, the iterative process jumps from value to value in a seemingly random fashion and never converges or settles into a cycle. Although a complete exploration of chaos is beyond the scope of this text, in this project we look at one of the key properties of a chaotic iterative process: sensitive dependence on initial conditions. This property refers to the concept that small changes in initial conditions can generate drastically different behavior in the iterative process.

Probably the best-known example of chaos is the Mandelbrot set (see Figure 4.83), named after Benoit Mandelbrot (1924–2010), who investigated its properties and helped popularize the field of chaos theory. The Mandelbrot set is usually generated by computer and shows fascinating details on enlargement, including self-replication of the set. Several colorized versions of the set have been shown in museums and can be found online and in popular books on the subject.

In this project we use the logistic map

as the function in our iterative process. The logistic map is a deceptively simple function; but, depending on the value of $r,$ the resulting iterative process displays some very interesting behavior. It can lead to fixed points, cycles, and even chaos.

To visualize the long-term behavior of the iterative process associated with the logistic map, we will use a tool called a *cobweb diagram*. As we did with the iterative process we examined earlier in this section, we first draw a vertical line from the point $\left({x}_{0},0\right)$ to the point $\left({x}_{0},f\left({x}_{0}\right)\right)=\left({x}_{0},{x}_{1}\right).$ We then draw a horizontal line from that point to the point $\left({x}_{1},{x}_{1}\right),$ then draw a vertical line to $\left({x}_{1},f\left({x}_{1}\right)\right)=\left({x}_{1},{x}_{2}\right),$ and continue the process until the long-term behavior of the system becomes apparent. Figure 4.84 shows the long-term behavior of the logistic map when $r=3.55$ and ${x}_{0}=0.2.$ (The first $100$ iterations are not plotted.) The long-term behavior of this iterative process is an $8$-cycle.

- Let $r=0.5$ and choose ${x}_{0}=0.2.$ Either by hand or by using a computer, calculate the first $10$ values in the sequence. Does the sequence appear to converge? If so, to what value? Does it result in a cycle? If so, what kind of cycle (for example, $2-\text{cycle},\phantom{\rule{0.2em}{0ex}}4-\text{cycle}.)?$
- What happens when $r=2?$
- For $r=3.2$ and $r=3.5,$ calculate the first $100$ sequence values. Generate a cobweb diagram for each iterative process. (Several free applets are available online that generate cobweb diagrams for the logistic map.) What is the long-term behavior in each of these cases?
- Now let $r=4.$ Calculate the first $100$ sequence values and generate a cobweb diagram. What is the long-term behavior in this case?
- Repeat the process for $r=4,$ but let ${x}_{0}=0.201.$ How does this behavior compare with the behavior for ${x}_{0}=0.2?$

### Section 4.9 Exercises

For the following exercises, write Newton’s formula as ${x}_{n+1}=F\left({x}_{n}\right)$ for solving $f\left(x\right)=0.$

$f\left(x\right)={x}^{2}+1$

$f(x)=\text{sin}\phantom{\rule{0.1em}{0ex}}x$

$f(x)={x}^{3}+3x{e}^{x}$

For the following exercises, solve $f\left(x\right)=0$ using the iteration ${x}_{n+1}={x}_{n}-cf\left({x}_{n}\right),$ which differs slightly from Newton’s method. Find a $c$ that works and a $c$ that fails to converge, with the exception of $c=0.$

$f\left(x\right)={x}^{2}-4x+3,$ with ${x}_{0}=2$

For the following exercises, start at

a. ${x}_{0}=0.6$ and

b. ${x}_{0}=2.$

Compute ${x}_{1}$ and ${x}_{2}$ using the specified iterative method.

${x}_{n+1}={x}_{n}{}^{2}-\frac{1}{2}$

${x}_{n+1}=\sqrt{{x}_{n}}$

${x}_{n+1}=3{x}_{n}\left(1-{x}_{n}\right)$

${x}_{n+1}=\frac{1}{2}{x}_{n}-1$

For the following exercises, solve to four decimal places using Newton’s method and a computer or calculator. Choose any initial guess ${x}_{0}$ that is not the exact root.

${x}^{2}-10=0$

${x}^{2}-x=0$

$x+5\phantom{\rule{0.1em}{0ex}}\text{cos}\left(x\right)=0$

$\frac{1}{1-x}=2$

${x}^{3}+{\left(x+1\right)}^{3}={10}^{3}$

For the following exercises, use Newton’s method to find the fixed points of the function where $f\left(x\right)=x;$ round to three decimals.

$\text{sin}\phantom{\rule{0.1em}{0ex}}x$

${e}^{x}-2$

Newton’s method can be used to find maxima and minima of functions in addition to the roots. In this case apply Newton’s method to the derivative function ${f}^{\prime}\left(x\right)$ to find its roots, instead of the original function. For the following exercises, consider the formulation of the method.

To find candidates for maxima and minima, we need to find the critical points ${f}^{\prime}\left(x\right)=0.$ Show that to solve for the critical points of a function $f\left(x\right),$ Newton’s method is given by ${x}_{n+1}={x}_{n}-\frac{{f}^{\prime}\left({x}_{n}\right)}{f\text{\u2033}\left({x}_{n}\right)}.$

For the following exercises, use Newton’s method to find the location of the local minima and/or maxima of the following functions; round to three decimals.

Minimum of $f\left(x\right)={x}^{2}+2x+4$

Minimum of $f\left(x\right)={x}^{2}{e}^{x}$

Maximum of $f\left(x\right)={x}^{3}+10{x}^{2}+15x-2$

Minimum of $f\left(x\right)={x}^{2}\text{sin}\phantom{\rule{0.1em}{0ex}}x,$ closest non-zero minimum to $x=0$

For the following exercises, use the specified method to solve the equation. If it does not work, explain why it does not work.

Newton’s method, ${x}^{2}+2=0$

Newton’s method, $0=1+{x}^{2}$ starting at ${x}_{0}=0$

For the following exercises, use the secant method, an alternative iterative method to Newton’s method. The formula is given by

Find a root to $0={x}^{2}-x-3$ accurate to three decimal places.

Find a root to $0={e}^{x}-2$ accurate to four decimal places.

Why would you use the secant method over Newton’s method? What are the necessary restrictions on $f?$

For the following exercises, use both Newton’s method and the secant method to calculate a root for the following equations. Use a calculator or computer to calculate how many iterations of each are needed to reach within three decimal places of the exact answer. For the secant method, use the first guess from Newton’s method.

$f\left(x\right)={x}^{2},{x}_{0}=1$

$f\left(x\right)={e}^{x}-1,{x}_{0}=2$

In the following exercises, consider Kepler’s equation regarding planetary orbits, $M=E-\epsilon \phantom{\rule{0.1em}{0ex}}\text{sin}\left(E\right),$ where $M$ is the mean anomaly, $E$ is eccentric anomaly, and $\epsilon $ measures eccentricity.

Use Newton’s method to solve for the eccentric anomaly $E$ when the mean anomaly $M=\frac{\pi}{3}$ and the eccentricity of the orbit $\epsilon =0.25;$ round to three decimals.

Use Newton’s method to solve for the eccentric anomaly $E$ when the mean anomaly $M=\frac{3\pi}{2}$ and the eccentricity of the orbit $\epsilon =0.8;$ round to three decimals.

The following two exercises consider a bank investment. The initial investment is $\text{\$}\mathrm{10,000}.$ After $25$ years, the investment has tripled to $\text{\$}\mathrm{30,000}.$

Use Newton’s method to determine the interest rate if the interest was compounded annually.

Use Newton’s method to determine the interest rate if the interest was compounded continuously.

The cost for printing a book can be given by the equation $C\left(x\right)=1000+12x+\left(\frac{1}{2}\right){x}^{2\text{/}3}.$ Use Newton’s method to find the break-even point if the printer sells each book for $\text{\$}20.$