Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis

Slides:



Advertisements
Similar presentations
Chapter 6: Roots: Open Methods
Advertisements

Lecture 5 Newton-Raphson Method
Part 2 Chapter 6 Roots: Open Methods
Roundoff and truncation errors
CSE 330: Numerical Methods
Roots of Equations Our first real numerical method – Root finding
Open Methods Chapter 6 The Islamic University of Gaza
ROOTS OF EQUATIONS Student Notes ENGR 351 Numerical Methods for Engineers Southern Illinois University Carbondale College of Engineering Dr. L.R. Chevalier.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 61.
Open Methods Chapter 6 The Islamic University of Gaza
Open Methods Chapter 6 The Islamic University of Gaza
Open Methods.
Chapter 4 Roots of Equations
PHYS2020 NUMERICAL ALGORITHM NOTES ROOTS OF EQUATIONS.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 51.
Roots of Equations Open Methods (Part 2).
Chapter 6 Open Methods.
Special Matrices and Gauss-Siedel
A few words about convergence We have been looking at e a as our measure of convergence A more technical means of differentiating the speed of convergence.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 6 Roots of Equations Bracketing Methods.
Open Methods (Part 1) Fixed Point Iteration & Newton-Raphson Methods
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Martin Mendez UASLP Chapter 61 Unit II.
Special Matrices and Gauss-Siedel
Systems of Non-Linear Equations
Open Methods Chapter 6 The Islamic University of Gaza
Dr. Marco A. Arocha Aug,  “Roots” problems occur when some function f can be written in terms of one or more dependent variables x, where the.
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
Bracketing Methods Chapter 5 The Islamic University of Gaza
Roots of Equations Open Methods Second Term 05/06.
Least-Squares Regression
Solving Non-Linear Equations (Root Finding)
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 2 Roots of Equations Why? But.
Introduction This chapter gives you several methods which can be used to solve complicated equations to given levels of accuracy These are similar to.
Truncation Error and the Taylor Series
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Roots of Equations ~ Open Methods Chapter 6 Credit:
Lecture 6 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 7.
1 Solution of Nonlinear Equation Dr. Asaf Varol
Chapter 3 Roots of Equations. Objectives Understanding what roots problems are and where they occur in engineering and science Knowing how to determine.
Numerical Methods for Engineering MECN 3500
Numerical Methods.
Numerical Methods Root Finding 4. Fixed-Point Iteration---- Successive Approximation Many problems also take on the specialized form: g(x)=x, where we.
Applied Numerical Methods
Dr. Jie Zou PHY Chapter 2 Solution of Nonlinear Equations: Lecture (II)
Today’s class Roots of equation Finish up incremental search
MECN 3500 Inter - Bayamon Lecture 6 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
ROOTS OF EQUATIONS. Bracketing Methods The Bisection Method The False-Position Method Open Methods Simple Fixed-Point Iteration The Secant Method.
Lecture 5 - Single Variable Problems CVEN 302 June 12, 2002.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 7 Roots of Polynomials.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 5 Bracketing Methods.
Solving Non-Linear Equations (Root Finding)
Today’s class Numerical differentiation Roots of equation Bracketing methods Numerical Methods, Lecture 4 1 Prof. Jinbo Bi CSE, UConn.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 27.
4 Numerical Methods Root Finding Secant Method Modified Secant
4 Numerical Methods Root Finding.
1 Approximations and Round-Off Errors Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis Applied Numerical Method for Engineers Chapter.
CSE 330: Numerical Methods. What is true error? True error is the difference between the true value (also called the exact value) and the approximate.
1 Gauss-Seidel Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis Applied Numerical Method for Engineers Chapter 11.
CSE 330: Numerical Methods. Introduction The bisection and false position method require bracketing of the root by two guesses Such methods are called.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 2 / Chapter 5.
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
Chapter 18.
Part 2 Chapter 6 Roots: Open Methods
Chapter 6.
Chapter 27.
Metode Eliminasi Pertemuan – 4, 5, 6 Mata Kuliah : Analisis Numerik
Computers in Civil Engineering 53:081 Spring 2003
Chapter 6.
Part 2 Chapter 6 Roots: Open Methods
Presentation transcript:

Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis Chapter 6 Open Methods Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis Applied Numerical Method for Engineers

Review of previous method In the previous chapter, the root is located within an interval Lower bound Upper bound Repeated application if these methods always result in closer estimates of true value of the root These methods are said to be CONVERGENT because they move closer to the truth as computation progresses

Open Methods In contrast, the open methods are based on formulas that require only a single or two of x. Do not bracket the root. It is called as diverge or move away from the true root as the computation progresses. Fig (b) However, when it is converge (Fig. c), they do not so much more quickly than the bracketing method

Simple Fixed-Point Iteration This method also called as, simple fixed-point iteration, or one point iteration or successive substitution method Open methods employ formula to predict the root. The formula can be developed by rearranging the function f(x) = 0 so that x is on the left-hand side of the equation: Example: can be rearranged to:

Simple Fixed-Point Iteration The utility of is to provides a formula to predict a new value of x as function of an old value of x Thus given an initial guess at the root xi, it can be used to compute a new estimate xi+1 as expressed by the iterative formula: Thus the approximation error (as in the previous chapters) can be calculated as

Ex. 6.1 Simple Fixed-Point Iteration Use simple fixed-point iteration to locate the root of Solution The function can be separated directly and expressed in the form of With an initial guess of x0 =0, then the iterative equation can be calculated as

Ex. 6.1 Simple Fixed-Point Iteration an initial guess of x0 =0, true root: 0.56714329

Convergence Why this result can be called as convergence? Reading assignment: Read section 6.1.1 pp. 135

Ex. 6.2 Two-curve graphical method Separate the equation into two parts and determine its root graphically Solution Reformulate the equation as: and

In graphical methods The intersection of the two curves indicates a root estimate of approximately x =0.57

Exercise Use simple fixed-point iteration to locate the root of Use an initial guess of x0 = 0.5

Solution The first iteration is

Solution The remaining iterations are

The Newton-Raphson Methods The most widely used of all root-locating formula is the Newton-Raphson equation. If the initial guess at the root is xi, a tangent can be extended from the point [xi, f(xi)] The point where this tangent crosses the x axis usually represents an improved estimate of the root.

The Newton-Raphson Methods The Newton-Raphson method can be derived on the basis of this geometrical interpretation The first derivative at x is equivalent to the slope: which can be rearranged to yield

Ex. 6.3 Newton-Raphson Method Use the Newton-Raphson method to estimate the root of Employing an initial guess of x0 = 0 Solution The first derivative of the function can be evaluated as Which can be substituted along with the original function

Ex. 6.3 Newton-Raphson Method Starting with an initial guess of x0 = 0, this iterative equation can be applied to compute: The approach rapidly converges on the true root. Faster that by using simple fixed-point iteration

Termination Criteria and Error Estimates The approximate percent relative error can also be used as a termination criterion. Other criteria can also be obtained such as discussed in Example 6.4

Pitfalls of the Newton-Raphson Method Although the Newton-Raphson method is often very efficient, there are situations where it performs poorly. A special case – multiple roots – will be addressed later However, even when dealing with simple roots, difficulties can also arise, as in the following example

Ex. 6.5 Slowly Converging Function with Newton-Raphson Determine the positive root of f(x) = 1010-1 using the Newton-Raphson method and an initial guess of x = 0.5 Solution The Newton-Raphson formula for this case is Which can be used to compute:

Iteration results

Pitfalls of the Newton-Raphson Method

Pitfalls of the Newton-Raphson Method

The Secant Method A potential problem in implementing the Newton-Raphson method is the evaluation of the derivative. For polynomials and many other function this is not convenient There are certain function the derivative may be extremely difficult or inconvenient to evaluate

The Secant Method For these cases, the derivative can be approximated by a backward finite divided difference The secant method can be formulated as:

Graphical depiction of the secant method

Ex. 6.6 Use the secant method to estimate the root of f(x) = e-x – x. Start with the estimates of xi-1 = 0 and x0 = 1.0. Solution (true root = 0.56714329…) First iteration Xi-1 = 0 f(xi-1)=1.0 X0 = 1 f(x0) = -0.63212 Calculate t = 8.0%

Ex. 6.6 Solution (true root = 0.56714329…) Second iteration X0 = 1 f(x0)= - 0.63212 X1 = 0.61270 f(x1) = - 0.07081

Ex. 6.6 Solution (true root = 0.56714329…) Third iteration X0 = 0.61270 f(x1)= - 0.07081 X1 = 0.56384 f(x1) = 0.00518

Ex. 6.6x Use the secant method to estimate the root of f(x) = e-x – 2x. Start with the estimates of xi-1 = 0 and x0 = 1.0. Solution (true root = xxxx) First iteration Xi-1 = 0 f(xi-1)=xx X0 = 1 f(x0) = xxxx Calculate t = 8.0%

Next week Reading assignment: Read pp. 146 – 157 Read pp. 160 – 174

Quiz (60 Minutes) What do you know about mathematical model in solving engineering problem? (10 marks) Use zero through third order Taylor series expansions to predict f(2.5) for f(x) = ln x using a base point at x = 1. Compute the true percent relative error for each approximation. (15 marks) Determine the real root of f(x)= 5x3-5x2+6x-2 using bisection method. Employ initial guesses of xl = 0 and xu = 1. iterate until the estimated error a falls below a level of s = 15% (20 marks)

The difference between the Secant and False-Position Methods Similarity of Secant and False-Position Methods The approximate root equation are identical on a term by term basis Both of them use two initial estimates to compute an approximation of the slope. Critical difference: How in both methods the new estimate replaces the initial value False Position Method Secant Method 

The false-position method Ex. 6.7 Use the false-position and secant methods to estimate the root of f(x) = ln x. Start the computation with value of xl = xi-1 = 0.5 xu = xi = 5.0 Solution The false-position method The secant method

Modified Secant Method Original Secant Method Modified Secant Method

Ex. 6.8 Use the secant method to estimate the root of f(x) = e-x – x. Use a value of 0.01 for  and start with x0 = 1.0. Solution (true root = 0.56714329…) First iteration x0 = 1 f(x0) = -0.63212 x1+ x0 = 1.01 f(x1+ x0) = -0.64578 Calculate t = 5.3%

Ex. 6.8 Solution (true root = 0.56714329…) Second iteration x0 = 0.537263 f(x0) = -0.047083 x1+ x0 = 0.542635 f(x1+ x0) = -0.038579 Calculate t = 0.0236%

Ex. 6.8 Solution (true root = 0.56714329…) Third iteration x0 = 0.56701 f(x0) = 0.000209 x1+ x0 = 0.572680 f(x1+ x0) = -0.00867 Calculate t = 2.365x10-5 %

Multiple Roots

Multiple Roots

Modified Newton-Raphson A modifications have been proposed by Ralston and Rabinowitz (1978) Original Newton-Raphson Modified Newton-Raphson

Ex. 6.9 Original Newton-Raphson Use both the standard ad modified Newton-Raphson methods to evaluate the multiple root of f(x) = (x-3)(x-1)(x-1) with initial guess of x0 = 0. Solution (true value: 1.0) First derivative: f’(x) = 3x2 - 10x + 7 Second derivative f’’(x) = 6x - 10 Modified Newton-Raphson

Original Newton-Raphson Method

Modified Newton-Raphson Method

Ex. 6.9 For both methods to search for single root at x = 3 using initial guess of x0 = 4 Both methods converge quickly, with the standard method being somewhat more efficient

Modified secant method For multiple root secant method can be modified as:

System of Nonlinear Equations We have discussed on the determination of roots of single equation How about locating roots of a set of simultaneous equations Nonlinear equations is algebraic and transcendental equations that do not fit following format

By Fixed-Point Iteration Non linear equations: Two simultaneous nonlinear equation with two unknown, x and y.

6.10 Use fixed-point iteration to determine the root of Eq. (6.16). Note that a correct pair of roots is x = 2 and y = 3. Initiate the computation with guesses of the x = 1.5 and y = 3.5. Solution

6.10 Solution On the basis of the initial value x = 1.5 and y = 3.5

6.10 Solution On the basis of the initial value x = 1.5 and y = 3.5

6.10 Solution On the basis of the initial value x = 1.5 and y = 3.5

6.10

By Newton-Raphson

Assignment Solve problem 6.2