0% found this document useful (0 votes)
59 views

Newton Raphson

The document discusses Newton's method, a technique for finding successively better approximations to the roots of a function. It begins by explaining the geometric interpretation of Newton's method and deriving the iterative formula. It then provides an example of using Newton's method to find the root of x^3 + x - 1 = 0. The document further explains that Newton's method exhibits quadratic convergence, meaning the error decreases quadratically at each step. It proves this property and discusses an example where Newton's method instead exhibits only linear convergence.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

Newton Raphson

The document discusses Newton's method, a technique for finding successively better approximations to the roots of a function. It begins by explaining the geometric interpretation of Newton's method and deriving the iterative formula. It then provides an example of using Newton's method to find the root of x^3 + x - 1 = 0. The document further explains that Newton's method exhibits quadratic convergence, meaning the error decreases quadratically at each step. It proves this property and discusses an example where Newton's method instead exhibits only linear convergence.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

2.

Solution of algebraic and


transcendental equations
Class 05: Numerical analysis
Dr. Josept David Revuelta Acosta
2.5. Newton-Raphson Method
Newton’s Method, also called the Newton–Raphson Method, usually converges
much faster than the linearly convergent methods we have seen previously. The
geometric picture of Newton’s Method is shown in figure below. To find a root of
f(x) = 0, a starting guess x0 is given, and the tangent line to the function f at x0 is
drawn. The tangent line will approximately follow the function down to the x-axis
toward the root. The intersection point of the line with the x-axis is an approximate
root, but probably not exact if f curves. Therefore, this step is iterated.

Figure 1. One step of Newton’s method. Starting with x0, the tangent line to the curve f(x) is
drawn. The intersection point with the x-axis is x1,the next approximation to the root.
From the geometric picture, we can developed an algebraic formula for
Newton’s method. The tangent line at x0 has slope given by the derivative
f′(x0). One point on the tangent is (x0, f(x0)). The point-slope formula for the
equation of a line is

y − f(x0) = f′(x0)(x − x0)

So that looking for the intersection point of the tangent line with the x-axis is the
same as substituting y = 0 in the line:

f′(x0)(x − x0) = 0 − f(x0)

f(x0)
x − x0 = −
f′(x0)

f(x0)
x = x0 −
f′(x0)
Solving for x gives an approximation for the root, which we call x1. Next, the entire
process is repeated, beginning with x1, to produce x2, and so on, yielding the
following iterative formula:

Newton’s method

x0 = initial guess

f(xi)
xi+1 = xi − For i = 0,1,2,3...
f′(xi)

Example. Find the Newton’s Method formula for the equation x 3 + x − 1 = 0.

Since f′(x) = 3x 2 + 1, the formula is given by:

xi3 + xi − 1 2xi3 + 1
xi+1 = xi − = 2
3xi + 1
2 3xi + 1
Iterating this formula from initial guess x0 = − 0.7 yields

2x03 + 1 2(−0.7)3 + 1
x1 = 2 = ≈ 0.1271
3x0 + 1 3(−0.7) + 1
2

2x13 + 1
x2 = 2 ≈ 0.9577
3x1 + 1

These steps are shown geometrically in the following figure:


Further steps are calculated as follow:

i xi ei = |xi-r| ei/e2i-1

0 -0.70000000 1.38232780

1 0.12712551 0.55520230 0.29055555

2 0.95767812 0.27535032 0.89327066

3 0.73482779 0.05249999 0.69244945

4 0.68459177 0.00226397 0.82139415

5 0.68233217 0.00000437 0.85266556

6 0.68232780 0.00000000 0.85407269

7 0.68232780 0.00000000

After only six steps, the root is known to eight correct digits. There is a bit more we
can say about the error and how fast it becomes small. Note in the table that once
convergence starts to take hold, the number of correct places in xi approximately
doubles on each iteration. This is characteristic of “quadratically convergent’’
methods, as we shall see next.
Quadratic convergence of Newton’s Method

The convergence in the previous example is qualitatively faster than the linear
convergence we have seen for the Bisection Method and Fixed-Point Iteration.

Let ei denote the error after step i of an iterative method. The iteration is
quadratically convergent if

ei+1
M = lim <∞
i→∞ ei2

Let f be twice continuously differentiable and f(r) = 0. If f′(r) ≠ 0, then


Newton’s method is locally and quadratically convergent to r. The error ei at
step i satisfies
ei+1
lim =M
i→∞ ei2

where
f′′(r)
M=
2f′(r)
Proof. To prove local convergence, note that Newton’s Method is particular form
of Fixed-Point Iteration, where

f(x)
g(x) = x −
f′(x)
with derivative

f′(x)2 − f(x)f′′(x) f(x)f′′(x)


g′(x) = 1 − =
f′(x)2 f′(x)2

Since g′(r) = 0, Newton’s Method is locally convergent since it converges to r


for initial guesses sufficiently close to r.

To prove quadratic convergence, we can see Newton’s method from a difference


perspective. This time keeping a close eye on the error at each step. By error, we
mean the difference between the correr root and the current best guess. Taylor’s
formula tells us the difference between the values of a function at a given point and
another nearby point.
For the two points, we will use the root r and the current guess xi after i steps,
and we will stop and take a reminder after two terms:

(r − xi)2
f(r) = f(xi) + (r − xi)f′(xi) + f′′(ci)
2
Here ci is between xi and r. Because r is the root, we have
(r − xi)2
0 = f(xi) + (r − xi)f′(xi) + f′′(ci)
2

f(xi) (r − xi)2 f′′(ci)


− = r − xi +
f′(xi) 2 f′(xi)

assuming that f′(xi) ≠ 0. With some rearranging, we can compare the next
iterate with the root:
f(xi) (r − xi)2 f′′(ci)
xi − −r =
f′(xi) 2 f′(xi)
f′′(ci)
xi+1 − r = ei2
2f′(xi)

f′′(ci)
ei+1 = ei2
2f′(xi)
In the previous equation, we have defined the error at step i to be ei = xi − r .
Since ci lies between r and xi, it converges to r just as xi does, and

ei+1 f′′(r)
lim =
i→∞ ei2 2f′(r)

the definition of quadratic convergence. The error formula can be viewed as:

ei+1 ≈ Mei2

where M = | f′′(r)/2f′(r) | , under the assumption that f′(r) ≠ 0. The approximation


gets better as Newton’s method converges, since the guesses xi move forward r,
and because ci is caught between xi and r. This error formula should be compared
with ei+1 ≈ Sei for the linear convergent methods, where S = | g′(r) | for FPI and
S = 1/2 for bisection.
Linear convergence of Newton’s method
0
The previous theorem does not say i xi ei=|xi-r| ei/ei-1
that Newton’s Method always 0 1 1.00000000
converges quadratically. Recall that 1 0.5000 0.50000000 0.5
we needed to divide by f′(r) for the 2 0.2500 0.25000000 0.5
quadratic convergence argument to
3 0.1250 0.12500000 0.5
make sense. This assumption turns
out to be crucial. The following 4 0.0625 0.06250000 0.5
example shows an instance where 5 0.0313 0.03125000 0.5
Newton’s Method does not converge 6 0.0156 0.01562500 0.5
quadratically: 7 0.0078 0.00781250 0.5
8 0.0039 0.00390625 0.5
Use Newton’s method to find a 9 0.0020 0.00195313 0.5
root of f(x) = x 2. 10 0.0010 0.00097656 0.5
11 0.0005 0.00048828 0.5
f(xi) 12 0.0002 0.00024414 0.5
xi+1 = xi −
f′(xi) 13 0.0001 0.00012207 0.5
14 0.0001 0.00006104 0.5
xi2 xi
xi+1 = xi − xi+1 = 15 0.0000 0.00003052 0.5
2xi 2 16 0.0000 0.00001526
A similar result exists for x m for any positive integer m, as in next example shows.

Use Newton’s method to find a root of f(x) = xm

The Newton formula is:

m
xi
xi+1 = xi −
mxim−1
m−1
xi+1 = xi
m
Here the only root is r = 0, so defining ei = | xi − r | = xi yields

ei+1 = Sei
where S = (m − 1)/m
Example 01. Find the multiplicity of the root r = 0 of
f(x) = sin x + x 2 cos x − x 2 − x and estimate the number of steps of Newton’s
Method required to converge within six correct places (use x0 = 1).

f(x) = sin x + x 2 cos x − x 2 − x

f′(x) = cos x + 2x cos x − x 2 sin x − 2x − 1

f′′(x) = − sin x + 2 cos x − 4x sin x − x 2 cos x − 2

f′′′(x) = − cos x − 6 sin x − 6x cos x + x 2 sin x


Evaluating the function and its derivation in zero, we see that they are all zero but
the last one. So that the multiplicity is m = 3. Then, Newton should converge
linearly with ei+1 ≈ 2ei /3.
A rough approximation to the number of steps needed to the error within six
decimal places, or smaller than 0.5 × 10−6, can be found by solving

(3)
2
< 0.5 × 10−6

log10(0.5) − 6
n> ≈ 35.78
log10(2/3)
See example 3 in EXCEL!

In the multiplicity of a root is know in advance, convergence of Newton’s


method can be improved with a small modification.

Theorem: if f is (m + 1)-times continuously differentiable on [a, b], which


contains a root r of multiplicity m > 1, the the Modified Newton’s Method is

mf(xi)
xi+1 = xi −
f′(xi)
Example 2. Apply Newton’s method to f(x) = 4x 4 − 6x 2 − 11/4 with starting
guess x0 = 1/2.

11
4xi4 − 6xi2 − 4
xi+1 = xi −
16xi3 − 12xi

See example 4 in EXCEL!


Exercises

1. Find a positive root of x 2 + 2x − 2 = 0, by the Newton-Raphson method, correct to two


significant digits.
2. Find the positive root of the equation x = 2 sin x.
3. Using the Newton’s method, compute a negative root of the equation
f(x) = x 4 − 3x 2 + 75x − 10000 = 0, correct to five places.
4. Find a positive root of x + log x − 2 = 0, by the Netwton-Raphson method, correct to six
decimal figures.
5. Find a positive root of x − e −x = 0, by the Newton-Raphson method, correct to six decimal
figures.
6. Each equation has one root. Use Newton’s method to approximate the root to eight correct
decimal places. (a) x 3 = 2x + 2 (b) e x + x = 7 (c)e x + sin x = 4.
7. Each equation has one real root. Use Newton’s Method to approximate the root to eight correct
decimal places. (a) x 5 + x = 1 (b) sin x = 6x + 5 (c) ln x + x 2 = 3.
8. Apply Newton’s Method to find the only root to as much accuracy as possible, and find the root’s
multiplicity. Then use Modified Newton’s Method to converge to the root quadratically. (a)
f(x) = 27x 3 + 54x 2 + 36x + 8 (b) f(x) = 36x 4 − 12x 3 + 37x 2 − 12x + 1

You might also like