Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 2 Roots of Equations Why? But.

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
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
Chapter 4 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).
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Martin Mendez UASLP Chapter 61 Unit II.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 181 Interpolation Chapter 18 Estimation of intermediate.
Systems of Non-Linear Equations
Open Methods Chapter 6 The Islamic University of Gaza
Zeros of Polynomial Functions
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 181 Interpolation.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Interpolation Chapter 18.
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.
Bracketing Methods Chapter 5 The Islamic University of Gaza
Roots of Equations Open Methods Second Term 05/06.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 171 Least.
Upper and Lower Bounds for Roots
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Linear Algebraic Equations ~ Gauss Elimination Chapter.
Chapter 4 Roots of Polynomials.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Numerical Differentiation and Integration Part 6 Calculus.
Roots of Equations Chapter 3. Roots of Equations Also called “zeroes” of the equation –A value x such that f(x) = 0 Extremely important in applications.
Solving Non-Linear Equations (Root Finding)
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
Copyright © 2014, 2010 Pearson Education, Inc. Chapter 2 Polynomials and Rational Functions Copyright © 2014, 2010 Pearson Education, Inc.
Lecture 8 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
Lecture 3 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Roots of Equations ~ Open Methods Chapter 6 Credit:
1 Nonlinear Equations Jyun-Ming Chen. 2 Contents Bisection False Position Newton Quasi-Newton Inverse Interpolation Method Comparison.
Lecture 6 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 71.
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.
Zeros of Polynomials 2.5.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Roots of Equations ~ Bracketing Methods Chapter 5.
Newton’s Method, Root Finding with MATLAB and Excel
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
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)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Applied Numerical Methods With MATLAB ® for Engineers.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 27.
4 Numerical Methods Root Finding Secant Method Modified Secant
SOLVING NONLINEAR EQUATIONS. SECANT METHOD MATH-415 Numerical Analysis 1.
4 Numerical Methods Root Finding.
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.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 2 / Chapter 5.
Chapter 11 Polynomial Functions
Part 2 Chapter 6 Roots: Open Methods
Chapter 6.
Part 2 / Chapter 5.
Numerical Analysis Lecture 7.
Chapter 27.
Computers in Civil Engineering 53:081 Spring 2003
Roots of Polynomials Chapter 7 The Islamic University of Gaza
Chapter 6.
Part 2 Chapter 6 Roots: Open Methods
1 Newton’s Method.
Presentation transcript:

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 2 Roots of Equations Why? But

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 2

3 Nonlinear Equation Solvers Bracketing Bisection False Position (Regula-Falsi ) GraphicalOpen Methods Newton Raphson Secant All Iterative

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 Chapter 5 Bracketing Methods (Or, two point methods for finding roots) Two initial guesses for the root are required. These guesses must “bracket” or be on either side of the root. == > Fig. 5.1 If one root of a real and continuous function, f(x)=0, is bounded by values x=x l, x =x u then f(x l ). f(x u ) <0. ( The function changes sign on opposite sides of the root )

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 5 Figure 5.2

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 6 Figure 5.3

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 7 The Bisection Method For the arbitrary equation of one variable, f(x)=0 1.Pick x l and x u such that they bound the root of interest, check if f(x l ).f(x u ) <0. 2.Estimate the root by evaluating f[(x l +x u )/2]. 3.Find the pair If f(x l ). f[(x l +x u )/2]<0, root lies in the lower interval, then x u =(x l +x u )/2 and go to step 2.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 8 If f(x l ). f[(x l +x u )/2]>0, root lies in the upper interval, then x l = [(x l +x u )/2, go to step 2. If f(x l ). f[(x l +x u )/2]=0, then root is (x l +x u )/2 and terminate. 4.Compare  s with  a (5.2, p. 118) 5.If  a <  s, stop. Otherwise repeat the process.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 10 Evaluation of Method Pros Easy Always find root Number of iterations required to attain an absolute error can be computed a priori. Cons Slow Know a and b that bound root Multiple roots No account is taken of f(x l ) and f(x u ), if f(x l ) is closer to zero, it is likely that root is closer to x l.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 11 How Many Iterations will It Take? Length of the first IntervalL o =b-a After 1 iterationL 1 =L o /2 After 2 iterationsL 2 =L o /4 After k iterationsL k =L o /2 k

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 12 If the absolute magnitude of the error is and L o =2, how many iterations will you have to do to get the required accuracy = in the solution?

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 13 The False-Position Method (Regula-Falsi) If a real root is bounded by x l and x u of f(x)=0, then we can approximate the solution by doing a linear interpolation between the points [x l, f(x l )] and [x u, f(x u )] to find the x r value such that l(x r )=0, l(x) is the linear approximation of f(x). == > Fig. 5.12

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 14 Procedure 1.Find a pair of values of x, x l and x u such that f l =f(x l ) 0. 2.Estimate the value of the root from the following formula (Refer to Box 5.1) and evaluate f(x r ).

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display Use the new point to replace one of the original points, keeping the two points on opposite sides of the x axis. Use the same selecting rules as the bisection method. If f(x r )=0 then you have found the root and need go no further.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display See if the new x l and x u are close enough for convergence to be declared. If they are not go back to step 2. Why this method? –Usually faster –Always converges for a single root.  See Sec.5.3.1, Pitfalls of the False-Position Method Note: Always check by substituting estimated root in the original equation to determine whether f(x r ) ≈ 0. One-sidedness: Watch out (p. 128)

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 18 Chapter 6 Open Methods Open methods are based on formulas that require only a single starting value of x or two starting values that do not necessarily bracket the root. Figure 6.1

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 19 Simple Fixed-point Iteration Bracketing methods are “convergent”. Fixed-point methods may sometime “diverge”, depending on the stating point (initial guess) and how the function behaves. Good for calculators. Rearrange the function so that x is on the left side of the equation:

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 20 Example:

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 22

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 23 Convergence x=g(x) can be expressed as a pair of equations: y 1 =x y 2 =g(x) (component equations) Plot them separately. Figure 6.2

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 24 Conclusion Fixed-point iteration converges if When the method converges, the error is roughly proportional to or less than the error of the previous step, therefore it is called “linearly convergent.”

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 25 Newton-Raphson Method Most widely used method. Based on Taylor series expansion: Newton-Raphson formula Solve for

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 26 A convenient method for functions whose derivatives can be evaluated analytically. It may not be convenient for functions whose derivatives cannot be evaluated analytically. Fig. 6.5

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 27 Fig. 6.6

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 28 The Secant Method A slight variation of Newton’s method for functions whose derivatives are difficult to evaluate. For these cases the derivative can be approximated by a backward finite divided difference.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 29 Requires two initial estimates of x, e.g, x o, x 1. However, because f(x) is not required to change signs between estimates, it is not classified as a “bracketing” method. The scant method has the same properties as Newton’s method. Convergence is not guaranteed for all x o, f(x). Fig. 6.7

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 30 Fig. 6.8

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 31 Multiple Roots None of the methods deal with multiple roots efficiently, however, one way to deal with problems is as follows: This function has roots at all the same locations as the original function

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 32 Fig. 6.10

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 33 “Multiple root” corresponds to a point where a function is tangent to the x axis. Difficulties –Function does not change sign at the multiple root, therefore, cannot use bracketing methods. –Both f(x) and f′(x)=0, division by zero with Newton’s and Secant methods.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 34 Systems of Linear Equations

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 35 Taylor series expansion of a function of more than one variable The root of the equation occurs at the value of x and y where u i+1 and v i+1 equal to zero.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 36 A set of two linear equations with two unknowns that can be solved for.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 37 Determinant of the Jacobian of the system.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 38 Chapter 7 Roots of Polynomials The roots of polynomials such as Follow these rules: 1.For an nth order equation, there are n real or complex roots. 2.If n is odd, there is at least one real root. 3.If complex root exist in conjugate pairs (that is, +  i and -  i), where i=sqrt(-1).

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 39 Conventional Methods The efficacy of bracketing and open methods depends on whether the problem being solved involves complex roots. If only real roots exist, these methods could be used. However, – Finding good initial guesses complicates both the open and bracketing methods, also the open methods could be susceptible to divergence. Special methods have been developed to find the real and complex roots of polynomials – Müller and Bairstow methods.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 40 Müller Method Müller’s method obtains a root estimate by projecting a parabola to the x axis through three function values. Figure 7.3

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 41 Müller Method The method consists of deriving the coefficients of parabola that goes through the three points: 1. Write the equation in a convenient form:

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display The parabola should intersect the three points [x o, f(x o )], [x 1, f(x 1 )], [x 2, f(x 2 )]. The coefficients of the polynomial can be estimated by substituting three points to give 3.Three equations can be solved for three unknowns, a, b, c. Since two of the terms in the 3 rd equation are zero, it can be immediately solved for c=f(x 2 ).

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 43 Solved for a and b

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 44 Roots can be found by applying an alternative form of quadratic formula: The error can be calculated as ±term yields two roots, the sign is chosen to agree with b. This will result in a largest denominator, and will give root estimate that is closest to x 2.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 45 Once x 3 is determined, the process is repeated using the following guidelines: 1.If only real roots are being located, choose the two original points that are nearest the new root estimate, x 3. 2.If both real and complex roots are estimated, employ a sequential approach just like in secant method, x 1, x 2, and x 3 to replace x o, x 1, and x 2.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 46 Bairstow’s Method Bairstow’s method is an iterative approach loosely related to both Müller and Newton Raphson methods. It is based on dividing a polynomial by a factor x-t:

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 47 To permit the evaluation of complex roots, Bairstow’s method divides the polynomial by a quadratic factor x 2 -rx-s:

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 48 For the remainder to be zero, b o and b 1 must be zero. However, it is unlikely that our initial guesses at the values of r and s will lead to this result, a systematic approach can be used to modify our guesses so that b o and b 1 approach to zero. Using a similar approach to Newton Raphson method, both b o and b 1 can be expanded as function of both r and s in Taylor series.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 49

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 50 If partial derivatives of the b’s can be determined, then the two equations can be solved simultaneously for the two unknowns  r and  b. Partial derivatives can be obtained by a synthetic division of the b’s in a similar fashion the b’s themselves are derived:

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 51 Then At each step the error can be estimated as Solved for  r and  s, in turn are employed to improve the initial guesses.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 52 The values of the roots are determined by At this point three possibilities exist: 1.The quotient is a third-order polynomial or greater. The previous values of r and s serve as initial guesses and Bairstow’s method is applied to the quotient to evaluate new r and s values. 2.The quotient is quadratic. The remaining two roots are evaluated directly, using the above eqn. 3.The quotient is a 1 st order polynomial. The remaining single root can be evaluated simply as x=-s/r. Refer to Tables pt2.3 and pt2.4