Newton's Method to solve high degree equations

Contributed by:
Sharp Tutor
In this section, we will learn:
How to solve high degree equations using Newton’s method.
1. 4
APPLICATIONS OF DIFFERENTIATION
2. APPLICATIONS OF DIFFERENTIATION
4.8
Newton’s Method
In this section, we will learn:
How to solve high degree equations
using Newton’s method.
3. Suppose that a car dealer offers to sell
you a car for $18,000 or for payments of
$375 per month for five years.
 You would like to know what monthly interest rate
the dealer is, in effect, charging you.
4. INTRODUCTION Equation 1
To find the answer, you have to solve
the equation
48x(1 + x)60 - (1 + x)60 + 1 = 0
 How would you solve such an equation?
5. HIGH-DEGREE POLYNOMIALS
For a quadratic equation ax2 + bx + c = 0,
there is a well-known formula for the roots.
For third- and fourth-degree equations,
there are also formulas for the roots.
 However, they are extremely complicated.
6. HIGH-DEGREE POLYNOMIALS
If f is a polynomial of
degree 5 or higher, there is
no such formula.
7. TRANSCENDENTAL EQUATIONS
Likewise, there is no formula that
will enable us to find the exact roots
of a transcendental equation such as
cos x = x.
8. APPROXIMATE SOLUTION
We can find an approximate solution
by plotting the left side of the equation.
 Using a graphing device, and after experimenting with
viewing rectangles, we produce the graph below.
9. ZOOMING IN
We see that, in addition to the solution
x = 0, which doesn’t interest us, there is
a solution between 0.007 and 0.008
 Zooming in shows
that the root is
approximately
0.0076
10. ZOOMING IN
If we need more accuracy, we could
zoom in repeatedly.
That becomes tiresome, though.
11. NUMERICAL ROOTFINDERS
A faster alternative is to use a
numerical rootfinder on a calculator
or computer algebra system.
 If we do so, we find that the root, correct to
nine decimal places, is 0.007628603
12. NUMERICAL ROOTFINDERS
How do those numerical rootfinders
 They use a variety of methods.
 Most, though, make some use of Newton’s method,
also called the Newton-Raphson method.
13. NEWTON’S METHOD
We will explain how the method works,
for two reasons:
 To show what happens inside a calculator or
computer
 As an application of the idea of linear approximation
14. NEWTON’S METHOD
The geometry behind Newton’s method
is shown here.
 The root that we
are trying to find
is labeled r.
15. NEWTON’S METHOD
We start with a first approximation x1,
which is obtained by one of the following
 Guessing
 A rough sketch
of the graph of f
 A computer-
generated graph
of f
16. NEWTON’S METHOD
Consider the tangent line L to the curve
y = f(x) at the point (x1,f(x1)) and look at
the x-intercept of L, labeled x2.
17. NEWTON’S METHOD
Here’s the idea behind the method.
 The tangent line is close to the curve.
 So, its x-intercept, x2 , is close to the x-intercept
of the curve
(namely, the root r
that we are seeking).
 As the tangent is
a line, we can easily
find its x-intercept.
18. NEWTON’S METHOD
To find a formula for x2 in terms of x1,
we use the fact that the slope of L is f’(x1).
So, its equation is:
y - f(x1) = f’(x1)(x - x1)
19. SECOND APPROXIMATION
As the x-intercept of L is x2, we set y = 0
and obtain: 0 - f(x1) = f’(x1)(x2 - x1)
If f’(x1) ≠ 0, we can solve this equation for x2:
f ( x1 )
x2 = x1 −
f '( x1 )
 We use x2 as a second approximation to r.
20. THIRD APPROXIMATION
Next, we repeat this procedure with x1
replaced by x2, using the tangent line at
 This gives a third approximation:
f ( x2 )
x3 = x2 −
f '( x2 )
21. SUCCESSIVE APPROXIMATIONS
If we keep repeating this process,
we obtain a sequence of approximations
x1, x2, x3, x4, . . .
22. SUBSEQUENT APPROXIMATION Equation/Formula 2
In general, if the nth approximation is xn and
f’(xn) ≠ 0, then the next approximation is
given by:
f ( xn )
xn +1 = xn −
f '( xn )
23. If the numbers xn become closer and
closer to r as n becomes large, then
we say that the sequence converges to r
and we write:
lim xn =r
n→ ∞
24. The sequence of successive approximations
converges to the desired root for functions of
the type illustrated in the previous figure.
However, in certain circumstances, it may
not converge.
25. Consider the situation shown here.
You can see that x2 is a worse approximation
than x1.
 This is likely to be
the case when
f’(x1) is close to 0.
26. It might even happen that an approximation
falls outside the domain of f, such as x3.
 Then, Newton’s method fails.
 In that case,
a better initial
approximation x1
should be chosen.
27. See Exercises 31–34 for specific
examples in which Newton’s method
works very slowly or does not work
at all.
28. NEWTON’S METHOD Example 1
Starting with x1 = 2, find the third
approximation x3 to the root of
the equation
x3 – 2x – 5 = 0
29. NEWTON’S METHOD Example 1
We apply Newton’s method with
f(x) = x3 – 2x – 5 and f’(x) = 3x2 – 2
 Newton himself used this equation to illustrate
his method.
 He chose x1 = 2 after some experimentation
because f(1) = -6, f(2) = -1 and f(3) = 16
30. NEWTON’S METHOD Example 1
Equation 2 becomes:
3
x −2 xn −5
n
xn + 1 = xn − 2
3xn −2
31. NEWTON’S METHOD Example 1
With n = 1, we have:
3
x −2 x1 −5
x2 = x1 − 1
2
3 x1 −2
3
2 −2(2) −5
=2 − 2
3(2) −2
=2.1
32. NEWTON’S METHOD Example 1
With n = 2, we obtain:
3
x −2 x2 −5
x3 = x2 − 2
2
3 x2 −2
3
2.1 −2(2.1) −5
=2.1 − 2
3(2.1) −2
≈2.0946
 It turns out that this third approximation x3 ≈ 2.0946
is accurate to four decimal places.
33. NEWTON’S METHOD
The figure shows the geometry behind the
first step in Newton’s method in the example.
 As f’(2) = 10, the tangent line to y = x3 - 2x - 5 at (2, -1)
has equation
y = 10x – 21
 So, its x-intercept
is x2 = 2.1
34. NEWTON’S METHOD
Suppose that we want to achieve a given
accuracy—say, to eight decimal places—
using Newton’s method.
 How do we know when to stop?
35. NEWTON’S METHOD
The rule of thumb that is generally used is that
we can stop when successive approximations
xn and xn+1 agree to eight decimal places.
 A precise statement concerning accuracy in the method
will be given in Exercise 37 in Section 11.11
36. ITERATIVE PROCESS
Notice that the procedure in going from n to
n + 1 is the same for all values of n.
It is called an iterative process.
 This means that the method is particularly convenient
for use with a programmable calculator or a computer.
37. NEWTON’S METHOD Example 2
6
Use Newton’s method to find 2 correct
to eight decimal places.
 First, we observe that finding 6 2 is equivalent to
finding the positive root of the equation x6 – 2 = 0
 So, we take f(x) = x6 – 2
 Then, f’(x) = 6x5
38. NEWTON’S METHOD Example 2
So, Formula 2 (Newton’s method)
6
x −2
n
xn +1 = xn − 5
6 xn
39. NEWTON’S METHOD Example 2
Choosing x1 = 1 as the initial approximation,
we obtain: x2 ≈1.16666667
x3 ≈1.12644368
x4 ≈1.12249707
x5 ≈1.12246205
x6 ≈1.12246205
 As x5 and x6 agree to eight decimal places, we
6
conclude that 2 ≈1.12246205 to eight decimal places.
40. NEWTON’S METHOD Example 3
Find, correct to six decimal places,
the root of the equation cos x = x.
 We rewrite the equation in standard form: cos x – x = 0
 Therefore, we let f(x) = cos x – x
 Then, f’(x) = –sinx – 1
41. NEWTON’S METHOD Example 3
So, Formula 2 becomes:
cos xn −xn
xn +1 = xn −
−sin xn −1
cos xn −xn
= xn +
sin xn + 1
42. NEWTON’S METHOD Example 3
To guess a suitable value for x1, we sketch
the graphs of y = cos x and y = x.
 It appears they intersect at a point whose x-coordinate
is somewhat less than 1.
43. NEWTON’S METHOD Example 3
So, let’s take x1 = 1 as a convenient first
 Then, remembering to put our calculator
in radian mode, we get: x2 ≈0.75036387
x3 ≈0.73911289
x4 ≈0.73908513
x5 ≈0.73908513
 As x4 and x5 agree to six decimal places (eight, in fact),
we conclude that the root of the equation, correct to
six decimal places, is 0.739085
44. NEWTON’S METHOD
Instead of using this rough sketch to get
a starting approximation for the method in
the example, we could have used the more
accurate graph that a calculator or computer
45. NEWTON’S METHOD
This figure suggests that we use
x1 = 0.75 as the initial approximation.
46. NEWTON’S METHOD
Then, Newton’s method gives:
x2 ≈0.73911114
x3 ≈0.73908513
x4 ≈0.73908513
 So we obtain the same answer as before—but
with one fewer step.
47. NEWTON’S METHOD VS. GRAPHING DEVICES
You might wonder why we bother at all
with Newton’s method if a graphing
device is available.
 Isn’t it easier to zoom in repeatedly and
find the roots as we did in Section 1.4?
48. NEWTON’S METHOD VS. GRAPHING DEVICES
If only one or two decimal places of accuracy
are required, then indeed the method is
inappropriate and a graphing device suffices.
However, if six or eight decimal places
are required, then repeated zooming
becomes tiresome.
49. NEWTON’S METHOD VS. GRAPHING DEVICES
It is usually faster and more efficient
to use a computer and the method in
 You start with the graphing device and finish
with the method.