Professional Documents
Culture Documents
M KSU: Numerical Methods (MATH-254)
M KSU: Numerical Methods (MATH-254)
Fall 2021
Lecture No. 10 (M3 Newton’s Method)
Focus
SU
- Iterative formula of Newton’s Method
- Selected exercises
K
The method has the following steps.
I. Locate the root(s) of f (x) = 0 (if needed so), i.e., find an interval a ≤ x ≤ b
such that f (a) and f (b) have opposite signs, i.e., f (a) f (b) < 0. Take an ap-
M
propriate initial guess p0 ∈ [a, b] for the desired root.
f 0 (pN −1 )
Each iteration has the following steps.
Step 1: For the first iteration, take N = 1 in the above iterative formula.
This will yield the first approximation p1 of the desired root. Find f (p1 ).
r.
Step 2: If f (p1 ) = 0 .... you are lucky, p1 is the exact root of the equation.
D
IV. If the tolerance criteria is not satisfied, then take p1 as the new (initial)
guess and repeat the above 2 steps to get the second approximation p2 . Keep
repeating this process until you get the desired root or the stopping criteria
1
is satisfied.
SU
also some times called Method of Tangents.
K
Newton’s Iteration Function (Relation between the Newton’s Method
and Fixed-point Method): We can describe Newton’s method as a func-
tional iteration technique of the form pn = g(pn−1 ) where
M
g(pN −1 ) = pN −1 −
f (pN −1 )
f 0 (pN −1 )
, N ≥ 1.
ah
Example 2.23(R): Use Newton’s method to approximate, to within 10−4 ,
the value of x that produces the point on the graph of y = x2 that is closest
to (1, 0) using initial approximation x0 = 1.
Sh
1 + 3x2N
xN +1 = , N ≥ 0.
4 + x3N
0
Find f (xN ) and f (xN ) and then use the Newton’s method to find the ap-
proximation of the root accurate to 10−2 , starting with x0 = 0.5.
2
3 2
2 1
f(x)
1 0 g(x)
0 -1
f(x)
g(x)
-1 -2
-2 -3
-3 -4
-4 -5
-5 -6
SU
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
x x
(a) Graph of y = 2 sin x and y = ln x − 0.0568 (b) Graph of y = 2 sin x and y = ln x − 0.5
3
1
f(x)
K
g(x)
0
-1
-2
-3
-4
-5
0 1 2 3
M
4
k.
ah
x2N −1 − b
Sh
xN = , N ≥1
2xN −1 − a
3
with x0 = 2, apply Newton’s method and check the convergence of the se-
quence {xN }∞
N =1 .
SU
Advantages of Newton’s Method:
(i) Newton’s method usually converges very well and fast/quickly provided
the initial guess is sufficiently closed to the desired root.
K
(ii) Newton’s method is not restricted to just one-dimension. It can be ex-
tended/generalized to multiple dimensions (more variable cases). We will use
it for approximation of roots of systems of NL equations later in this chapter.
M
(iii) This method can be used to approximate both the real and imaginary
roots of the polynomial equations.
0
(iii) The method fails if f (pN −1 ) = 0, for some N ≥ 1.
4
Numerical Methods (MATH-254)
Lecture No. 11 (M4. Secant Method)
Focus
SU
- Selected exercises
K
I. Locate the root(s) of f (x) = 0 (if needed), i.e., find an interval a ≤ x ≤ b
such that f (a) and f (b) have opposite signs, i.e., f (a) f (b) < 0. Take any
two appropriate initial guesses p0 and p1 such that p0 6= p1 , for the desired
root.
Step 1: For the first iteration, take N = 2 in the above iterative formula.
This will yield the first approximation p2 of the desired root. Find f (p2 ).
r.
Step 2: If f (p2 ) = 0 .... you are lucky, p2 is the exact root of the equation.
STOP! If f (p2 ) 6= 0, then check the stopping criteria. If it is satisfied then
STOP. p2 is an approximation of the root as per specified accuracy. This
D
IV. If the stopping criteria is not specified, then take p1 and p2 as the new
(initial) guesses and repeat the above 2 steps to get the second approximation
p3 . Keep repeating this process until the stopping criteria is satisfied.
5
Remark: A simpler form of the iterative formula of Secant method ids given
by
pN −2 f (pN −1 ) − pN −1 f (pN −2 )
pN = , N ≥ 2.
f (pN −1 ) − f (pN −2 )
Geometric Interpretation of Successive Approximations from Se-
cant Method: The first approximation p2 of the root of f (x) = 0 is the x-
intercept of the Secant line connecting (p0 , f (p0 )) and (p1 , f (p1 )). The second
SU
approximation p3 of the root of f (x) = 0 is the x-intercept of the secant line
joining (p1 , f (p1 )) and (p2 , f (p2 )), and so on. For this analogy, this method
is called Secant Method.
K
Example 2.34(R) (The simplest question) Use the secant method to
find the approximate root of the equation x3 − 2x − 1 = 0 accurate to 10−2 .
Take initial approximations p0 = 1.5 and p1 = 2.
M
Example 2.32(R) Show that the iterative procedure for evaluating the re-
ciprocal of a number N by using the secant method is
the plane curves f (x) = x3 +2x−1 and g(x) = sin x lies between [0.5, 1]. Find
its approximate value by using Secant method, correct to 3 d.p. starting with
p0 = 0.5 and p1 = 0.55. Use RE as stopping criteria |xN|x+1N +1
−xN |
| < 10−3 = .
Hence, find the intersection point.
r.
6
Numerical Methods (MATH-254)
Lecture No. 12 (Multiple roots and the modified Newton’s Method)
Focus
SU
- First and Second Modified Newton’s Method
K
function h(x), such that f (x) can be expressed as
f (x) = (x − α)m h(x).
Then h(x) can be used to obtain the remaining roots of f (x) = 0. It is called
M
polynomial deflation. The following Lemma provides an easy practical pro-
cedure for determining the order of multiplicity of roots of a function.
0 00
Lemma 2.2R: Assume that function f (x) and its derivatives f (x), f (x), · · ·
ah
f (m) (x) are defined and continuous on an interval about x = α. Then
f (x) = 0 will have a root α of order m iff
0 00
f (α) = f (α) = f (α), · · · f (m−1) (α) = 0, and f (m) (α) 6= 0.
Sh
NL equation.
7
correct to 3 d.p., starting from x0 = 0.5.
(ii) Explain why one of the sequence converges much faster than the other to
the root p∗ = 0?
SU
100
1.6
80
1.4
60
1.2
40 1
20 0.8
0 0.6
K
-20 0.4
-40 0.2
0
-60
-0.2
-80
-0.4
-100
-6 -4 -2 0 2 4 6 0 0.5 1 1.5 2 2.5
x x
7
M (b) Graph of f (x) = x ln x − ln x
6
ah
5
4 f(x)
g(x)
3
-1
Sh
verge. Therefore, some modifications are made to maintain the rate of con-
vergence and to address the issue of divergence. The following two modified
versions of the Newton’s method addresses these issues.
8
imated by the first modified Newton’s method given by the iterative formula
f (xN −1 )
xN = xN −1 − m , N = 1, 2, 3, · · ·
f 0 (xN −1 )
SU
Newton’s formula for computing this root, then use it to find the second ap-
proximation starting with an initial approximation x0 = 0.5. Show that the
developed formula converges fast.
Example 2.41R: Show that x5 − 8x4 + 25x3 − 38x2 + 28x − 8 = 0 has a triple
K
root at α = 2. Write down the first modified Newton’s iterative formula for
this NL equation and approximate x3 using x0 = 2.3. Give answer correct to
3 d.p.
M
Exercise: Show that α = 1 is the multiple root of the nonlinear equation
1 = xe1−x . Use modified Newton’s method to find the second approximation
of the root by using x0 = 0.75. Compute RE.
ah
Second Modified Newton’s Method Suppose m is the multiplicity of a
root α of the NL equation f (x) = 0 and it is not known. Then the root
can be approximated by the second modified Newton’s method given by the
iterative formula
Sh
0
f (xN −1 )f (xN −1 )
xN = xN −1 − , N = 1, 2, 3, · · ·
(f 0 (xN −1 ))2 − f (xN −1 ) f 00 (xN −1 )
(x)
Example 2.42R: Find the multiplicity of the roots of the equation 1−cos x =
D
0. Use the Newton’s method and Newton’s first and second modified meth-
ods to find the first two approximations of the root α = 0 of the equation,
starting from x0 = 0.1 and correct upto 3 d.p. Discuss the answers you have
obtained from the 3 methods.
Example 2.43R: The equation x3 −5x2 +7x−3 = 0 has roots 1 and 3. Find
the multiplicity of these roots. Use Newton’s method and Newton’s first and
9
second modified methods to find the first two approximations of these roots,
starting from x0 = 4 for α1 = 3 and start from x0 = 0 for α1 = 1. Give
answers correct to 3 d.p.
SU
tional Iteration Schemes
∗∗
Last updated on September17, 2021
K
M
ah
Sh
r.
D
10