###### Calculus Of One Real Variable – By Pheng Kim Ving Chapter 8: Applications Of The Derivative Part 2 – Section 8.5: Approximations Of Roots Of Functions Newton's Method

8.5
Approximations Of Roots Of Functions – Newton's Method

 1.  Newton's Method

A root of a function f is a point x0 in dom( f ) such that f(x0) = 0. It's a solution or root of the equation f(x) = 0, ie, a
point where the graph of f intersects the x-axis. It's also called a zero of f. Let f be a differentiable function and suppose
f has a root. Newton's method is used to find a sequence of approximations a1, a2, a3, ... to the root that approaches the
root (ie, an is closer to the root than an–1 is). The idea is as follows.

Refer to Fig. 1.1. Guess a1. The tangent line to f at a1 intersects the x-axis at a2. The tangent line to f at a2 intersects the
x-axis at a3. And so on. This process can be repeated over and over to get closer and closer to the root. The equation of Fig. 1.1   f(x0) = 0, sequence a1, a2, a3, ... approaches x0.

the tangent  line at a1 is y = f(a1) + f '(a1)(x a1). Since (a2, 0) is on that line, we have 0 = f(a1) + f '(a1)(a2 a1), so: In general, since (an, 0) is on the tangent line at an–1, we have:  Thus: Recursion Formula

The formula an = an–1f (an–1)/f '(an–1) is a recursion formula. In mathematics, a recursion formula is one in which a
value in a sequence is calculated in terms of one or more previous values.

### Example 1.1

Let f(x) = x3 + x – 1.

a. Show that f has a root.
b. Use Newton's method to find an approximate value of that root accurate to 6 decimal places. You may use a calculator.

Solution

a. f(0) = –1 < 0 and f(1) = 1 > 0. So by the intermediate-value theorem f has a root x0, which is in (0, 1).

b. f(x) = x3 + x – 1, f '(x) = 3x2 + 1. Let's take the initial guess a1 = 0.5. Then: EOS

As f(0) = –1 < 0 and f(1) = 1 > 0, we have f(0) < 0 < f(1), so, as f is continuous, by the intermediate-value theorem
there exists c in (0, 1) such that f(c) = 0, ie f has a root in (0, 1).

We take the midpoint of the small interval in which the root is located as the initial guess.

The required accurate number of decimal places of the approximation is 6. In each calculation of an we should keep more
than 6 decimal places, for example 7 or 8, in order to get more accuracy in subsequent calculations and to see whether
the last an should be rounded up or down to be used as the answer. In this example we keep 8. In general if the required
accurate number of decimal places is k, you should keep k or k + 1 decimal places in the calculations of the an's and
round the last one to get an approximate value of the root x0.

The approximations stabilize at 6 decimal places after 5 iterations. So we're confident that they approach a limit, which
is a root x0 of f. Thus we're confident that the root x0 of f is approximately 0.682328 rounded up and accurate to 6
decimal places.

a5 and a6 have the same value up to at least 6 decimal places. We say that the approximations stabilize at 6 decimal
places at a5. We then stop and use the rounded value of a6 as the approximate value of the root. In general the
approximations stabilize when 2 consecutive an's have the same value up to at least the required accurate number of
decimal places. We then stop and use the rounded value of the last an as the approximate value of the root. Yes we use
the rounded value of the last an, say am, not that of the previous am–1, as am and am–1 may have different digits after the
required accurate number of decimal places. Note that in our example a6 and a5 have the same value up to at least 8
decimal places.

 2.  Solving The Equation f (x) = 0

The equation x5 = 20 – 7x3 can be expressed as x5 + 7x3 – 20 = 0. The latter is of the form f(x) = 0 where f(x) = x5 +
7x3 – 20. In general an equation in an unknown x can always be expressed in the form f(x) = 0 by moving everything to
the left-hand side. The solutions of for example the equation x5 = 20 – 7x3 are the same as those of the equation x5 +
7x3 – 20 = 0 and thus are the same as the roots of the function f(x) = x5 + 7x3 – 20. Mathematics is often used to
determine a quantity by finding an equation that the quantity satisfies and then solving the equation. In algebra we
learned to solve simple equations such as x2 – 2x – 3 = 0. However we didn't learn to solve equations such as x5 + 7x3
20 = 0, which should be regarded as quite simple too. In the example below we'll utilize Newton's method to solve the
equation x5 = 20 – 7x3.

#### Example 2.1

Utilize Newton's method to solve the equation x5 = 20 – 7x3 with the solution or solutions accurate to 8 decimal places.
You many need a calculator.

Solution EOS

To solve an equation we must find all of its solutions if they exist. If there's a unique solution then we must show this
uniqueness

As f(1) = –12 < 0 and f(2) = 68 > 0, we have f(1) < 0 < f(2), so, as f is continuous, by the intermediate-value theorem
there exists c in (1, 2) such that f(c) = 0, ie f has a root in (1, 2).

 3.  Approximations Of Roots Of Numbers discussed in Section 8.3. Newton's method can also be used to approximate such roots.

#### Example 3.1 Solution EOS

#### Remarks 3.1 4.  Newton's Method Doesn't Always Work

Newton's method doesn't always work. For example, as seen in Fig. 4.1, the choice of a1 as shown causes the sequence
{an} to move farther away from x0 rather than closer to it. In this case the sequence {an} diverges to infinity. For another
example, as seen in Fig. 4.2, the choice of a1 as shown causes the sequence {an} to oscillate between a1 and a2 without
converging to x0. Fig. 4.1   This choice of a1 causes sequence {an} to diverge to infinity rather than to converge to x0. Fig. 4.2   This choice of a1 causes sequence {an} to oscillate between a1 and a2 rather than to converge to x0.

Example 4.1

Let f(x) = x4 + 4x3 + 4x2x – 1.
a. Show that the equation f(x) = 0 has a solution in (–1, 0).
b. Attempt to use Newton's method to find a solution of f(x) = 0 starting with a1 = 0. What happens?

Solution
a. f(–1) = 1 > 0, f(0) =–1 < 0, so by the intermediate-value theorem there exists x0 in (–1, 0) such that f(x0) = 0, ie the
equation f(x) = 0 has a solution x0 in (–1, 0).

b. f(x) = x4 + 4x3 + 4x2x – 1, f '(x) = 4x3 + 12x2 + 8x – 1, a1 = 0, Thus the an's oscillate between –1 and 0 and consequently don't converge to x0.
EOS

Note that the x0 in this example can't be either –1 or 0. However even if it were either –1 or 0, we would still be correct
to say that the an's oscillate between –1 and 0 and don't converge to x0, because they don't converge to either –1 or 0.

 5.  Various Approximations

Section 8.3 discusses the approximation of values of functions using tangent-line approximation. Section 8.4 deals
with the approximation of errors in measurement. This section, Section 5.3.3, handles the approximation of roots of
functions utilizing Newton's method.

 Problems & Solutions

1. Let f(x) = xex.
a. Show that the function f has a root.
b. Use Newton's method to find an approximation of that root accurate to 6 decimal places. You may use a calculator.

Solution

a. f(0) = –1 < 0, f(1) = 1 – e–1 > 0, and f is continuous. So by the intermediate-value theorem f has root x0, which is in
(0, 1).

b. We have f '(x) = 1 + ex. Let the initial guess be a1 = 0.5. Then:  2. Utilize Newton's method to solve the equation 3t5 = 10t3 – 15t + 15 accurate to 10 decimal places. You may use a
calculator.

#### Solution   Solution  4. Let f(x) = 2x3 – 3x2x + 1.
a. Show that the equation f(x) = 0 has a solution in (0, 1).
b. Attempt to use Newton's method to find a solution of f(x) = 0 starting with a1 = 1. What happens?

##### Solution

a. f(0) = 1 > 0, f(1) = –1 < 0, so by the intermediate-value theorem there exists x0 in (0, 1) such that f(x0) = 0, ie the
equation f(x) = 0 has a solution x0 in (0, 1).

b. f(x) = 2x3 – 3x2x + 1, f '(x) = 6x2 – 6x – 1, a1 = 1, Thus the an's oscillate between 0 and 1 and consequently don't converge to x0.  Solution  