Professional Documents
Culture Documents
Numerical Analysis: Lecture-4
Numerical Analysis: Lecture-4
Numerical Analysis
Lecture-4
February 7, 2020
Newton’s Method
Context
Newton’s method (or the Newton-Raphson) is one of the most
powerful and well-known numerical methods for solving a
root-finding problem..
Newton’s Method
Derivation
Suppose that f ∈ C 2 [a, b]. Let p0 ∈ [a, b] be an
approximation to p such that f 0 (p0 ) 6= 0 and |p − p0 | is
’“small”.
Consider the first Taylor polynomial for f (x) expanded about
p0 and evaluated at x = p.
(p − p0 )2 00
f (p) = f (p0 ) + (p − p0 )f 0 (p0 ) + f (ξ(p)),
2
where ξ(p) lies between p and p0 .
Since f (p) = 0, this equation gives
(p − p0 )2 00
0 = f (p0 ) + (p − p0 )f 0 (p0 ) + f (ξ(p)).
2
Dr. Ilyas Fakhir Numerical Analysis
4
Newton’s Method
(p − p0 )2 00
0 = f (p0 ) + (p − p0 )f 0 (p0 ) + f (ξ(p)).
2
Derivation (Contd...)
Newtons method is derived by assuming that since |p − p0 | is
small, the term involving (p − p0 )2 is much smaller, so
0 ≈ f (p0 ) + (p − p0 )f 0 (p0 ).
f (p0 )
p ≈ p0 − ≡ p1 .
f 0 (p0 )
Newton’s Method
f (p0 )
p ≈ p0 − ≡ p1 .
f 0 (p0 )
Newton’s Method
This sets the stage for Newton’s method, which starts with an
initial approximation p0 and generates the sequence {pn }∞
n=0 , by
f (pn−1 )
pn = pn−1 − for n ≥ 1
f 0 (pn−1 )
Newton’s Method
Newton’s Algorithm
To find a solution to f (x) = 0 given an initial approximation p0 :
1 Set i = 0;
2 While i ≤ N, do Step 3:
3.1 If f 0 (p0 ) = 0 then Step 5.
3.2 Set p = p0 − f (p0 )/f 0 (p0 );
3.3 If |p − p0 | < TOL then Step 6;
3.4 Set i = i + 1;
3.5 Set p0 = p;
4 Output a ‘failure to converge within the specified number of
iterations’ message & Stop;
5 Output an appropriate failure message (zero derivative) &
Stop;
6 Output p
Newton’s Methods
|pN − pN−1 |
< , pN 6= 0, or (2)
|pN |
|f (pN )| < (3)
Note that none of these inequalities give precise information
about the actual error |pN − p|.
Functional Iteration
Newton’s Method
f (pn−1 )
pn = pn−1 − for n ≥ 1
f 0 (pn−1 )
pn = g (pn−1 )
with
f (pn−1 )
g (pn−1 ) = pn−1 − for n ≥ 1
f 0 (pn−1 )
Newton’s Method
f (x) = cosx − x
To apply Newtons method to this problem we need
f 0 (x) = −sinx − 1
Newton’s Method
f (pn−1 )
pn = pn−1 −
f 0 (pn−1 )
p0 ∈ [p − δ, p + δ]