Solution of Equations by Iteration

Slides:



Advertisements
Similar presentations
Roundoff and truncation errors
Advertisements

Mathematics1 Mathematics 1 Applied Informatics Štefan BEREŽNÝ.
Infinite Sequences and Series
Roots of Equations Open Methods (Part 2).
Ch 5.2: Series Solutions Near an Ordinary Point, Part I
Open Methods (Part 1) Fixed Point Iteration & Newton-Raphson Methods
APPLICATIONS OF DIFFERENTIATION Newton’s Method In this section, we will learn: How to solve high-degree equations using Newton’s method. APPLICATIONS.
Copyright © Cengage Learning. All rights reserved. 5 Integrals.
Roots of Equations Open Methods Second Term 05/06.
APPLICATIONS OF DIFFERENTIATION 4. In Sections 2.2 and 2.4, we investigated infinite limits and vertical asymptotes.  There, we let x approach a number.
Chapter 3 Root Finding.
Copyright © Cengage Learning. All rights reserved.
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
Copyright © Cengage Learning. All rights reserved. 6 Inverse Functions.
Copyright © Cengage Learning. All rights reserved. 4 Integrals.
Lecture 6 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
 As we saw in Section 2.1, the problem of finding the tangent line to a curve and the problem of finding the velocity of an object both involve finding.
Limits and Derivatives 2. Derivatives and Rates of Change 2.6.
Numerical Methods.
CHAPTER 3 NUMERICAL METHODS
Today’s class Roots of equation Finish up incremental search
linear  2.3 Newton’s Method ( Newton-Raphson Method ) 1/12 Chapter 2 Solutions of Equations in One Variable – Newton’s Method Idea: Linearize a nonlinear.
Copyright © Cengage Learning. All rights reserved. 2 Derivatives.
4 Numerical Methods Root Finding Secant Method Modified Secant
Lecture 39 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
Lecture 4 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
Copyright © Cengage Learning. All rights reserved The Integral Test and Estimates of Sums.
INTEGRALS 5. INTEGRALS In Chapter 3, we used the tangent and velocity problems to introduce the derivative—the central idea in differential calculus.
In this chapter, we explore some of the applications of the definite integral by using it to compute areas between curves, volumes of solids, and the work.
NUMERICAL ANALYSIS I. Introduction Numerical analysis is concerned with the process by which mathematical problems are solved by the operations.
CSE 330: Numerical Methods. Introduction The bisection and false position method require bracketing of the root by two guesses Such methods are called.
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
5 INTEGRALS.
5.3 Trigonometric Graphs.
1.1 Basic Concepts. Modeling
Trigonometric Identities
CHAPTER 3 NUMERICAL METHODS
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
CS B553: Algorithms for Optimization and Learning
Multiplicity of a Root First Modified Newton’s Method
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
Trigonometric Identities
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
Chapter 6.
Copyright © Cengage Learning. All rights reserved.
Ch 5.2: Series Solutions Near an Ordinary Point, Part I
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
2.6 Limits at Infinity; Horizontal Asymptotes
5.3 Trigonometric Graphs.
Copyright © Cengage Learning. All rights reserved.
The Fundamental Theorem of Calculus
Copyright © Cengage Learning. All rights reserved.
TECHNIQUES OF INTEGRATION
FP1: Chapter 2 Numerical Solutions of Equations
Copyright © Cengage Learning. All rights reserved.
Fixed- Point Iteration
Chapter 6.
Copyright © Cengage Learning. All rights reserved.
Derivatives of Inverse Functions
MATH 1910 Chapter 3 Section 8 Newton’s Method.
1 Newton’s Method.
EE, NCKU Tien-Hao Chang (Darby Chang)
Presentation transcript:

Solution of Equations by Iteration We begin with methods of finding solutions of a single equation (1) ƒ(x) = 0 where ƒ is a given function. A solution of (1) is a value x = s such that ƒ(s) = 0. 787

Fixed-Point Iteration In one way or another we transform (1) algebraically into the form (2) x = g(x). Then we choose an x0 and compute x1 = g(x0), x2 = g(x1), and in general (3) 787 continued

Indeed, some of them may not converge at all. A solution of (2) is called a fixed point of g, motivating the name of the method. This is a solution of (1), since from x = g(x) we can return to the original form ƒ(x) = 0. From (1) we may get several different forms of (2). The behavior of corresponding iterative sequences x0, x1, ‥‥ may differ, in particular, with respect to their speed of convergence. Indeed, some of them may not converge at all. 787

E X A M P L E 1 ƒ(x) = x2 – 3x + 1 = 0. We know the solutions are Solution. The equation may be written (4a) 788 continued

Function (4a) (1) If we choose x0 = 1, we obtain the sequence which seems to approach the smaller solution. (2) If we choose x0 = 2, the situation is similar. (3) If we choose x0 = 3, we obtain the sequence which diverges. 788 continued

Function (4b) Our equation may also be written (divide by x) (4b) (1) If we choose x0 = 1, we obtain the sequence which seems to approach the larger solution. (2) If we choose x0 = 3, we obtain the sequence 788 continued

Observations Our figures show the following. In the lower part of Fig. 423a the slope of g1(x) is less than the slope of y = x, which is 1, thus |g'1(x)| < 1, and we seem to have convergence. In the upper part, g1(x) is steeper (g'1(x) > 1) and we have divergence. In Fig. 423b the slope of g2(x) is less near the intersection point (x = 2.618, fixed point of g2, solution of ƒ(x) = 0), and both sequences seem to converge. From all this we conclude that convergence seems to depend on the fact that in a neighborhood of a solution the curve of g(x) is less steep than the straight line y = x, and we shall now see that this condition |g'(x)| < 1 (= slope of y = x) is sufficient for convergence. 788 continued

Fig. 423. Example 1, iterations (4a) and (4b) 788

Convergence of Fixed-Point Iteration THEOREM 1 Let x = s be a solution of x = g(x) and suppose that g has a continuous derivative in some interval J containing s. Then if |g'(x)|≤ K < 1 in J, the iteration process defined by (3) converges for any x0 in J, and the limit of the sequence {xn} is s. 789

E X A M P L E 2 ƒ(x) = x3 + x = 1 = 0 Solution. A sketch shows that a solution lies near x = 1. We may write the equation as (x2 + 1)x = 1 or for any x because 4x2/(1 + x2)4 = 4x2/(1 + 4x2 + ‥‥) < 1, so that by Theorem 1 we have convergence for any x0. Choosing x0 = 1, we obtain (Fig. 424 ) The solution is s = 0.682 328. 789 continued

The given equation may also be written and this is greater than 1 near the solution, so that we cannot apply Theorem 1 and assert convergence. Try x0 = 1, x0 = 0.5, x0 = 2 and see what happens. The example shows that the transformation of a given ƒ(x) = 0 into the form x = g(x) with g satisfying |g'(x)| ≤ K < 1 may need some experimentation. 789 continued

Fig. 424. Iteration in Example 2 790

Newton’s Method Newton’s method, also known as Newton–Raphson’s method, is another iteration method for solving equations ƒ(x) = 0, where ƒ is assumed to have a continuous derivative ƒ'. The underlying idea is that we approximate the graph of ƒ by suitable tangents. Using an approximate value x0 obtained from the graph of ƒ, we let x1 be the point of intersection of the x-axis and the tangent to the curve of ƒ at x0 (see Fig. 425). Then 790 continued

General Formula One can algebraically solve the approximated Taylor’s expansion (5) 790 continued

Fig. 425. Newton’s method 790

791 continued

Pseudo Code 791

E X A M P L E 3 Compute the square root x of a given positive number c and apply it to c = 2. Solution. We have x = , hence ƒ(x) = x2 – c = 0, ƒ'(x) = 2x, and (5) takes the form For c = 2, choosing x0 = 1, we obtain x4 is exact to 6D. 792

E X A M P L E 2 sin x = x Solution. Setting ƒ(x) = x – 2 sin x, we have ƒ'(x) = 1 – 2 cos x, and (5) gives 792 continued

From the graph of ƒ we conclude that the solution is near x0 = 2. We compute: x4 = 1.89549 is exact to 5D the exact solution to 6D is 1.895 494. 792

E X A M P L E 5 ƒ(x) = x3 + x – 1 = 0 Solution. From (5) we have Starting from x0 = 1, we obtain where x4 has the error –1 ۰ 10-6. A comparison with Example 2 shows that the present convergence is much more rapid. 792

Difficulties in Newton’s Method Difficulties may arise if |ƒ'(x)| is very small near a solution s of ƒ(x) = 0. Geometrically, small |ƒ'(x)| means that the tangent of ƒ(x) near s almost coincides with the x-axis (so that double precision may be needed to get ƒ(x) and ƒ'(x) accurately enough). In this case we call the equation ƒ(x) = 0 ill-conditioned. 794 continued

E X A M P L E 6 An Ill-Conditioned Equation ƒ(x) = x5 + 10-4x = 0 is ill-conditioned. x = 0 is a solution. ƒ'(0) = 10-4 is small. At s = 0.1 the residual ƒ(0.1) = 2 ۰ 10-5 is small, but the error –0.1 is larger in absolute value by a factor 5000. Invent a more drastic example of your own. 794

Secant Method Newton’s method is very powerful but has the disadvantage that the derivative ƒ' may sometimes be a far more difficult expression than ƒ itself and its evaluation therefore computationally expensive. This situation suggests the idea of replacing the derivative with the difference quotient 794 continued

Fig. 426. Secant method 795

Then instead of (5) we have the formula of the popular secant method (10) 795 continued

We need two starting values x0 and x1. Geometrically, we intersect the x-axis at xn+1 with the secant of ƒ(x) passing through Pn-1 and Pn in Fig. 426. We need two starting values x0 and x1. Evaluation of derivatives is now avoided. It can be shown that convergence is almost like Newton’s method. The algorithm is similar to that of Newton’s method. 795

E X A M P L E 8 Secant Method Solve ƒ(x) = x – 2 sin x = 0 by the secant method, starting from x0 = 2, x1 = 1.9. Solution. Here, (10) is 795 continued

x3 = 1.895 494 is exact to 6D. See Example 4. Numerical values are: x3 = 1.895 494 is exact to 6D. See Example 4. 795