This preview shows pages 1–3. Sign up to view the full content.
6.006 Intro to Algorithms
Recitation 23
May 4, 2011
Newton’s Method
Newton’s method is a method that iteratively computes progressively better approximations to the
roots of a realvalued function
f
(
x
)
. Its input is an initial guess
x
0
and the function
f
(
x
)
. The
method goes as follows:
1. Given
x
0
and
f
(
x
)
, initialize
n
= 0
2. Compute
x
n
+1
=
x
n

f
(
x
n
)
f
0
(
x
n
)
3. Repeat step 2 until
f
(
x
n
)
is sufﬁciently close to a root of
f
(
x
)
.
An example of Newton’s method in action:
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document6.006 Intro to Algorithms
Recitation 23
May 4, 2011
Deriving Heron’s Method
Heron’s method (or the Babylonian method) is an algorithm that approximates
√
S
. We can inter
pret this problem as solving for the roots of the function
f
(
x
) =
x
2

S
. Since
p
(
S
)
is a zero for
this problem, we can apply Newton’s method to derive a method to solve for square roots.
In this particular case,
f
(
x
n
) =
x
2
n

S
and
f
0
(
x
n
) = 2
x
n
. Plugging this into Newton’s method,
we get the iterative step
This is the end of the preview. Sign up
to
access the rest of the document.
 Spring '11
 byrns
 Math, Approximation

Click to edit the document details