- Explain how Newton’s method uses repetition to find roots of equations
- Recognize when Newton’s method does not work
- Apply methods that repeat steps to solve different types of mathematical problems
Approximating with Newton’s Method
In many areas of pure and applied mathematics, we are interested in finding solutions to an equation of the form [latex]f(x)=0[/latex]. 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 [latex]f(x)=0[/latex].
If [latex]f[/latex] is the first-degree polynomial [latex]f(x)=ax+b[/latex], then the solution of [latex]f(x)=0[/latex] is given by the formula [latex]x=-\frac{b}{a}[/latex].
If [latex]f[/latex] is the second-degree polynomial [latex]f(x)=ax^2+bx+c[/latex], the solutions of [latex]f(x)=0[/latex] can be found by using the quadratic formula.
However, for polynomials of degree [latex]3[/latex] or more, finding roots of [latex]f[/latex] becomes more complicated. Although formulas exist for third- and fourth-degree polynomials, they are quite complicated. Also, if [latex]f[/latex] is a polynomial of degree [latex]5[/latex] or greater, it is known that no such formulas exist.
Consider the function [latex]f(x)=x^5+8x^4+4x^3-2x-7[/latex]. No formula exists that allows us to find the solutions of [latex]f(x)=0[/latex].
Similar difficulties exist for nonpolynomial functions. Consider the task of finding solutions of [latex]\tan (x)-x=0[/latex]. 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
Newton’s Method is an efficient numerical technique used to find approximately accurate roots of a real-valued function. By starting from an initial guess, the method iteratively refines this guess using the function and its derivative, quickly converging to a root where the function value is zero.
Newton’s method makes use of the following idea to approximate the solutions of [latex]f(x)=0[/latex].
By sketching a graph of [latex]f[/latex], we can estimate a root of [latex]f(x)=0[/latex]. Let’s call this estimate [latex]x_0[/latex]. We then draw the tangent line to [latex]f[/latex] at [latex]x_0[/latex]. If [latex]f^{\prime}(x_0)\ne 0[/latex], this tangent line intersects the [latex]x[/latex]-axis at some point [latex](x_1,0)[/latex].
Now let [latex]x_1[/latex] be the next approximation to the actual root. Typically, [latex]x_1[/latex] is closer than [latex]x_0[/latex] to an actual root. Next we draw the tangent line to [latex]f[/latex] at [latex]x_1[/latex]. If [latex]f^{\prime}(x_1)\ne 0[/latex], this tangent line also intersects the [latex]x[/latex]-axis, producing another approximation, [latex]x_2[/latex].
We continue in this way, deriving a list of approximations: [latex]x_0, x_1, x_2, \cdots[/latex]. Typically, the numbers [latex]x_0,x_1,x_2, \cdots[/latex] quickly approach an actual root [latex]x*[/latex], as shown in the following figure.
Now let’s look at how to calculate the approximations [latex]x_0,x_1,x_2, \cdots[/latex]. If [latex]x_0[/latex] is our first approximation, the approximation [latex]x_1[/latex] is defined by letting [latex](x_1,0)[/latex] be the [latex]x[/latex]-intercept of the tangent line to [latex]f[/latex] at [latex]x_0[/latex]. The equation of this tangent line is given by
Solving this equation for [latex]x_1[/latex], we conclude that
Similarly, the point [latex](x_2,0)[/latex] is the [latex]x[/latex]-intercept of the tangent line to [latex]f[/latex] at [latex]x_1[/latex]. Therefore, [latex]x_2[/latex] satisfies the equation
In general, for [latex]n>0, \, x_n[/latex] satisfies
Next we see how to make use of this technique to approximate the root of the polynomial [latex]f(x)=x^3-3x+1[/latex].
Use Newton’s method to approximate a root of [latex]f(x)=x^3-3x+1[/latex] in the interval [latex][1,2][/latex]. Let [latex]x_0=2[/latex] and find [latex]x_1,x_2,x_3,x_4[/latex], and [latex]x_5[/latex].
From Figure 2, we see that [latex]f[/latex] has one root over the interval [latex](1,2)[/latex]. Therefore [latex]x_0=2[/latex] seems like a reasonable first approximation.
To find the next approximation, we use the equation we found for [latex]x_n[/latex]. Since [latex]f(x)=x^3-3x+1[/latex], the derivative is [latex]f^{\prime}(x)=3x^2-3[/latex]. Using the equation for [latex]x_n[/latex] with [latex]n=1[/latex] (and a calculator that displays 10 digits), we obtain
[latex]x_1=x_0-\dfrac{f(x_0)}{f^{\prime}(x_0)}=2-\dfrac{f(2)}{f^{\prime}(2)}=2-\dfrac{3}{9} \approx 1.666666667[/latex]
To find the next approximation, [latex]x_2[/latex], we use (Figure) with [latex]n=2[/latex] and the value of [latex]x_1[/latex] stored on the calculator. We find that
[latex]x_2=x_1=\dfrac{f(x_1)}{f^{\prime}(x_1)} \approx 1.548611111[/latex]
Continuing in this way, we obtain the following results:
[latex]\begin{array}{l} x_1 \approx 1.666666667 \\ x_2 \approx 1.548611111 \\ x_3 \approx 1.532390162 \\ x_4 \approx 1.532088989 \\ x_5 \approx 1.532088886 \\ x_6 \approx 1.532088886 \end{array}[/latex]
We note that we obtained the same value for [latex]x_5[/latex] and [latex]x_6[/latex]. Therefore, any subsequent application of Newton’s method will most likely give the same value for [latex]x_n[/latex].
Watch the following video to see the worked solution to the example above.
Letting [latex]x_0=0[/latex], use Newton’s method to approximate the root of [latex]f(x)=x^3-3x+1[/latex] over the interval [latex][0,1][/latex] by calculating [latex]x_1[/latex] and [latex]x_2[/latex].
Newton’s method can also be used to approximate square roots. Here we show how to approximate [latex]\sqrt{2}[/latex]. This method can be modified to approximate the square root of any positive number.
Use Newton’s method to approximate [latex]\sqrt{2}[/latex]. Let [latex]f(x)=x^2-2[/latex], let [latex]x_0=2[/latex], and calculate [latex]x_1,x_2,x_3,x_4,x_5[/latex].
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 [latex]F(x)=x-\left[\frac{f(x)}{f^{\prime}(x)}\right][/latex], we can rewrite the equation for[latex]x_n[/latex] as [latex]x_n=F(x_{n-1})[/latex]. This type of process, where each [latex]x_n[/latex] is defined in terms of [latex]x_{n-1}[/latex] 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.