Approximating with Newton’s Method

Learning Outcomes

  • Describe the steps of Newton’s method
  • Explain what an iterative process means
  • Recognize when Newton’s method does not work

Describing Newton’s Method

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

f(x)=x5+8x4+4x32x7f(x)=x5+8x4+4x32x7

 

No formula exists that allows us to find the solutions of f(x)=0f(x)=0. Similar difficulties exist for nonpolynomial functions. For example, consider the task of finding solutions of tan(x)x=0tan(x)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(x)=0f(x)=0. By sketching a graph of ff, we can estimate a root of f(x)=0f(x)=0. Let’s call this estimate x0x0. We then draw the tangent line to ff at x0x0. If f(x0)0f(x0)0, this tangent line intersects the xx-axis at some point (x1,0)(x1,0). Now let x1x1 be the next approximation to the actual root. Typically, x1x1 is closer than x0x0 to an actual root. Next we draw the tangent line to ff at x1x1. If f(x1)0f(x1)0, this tangent line also intersects the xx-axis, producing another approximation, x2x2. We continue in this way, deriving a list of approximations: x0,x1,x2,x0,x1,x2,. Typically, the numbers x0,x1,x2,x0,x1,x2, quickly approach an actual root xx, as shown in the following figure.

This function f(x) is drawn with points (x0, f(x0)), (x1, f(x1)), and (x2, f(x2)) marked on the function. From (x0, f(x0)), a tangent line is drawn, and it strikes the x axis at x1. From (x0, f(x0)), a tangent line is drawn, and it strikes the x axis at x2. If a tangent line were drawn from (x2, f(x2)), it appears that it would come very close to x*, which is the actual root. Each tangent line drawn in this order appears to get closer and closer to x*.

Figure 1. The approximations x0,x1,x2,x0,x1,x2, approach the actual root xx. The approximations are derived by looking at tangent lines to the graph of ff.

Now let’s look at how to calculate the approximations x0,x1,x2,x0,x1,x2,. If x0x0 is our first approximation, the approximation x1x1 is defined by letting (x1,0)(x1,0) be the xx-intercept of the tangent line to ff at x0x0. The equation of this tangent line is given by

y=f(x0)+f(x0)(xx0)y=f(x0)+f(x0)(xx0)

 

Therefore, x1x1 must satisfy

 

f(x0)+f(x0)(x1x0)=0f(x0)+f(x0)(x1x0)=0

 

Solving this equation for x1x1, we conclude that

x1=x0f(x0)f(x0)x1=x0f(x0)f(x0)

 

Similarly, the point (x2,0)(x2,0) is the xx-intercept of the tangent line to ff at x1x1. Therefore, x2x2 satisfies the equation

x2=x1f(x1)f(x1)x2=x1f(x1)f(x1)

 

In general, for n>0,xnn>0,xn satisfies

xn=xn1f(xn1)f(xn1)xn=xn1f(xn1)f(xn1)

Next we see how to make use of this technique to approximate the root of the polynomial f(x)=x33x+1f(x)=x33x+1.

Example: Finding a Root of a Polynomial

Use Newton’s method to approximate a root of f(x)=x33x+1f(x)=x33x+1 in the interval [1,2][1,2]. Let x0=2x0=2 and find x1,x2,x3,x4x1,x2,x3,x4, and x5x5.

Watch the following video to see the worked solution to Example: Finding a Root of a Polynomial.

Try It

Letting x0=0x0=0, use Newton’s method to approximate the root of f(x)=x33x+1f(x)=x33x+1 over the interval [0,1][0,1] by calculating x1x1 and x2x2.

Newton’s method can also be used to approximate square roots. Here we show how to approximate 22. This method can be modified to approximate the square root of any positive number.

example: Finding a Square Root

Use Newton’s method to approximate 22 (Figure 3). Let f(x)=x22f(x)=x22, let x0=2x0=2, and calculate x1,x2,x3,x4,x5x1,x2,x3,x4,x5. (We note that since f(x)=x22f(x)=x22 has a zero at 22, the initial value x0=2x0=2 is a reasonable choice to approximate 22.)

Try It

Use Newton’s method to approximate 3 by letting f(x)=x23 and x0=3. Find x1 and x2.

Try It

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(x)=x[f(x)f(x)], we can rewrite the equation forxn as xn=F(xn1). This type of process, where each xn is defined in terms of xn1 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:

  1. At one of the approximations xn, the derivative f is zero at xn, but f(xn)0. As a result, the tangent line of f at xn does not intersect the x-axis. Therefore, we cannot continue the iterative process.
  2. The approximations x0,x1,x2, 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). This event most often occurs when we do not choose the approximation x0 close enough to the desired root.
  3. The approximations may fail to approach a root entirely. In the example below, we provide an example of a function and an initial guess x0 such that the successive approximations never approach a root because the successive approximations continue to alternate back and forth between two values.
A function is drawn with two roots, labeled root sought and root found. A point x0 is chosen such that when the tangent of x0 is taken, even though it is nearer to the root sought, the tangent points to the root found.

Figure 4. If the initial guess x0 is too far from the root sought, it may lead to approximations that approach a different root.

example: When Newton’s Method Fails

Consider the function f(x)=x32x+2. Let x0=0. Show that the sequence x1,x2, fails to approach a root of f.

Watch the following video to see the worked solution to Example: When Newton’s Method Fails.

Try It

For f(x)=x32x+2, let x0=1.5 and find x1 and x2.

From the example above, 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.