tut 2s
tut 2s
Tutorial 2
1 Recall:
1. Bisection method:
The bisection algorithm is based on the intermediate value theorem:
Theorem 1 (Intermediate value theorem). Let f (x) be continuous on [a, b], then for any real number g that
lies between f (a) and f (b) there exists ζ ∈ [a, b] such that f (ζ) = g.
Assuming that f (x) is continuously differentiable up to second order near x = x∗ , we have the following
results:
Theorem 4 (Local convergence of Newton’s method). As long as the initial guess x0 is taken such that
|x0 − x∗ | ≤ δ, then all xk generated by the Newton’s method lie in the range |x − x∗ | ≤ δ.
Theorem 5 (Quadratic convergence of Newton’s method). The Newton’s method is a local convergence
iterative method, and it has quadratical convergence when the initial guess x0 is taken within the convergence
region.
1
2 Exercises:
1. * Please read the Lecture Notes for the bisection method and answer the questions.
Consider the following nonlinear equation:
f (x) = 0 x ∈ I, (1)
1
2. (a) Apply Newton’s method to the equation x − a = 0 to derive the following reciprocal algorithm:
2
1
(b) Use part (a) to compute the approximation value of 1/1.68 with initial guess x0 = 2 at the 3rd iteration.
Solution.
x0 = 0.5
x1 = 2x0 − ax20 = 0.58
x2 = 2x1 − ax21 = 0.594848
x3 = 2x2 − ax22 = 0.595238
√
3. (a) Apply Newton’s method to find a with a > 0 and m is a positive integer.
m
√
(b) Use part (a) to compute the approximation value of 3 2 with initial guess x0 = 1 at the 3rd iteration.
Solution.
f (x) := xm − a,
f 0 (x) = mxm−1 .
Newton’s method gives:
f (xn ) xm
n −a 1 a (m − 1)xm
n +a
xn+1 = xn − = xn − m−1 = 1 − x n + m−1 = m−1
f 0 (xn ) mxn m mxn mxn
x0 = 1
x1 = 1.333333
x2 = 1.263889
x3 = 1.259933
f (x) = 0.
3
(a) * Prove the local convergence of the Newton’s method applied to f to find the solution x∗ .
(b) * Conclude the assumptions that you made in your proof in (a).
(c) The choice of initial guess x0 is very important to the convergence of the Newton’s method. Try the
Newton’s method for the following special function f . Let the function f : [0, 10] → R be given by
x2 , if x ∈ [0, 2),
f (x) = 6 − x, if x ∈ [2, 3), (4)
3, if x ∈ [3, 10].
i. We first choose an initial guess 0 < x0 < 2. Does the Newton’s method work? Please prove your
claim.
ii. Now we choose an initial guess 2 < x0 < 3. Does the Newton’s method work? Please explain why
briefly.
(d) * Derive an iterative method to solve the nonlinear equation (4) based on the Taylor’s expansion up to
the second order approximation.
By the mean-value theorem, we can have the following error equation for ek :
4
x2n xn
(c) i. As x0 ∈ (0, 2), xn+1 = xn − 2xn = 2 , which implies that
1
xn = x0
2n
Thus the Newton’s method works.
ii. As x0 ∈ (2, 3), x1 = 6. Iteration stops as f 0 (x1 ) = 0.
(d) Given an initial guess x0 , the Taylor expansion yields
1
F (x) = f (x0 ) + f 0 (x0 )(x − x0 ) + f 00 (x0 )(x − x0 )2 ≈ f (x).
2
So instead of solving f (x) = 0, we can solve F (x) = 0. Solving the quadratic equation, we have
p
−f 0 (x0 ) ± (f 0 (x0 ))2 − 2f (x0 )f 00 (x0 )
x = x1 = x0 +
f 00 (x0 )
Obviously we need to assume the initial x0 is close enough such that 2f (x0 )f 00 (x0 ) ≤ (f 0 (x0 ))2 is
guaraneted. For the issue of the choice of the sign, we should indeed take the one which leaves us
closest to our current iteration. That is, we should choose the root such that xn+1 − xn is smaller in
magnitude. There are two reasons. The first is that another root may be far away from current xn or the
exact solution. The second one is that we hope to prevent our scheme to bounce back and forth during
iterations. In order to minimize the increment size we can choose the root such that it is opposite to
−f (x0 )0 . Therefore we have
p
f 0 (xn ) − sign(f 0 (xn )) (f 0 (xn ))2 − 2f (xn )f 00 (xn )
xn+1 = xn − .
f 00 (xn )
dsign(f 0 (x)) 0
1
φ(x∗ ) = 1 + 00 (f 00
(x)) 2
|f (x)| − 1 =0
(f (x))2 dx
Hence, there exists a neighborhood Bδ (x∗ ) of x∗ such that φ0 (x) ≤ 21 . Thus, the sequence {xn } locally
converges to x∗ .