Solving equations is one of the most important things we do in mathematics, yet we are surprisingly limited in what we can solve analytically. For instance, equations as simple as or cannot be solved by algebraic methods in terms of familiar functions. Fortunately, there are methods that can give us approximate solutions to equations like these. These methods can usually give an approximation correct to as many decimal places as we like. In Section 1.5 we learned about the Bisection Method. This section focuses on another technique (which generally works faster), called Newtonβs Method.
Newtonβs Method is built around tangent lines. The main idea is that if is sufficiently close to a root of , then the tangent line to the graph at will cross the -axis at a point closer to the root than .
We start Newtonβs Method with an initial guess about roughly where the root is. Call this . (See Figure 4.1.1.(a).) Draw the tangent line to the graph at and see where it meets the -axis. Call this point . Then repeat the process β draw the tangent line to the graph at and see where it meets the -axis. (See Figure 4.1.1.(b).) Call this point . Repeat the process again to get ,, etc. This sequence of points will often converge rather quickly to a root of .
ξ’
This graph depicts the iterations of Newtonβs method for finding the root of a function. The axis represents function values , while the axis represents iterations . The graph shows the initial guess and the subsequent approximation .
A tangent line is drawn from the point to intersect the axis at , providing a refined approximation of the functionβs root.
(a)
ξ’
The second graph has values on the axis,while the axis represents iterations . A tangent line is drawn from the point to intersect the axis and the new point is called .
(b)
ξ’
On the third graph, the axis has values , while the axis represents iterations . A tangent line is drawn from the point to intersect the x-axis and the new point is called .
We can use this geometric process to create an algebraic process. Letβs look at how we found . We started with the tangent line to the graph at . The slope of this tangent line is and the equation of the line is
Approximate the real root of , accurate to the first three places after the decimal, using Newtonβs Method and an initial approximation of .
Solution.
To begin, we compute . Then we apply the Newtonβs Method algorithm, outlined in Key Idea 4.1.2.
We performed five iterations of Newtonβs Method to find a root accurate to the first three places after the decimal; our final approximation is . The exact value of the root, to six decimal places, is ; It turns out that our is accurate to more than just three decimal places.
A graph of is given in Figure 4.1.4. We can see from the graph that our initial approximation of was not particularly accurate; a closer guess would have been . Our choice was based on ease of initial calculation, and shows that Newtonβs Method can be robust enough that we do not have to make a very accurate initial approximation.
ξ’
The axis represents function values , while the axis represents values of . The graph intersects the axis at and on axis and forms a curve.
We can automate this process on a calculator that has an ANS key that returns the result of the previous calculation. Start by pressing 1 and then Enter. (We have just entered our initial guess, .) Now compute
Each time we press the Enter key, we are finding the successive approximations, ,, β¦, and each one is getting closer to the root. In fact, once we get past around or so, the approximations donβt appear to be changing. They actually are changing, but the change is far enough to the right of the decimal point that it doesnβt show up on the calculatorβs display. When this happens, we can be pretty confident that we have found an accurate approximation.
Use Newtonβs Method to approximate a solution to , accurate to five places after the decimal.
Solution.
Newtonβs Method provides a method of solving ; it is not (directly) a method for solving equations like . However, this is not a problem; we can rewrite the latter equation as and then use Newtonβs Method.
So we rewrite as . Written this way, we are finding a root of . We compute . Next we need a starting value, . Consider Figure 4.1.6, where is graphed. It seems that is pretty close to the root, so we will use that as our . (The figure also shows the graphs of and . Note how they intersect at the same value as when .)
ξ’
The axis and axis both have values of . A broken line with equation crosses the origin. A second broken line depicts a downward parabola of equation , the parabola intersects the first line . A solid line from the point where on the axis to approximately on the axis demonstrates an approach to estimating the root of the equation .
Figure4.1.6.A graph of used to find an initial approximation of its root
We now compute ,, etc. The formula for is
.
Apply Newtonβs Method again to find :
.
We can continue this way, but it is really best to automate this process. On a calculator with an ANS key, we would start by entering 0.75, then Enter, inputting our initial approximation. We then enter:
ANS - (cos(ANS)-ANS)/(-sin(ANS)-1)
Repeatedly pressing the Enter key gives successive approximations. We quickly find:
.
Our approximations and did not differ for at least the first five places after the decimal, so we could have stopped. However, using our calculator in the manner described is easy, so finding was not hard. It is interesting to see how we found an approximation, accurate to as many decimal places as our calculator displays, in just four iterations.
This code calculates ,, etc., storing each result in the variable x. The previous approximation is stored in the variable oldx. We continue looping until the difference between two successive approximations, abs(x-oldx), is less than some small tolerance, in this case, 0.0000000001.
What should one use for the initial guess, ? Generally, the closer to the actual root the initial guess is, the better. However, some initial guesses should be avoided. For instance, consider Example 4.1.3 where we sought the root to . Choosing would have been a particularly poor choice. Consider Figure 4.1.7, where is graphed along with its tangent line at . Since , the tangent line is horizontal and does not intersect the -axis. Graphically, we see that Newtonβs Method fails.
ξ’
The axis represents function values , while the axis represents values of . The graph intersects the axis at and on the axis, and forms an βSβ shaped curve.
A horizontal tangent line is drawn at on the axis and 0 on the axis
This problem can also occur if, for instance, it turns out that . Adjusting the initial approximation by a very small amount will likely fix the problem.
It is also possible for Newtonβs Method to not converge while each successive approximation is well defined. Consider , as shown in Figure 4.1.8. It is clear that the root is , but letβs approximate this with .Figure 4.1.8.(a) shows graphically the calculation of ; notice how it is farther from the root than .Figure 4.1.8.(b) and Figure 4.1.8.(c) show the calculation of and , which are even farther away; our successive approximations are getting worse. (It turns out that in this particular example, each successive approximation is twice as far from the true answer as the previous approximation.)
ξ’
The axis represents function values , while the axis represents values of . The graph illustrates the cube root function, . It exhibits a curve that passes through the origin and extends into the positive and negative regions of the axis.
It starts with an initial guess . A tangent line is drawn at this point and intersects the axis at the next approximation, bringing it further from the root .
(a)
ξ’
The graph illustrates the cube root function, . It exhibits a curve that passes through the origin and extends into the positive and negative regions of the axis.
Here is twice as much as the initial guess bringing it more further from the root. A tangent line is drawn at this point and intersects the axis at the next approximation, .
(b)
ξ’
The graph illustrates the cube root function, . It exhibits a curve that passes through the origin and extends into the positive and negative regions of the axis.
Here is twice as much as the bringing it even more further from the root. A tangent line is drawn at this point and intersects the axis at the next approximation,.
Each successive approximation is twice as far from the true answer as the previous approximation. This shows that Newtonβs Method doesnβt work every time.
There is no βfixβ to this problem; Newtonβs Method simply will not work and another method must be used. (In this case the particular reason Newtonβs Method fails is that the tangent line is vertical at the root).
While Newtonβs Method does not always work, it does work βmost of the time,β and it is generally very fast. Once the approximations get close to the root, Newtonβs Method can as much as double the number of correct decimal places with each successive approximation. A course in Numerical Analysis will introduce the reader to more iterative root finding methods, as well as give greater detail about the strengths and weaknesses of Newtonβs Method.
The roots of the function are known or are easily found. Use five iterations of Newtonβs Method with the given initial approximation to approximate the root. Compare it to the known value of the root.
Use Newtonβs Method to approximate all roots of the given function accurate to three places after the decimal. If an interval is given, find only the roots that lie within that interval. Use technology to obtain good initial approximations.
Use Newtonβs Method to approximate when the given functions are equal, accurate to 3 places after the decimal. Use technology to obtain good initial approximations.