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.6 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.4.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.4.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 .
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
This line crosses the -axis when , and the -value where it crosses is what we called . So let and replace with , giving the equation:
Now solve for :
Since we repeat the same geometric process to find from , we have
In general, given an approximation , we can find the next approximation, as follows:
We summarize this process as follows.
Let be a differentiable function on an interval with a root in . To approximate the value of the root, accurate to decimal places:
Choose a value as an initial approximation of the root. (This is often done by looking at a graph of .)
Create successive approximations iteratively; given an approximation , compute the next approximation as
Stop the iterations when successive approximations do not differ in the first places after the decimal point.
Watch the video:
Newton’s Method from https://youtu.be/1uN8cBGVpfs
Let’s practice Newton’s Method with a concrete example.
Approximate the real root of , accurate to the first 3 places after the decimal, using Newton’s Method and an initial approximation of .
SolutionTo begin, we compute . Then we apply the Newton’s Method algorithm, outlined in Key Idea 4.4.1.
We performed 5 iterations of Newton’s Method to find a root accurate to the first 3 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 3 decimal places.
A graph of is given in Figure 4.4.2. 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.
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
by entering the following and repeatedly press the Enter key:
Ans-(Ans^3-Ans^2-1)/(3*Ans^2-2*Ans)
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.
We can use a similar approach in most spreadsheet programs, which intelligently copy formulas. Start by entering 1
in cell A1. Then in cell A2, enter:
A1-(A1^3-A1^2-1)/(3*A1^2-2*A1)
Copy this cell, and paste it into A3. The spreadsheet will automatically change A1 to A2, giving you the next approximation. Continue pasting this into A4, A5, and so on. Each time we paste the formula, we are finding the successive approximations, and each one is getting closer to the root.
Using a calculator in this manner makes the calculations simple; many iterations can be computed very quickly.
Use Newton’s Method to approximate a solution to , accurate to 5 places after the decimal.
SolutionNewton’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.4.3, 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 , drawn with dashed lines. Note how they intersect at the same value as when .)
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 pressing 0.75, then Enter, inputting our initial approximation. We then enter:
Ans - (cos(Ans)-Ans)/(-sin(Ans)-1).
(In a spreadsheet, we would enter A1-(cos(A1)-A1)/(-sin(A1)-1) in A2.)
Repeatedly pressing the Enter key gives successive approximations. We quickly find:
Our approximations and did not differ for at least the first 5 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 4 iterations.
If you know how to program, you can translate the following pseudocode into your favorite language to perform the computation in this problem.
x = .75 while true oldx = x x = x - (cos(x)-x)/(-sin(x)-1) print x if abs(x-oldx) < .0000000001 break
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, .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.4.1 where we sought the root to . Choosing would have been a particularly poor choice. Consider Figure 4.4.4, 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.
We can also see analytically that it fails. Since
and , we see that is not well defined.
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.4.5. It is clear that the root is , but let’s approximate this with . Figure 4.4.5(a) shows graphically the calculation of ; notice how it is farther from the root than . Figures 4.4.5(b) and (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.)
There is no “fix” to this problem; Newton’s Method simply will not work and another method must be used.
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.
We first learned of the derivative in the context of instantaneous rates of change and slopes of tangent lines. We furthered our understanding of the power of the derivative by studying how it relates to the graph of a function (leading to ideas of increasing/decreasing and concavity). This chapter has put the derivative to yet more uses:
Related Rates (furthering our use of the derivative to find instantaneous rates of change)
Optimization (applied extreme values), and
Differentials (useful for various approximations and for something called integration).
Equation solving (Newton’s Method)
In the next chapters, we will consider the “reverse” problem to computing the derivative: given a function , can we find a function whose derivative is ? Being able to do so opens up an incredible world of mathematics and applications.
T/F: Given a function , Newton’s Method produces an exact solution to .
T/F: In order to get a solution to accurate to places after the decimal, at least iterations of Newton’s Method must be used.
In Exercises 3–8, the roots of are known or are easily found. Use 5 iterations of Newton’s Method with the given initial approximation to approximate the root. Compare it to the known value of the root.
,
,
,
,
,
,
In Exercises 9–12, use Newton’s Method to approximate all roots of the given functions accurate to 3 places after the decimal. If an interval is given, find only the roots that lie in that interval. Use technology to obtain good initial approximations.
on
on
In Exercises 13–16, 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.
,
,
,
, on
Why does Newton’s Method fail in finding a root of when ?
Why does Newton’s Method fail in finding a root of when ?
In Exercises 19–22, use Newton’s Method to approximate the given value.
.
.
.
.