1 Solution of Nonlinear Equation Dr. Asaf Varol

Slides:



Advertisements
Similar presentations
Boyce/DiPrima 9th ed, Ch 2.4: Differences Between Linear and Nonlinear Equations Elementary Differential Equations and Boundary Value Problems, 9th edition,
Advertisements

Differential Equations Brannan Copyright © 2010 by John Wiley & Sons, Inc. All rights reserved. Chapter 08: Series Solutions of Second Order Linear Equations.
Lecture 5 Newton-Raphson Method
Roundoff and truncation errors
CSE 330: Numerical Methods
Chapter: 3c System of Linear Equations
Roots: Bracketing 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.
Regula-Falsi Method. Type of Algorithm (Equation Solver) The Regula-Falsi Method (sometimes called the False Position Method) is a method used to find.
Chapter: 3b System of Linear Equations
Open Methods Chapter 6 The Islamic University of Gaza
ECIV 201 Computational Methods for Civil Engineers Richard P. Ray, Ph.D., P.E. Error Analysis.
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.
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.
Open Methods (Part 1) Fixed Point Iteration & Newton-Raphson Methods
Chapter 1 Introduction The solutions of engineering problems can be obtained using analytical methods or numerical methods. Analytical differentiation.
Roots of Equations Bracketing Methods.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Martin Mendez UASLP Chapter 61 Unit II.
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.
NUMERICAL METHODS WITH C++ PROGRAMMING
Bracketing Methods Chapter 5 The Islamic University of Gaza
Fin500J: Mathematical Foundations in Finance Topic 3: Numerical Methods for Solving Non-linear Equations Philip H. Dybvig Reference: Numerical Methods.
1 Numerical Integration Dr. Asaf Varol
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.
Chapter 9 Numerical Integration Flow Charts, Loop Structures Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 6 Finding the Roots of Equations
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
Part 2 Chapter 5 Roots: Bracketing Methods PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
Integrals  In Chapter 2, we used the tangent and velocity problems to introduce the derivative—the central idea in differential calculus.  In much the.
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:
Boyce/DiPrima 9 th ed, Ch 5.1: Review of Power Series Elementary Differential Equations and Boundary Value Problems, 9 th edition, by William E. Boyce.
Scientific Computing Numerical Solution Of Ordinary Differential Equations - Euler’s Method.
Lecture 6 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
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 Solutions of ODE
Numerical Methods.
CHAPTER 3 NUMERICAL METHODS
Ch 2 1 Chapter 2 Kinematics in One Dimension Giancoli, PHYSICS,6/E © Electronically reproduced by permission of Pearson Education, Inc., Upper Saddle.
Introduction to computing
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 5 Bracketing Methods.
Solving Non-Linear Equations (Root Finding)
Numerical Methods Solution of Equation.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Applied Numerical Methods With MATLAB ® for Engineers.
Today’s class Numerical differentiation Roots of equation Bracketing methods Numerical Methods, Lecture 4 1 Prof. Jinbo Bi CSE, UConn.
Advanced Engineering Mathematics, 7 th Edition Peter V. O’Neil © 2012 Cengage Learning Engineering. All Rights Reserved. CHAPTER 4 Series Solutions.
1 Chapter: 3a System of Linear Equations Dr. Asaf Varol.
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.
Numerical Methods and Optimization C o u r s e 1 By Bharat R Chaudhari.
NUMERICAL ANALYSIS I. Introduction Numerical analysis is concerned with the process by which mathematical problems are solved by the operations.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 2 / Chapter 5.
Chapter: 3c System of Linear Equations
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
Numerical Integration
525602:Advanced Numerical Methods for ME
Chapter 6.
Computers in Civil Engineering 53:081 Spring 2003
Chapter 6.
Presentation transcript:

1 Solution of Nonlinear Equation Dr. Asaf Varol

2 Introduction Solutions to algebraic, differential, and integral equations relating certain physical parameters for a given problem Algebraic equations divided into two categories: (1) Linear and (2) Nonlinear Linear: an equation which contains the first power of the unknown, explicitly or implicitly, indicating a linear variation of the unknown parameter as a function of the other known parameters. Example: distance, s, traveled by an object which was originally at a location s = s 0 at time t = 0, and moving at constant speed, v, is related to time by s = s 0 + vt which is a linear relationship between s and v, and also between s and t since v is assumed not changing with time.

3 Introduction (Cont’d) Nonlinear: an equation involving variables which contains at least one term with an exponent other than unity and/or any explicit or implicit non- linear function of that particular parameter which we want to solve for. Example: Suppose that dv/dt = constant = a  0, i.e. there is a constant acceleration (or a body force such as gravity) acting on the object, then the relation between s and t becomes s = s 0 + v 0 t + (a/2)t 2 where v 0 is the initial speed. This equation has a nonlinear relationship between the distance, s, and the time, t, because it involves the square of the parameter t. Example: the following relation between the angle, , of a pendulum at time, t, is a nonlinear relation.  =  0 cos(  t) where  = (g/L) 1/2 is the frequency of the oscillations,  0 is the initial starting angle, g is the acceleration of the gravity, and L is the length of the connecting rod. This equation is nonlinear because the trigonometric function cos() is a nonlinear function.

4 Introduction (Cont’d) Case for an object with changing acceleration as a result of drag Case of motion of an object which was thrown vertically upward with an initial velocity of v 0 = 100 m/s; hence b 0 = -g = -9.8 m/s 2 ; let c = 0.1 (1/s) and s 0 = 0

5 Graphical Method and Scanning for t=-10:30 ft=(1-exp(-0.1*t)-0.05*t) plot(t,ft,'r*') hold on grid on end xlabel('t(sec)') ylabel('F(t)')

6 Graphical Method and Scanning (Cont’d) for t=-10:30 ft1=exp(-0.1*t) ft2=1-0.05*t plot(t,ft1,'r*',t,ft2,'b+') hold on end text(10,2.5,'* f(t)=exp(-0.1t)') text(10.,2.2,'+ f(t)=1-0.05t') xlabel('t(sec)') ylabel('F(t)')

7 Example E.2.1

8 Example E.2.2

9 Bisection Method Bisection is a systematic search technique for finding a zero of a continuous function. The method is based on first finding an interval in which a zero is known to occur because the function has opposite signs at the ends of the interval, then dividing the interval into two equal subintervals, and determining which subinterval contains a zero, and continuing the computations on the subinterval that contains the zero. Suppose that an interval [a, b] has been located which is known to contain a zero, since the function changes signs between a and b. The midpoint of the interval is m=(a+b)/2 and a zero must lie in either [a, m] or [m, b].

10 Bisection method The appropriate subinterval is determined by testing the function to see whether it changes sign on [a, m]. If so, the search continues on that interval; otherwise, it continues on the interval [m, b]. Figure illustrates the first approximation to the zero of the function Y=f(x)=x 2 -3, starting with the interval [1, 2] [2].

11 Example

12 Example (Cont’d) It is convenient to keep track of the calculations in tabular form.

13 Matlab program for Bisection Method

14 Results

15 Bisection Method ( sometimes does not work at all ) Bisection method frequently converges slowly and sometimes does not work at all.

16 Example E2.2.1

17 Example E2.2.3

18 Example E2.2.3 (Cont’d)

19 False-Position (Regula Falsi) Method False-Position (or Regula-Falsi) Method is similar to the bisection method, with a slight improvement in the convergence rate. Upper and lower bound of the root are used to locate a usually better estimate.

20 False-Position (Regula Falsi) Method (Cont’d)

21 False-Position Method (Cont’d) However, there are special cases where the false-position method does not give a better estimate than bisection method.

22 Matlab program for Regula Falsi

23 Results

24 Fixed-Point Iteration Method Simplest method for finding roots of nonlinear equations (also known as the “Simple Iteration Method”) Equations need to be of the form a = g(a) –Example: F(x) = x – ln (4 + x) = 0 can be rearranged to x = ln (4 + x) = f(x) General Iteration Procedure: x i+1 = f(x i )

25 Matlab program for fixed point Method

26 Diagram

27 Results

28 Newton-Raphson Method Newton-Raphson method can be derived using a Taylor series expansion about the point x = x i F(x i+1 ) = F(x i ) + F(x i )h + F  (x i )h 2 /2 + F  (x i )h 3 / where x i+1 is the next estimate to the root, and h = x i+1 - x i If the next iterate (x i+1 ) is approximately the root, then F(x i+1 ) 0 The Newton-Raphson method is obtained by truncating the Taylor series at the second term and solving for x i+1

29 Flow Diagram (Newton Raphson)

30 Newton-Raphson Method (Cont’d) Error - the error is determined from the leading truncation error of the Taylor series. where E i = x r - x i is the error in the previous iteration and E i+1 is the error in the current iteration Convergence - such that successive errors become smaller, the convergence of the method is sufficient that Since the error in the next iteration is proportional to the square of the error is the previous iteration, the Newton-Raphson method has quadratic convergence, and thus is a second-order method

31 Matlab Program for Newton-Raphson Method

32 Results for the Method of Newton-Raphson

33 End of Chapter 2a

34 References Celik, Ismail, B., “Introductory Numerical Methods for Engineering Applications”, Ararat Books & Publishing, LCC., Morgantown, 2001 Fausett, Laurene, V. “Numerical Methods, Algorithms and Applications”, Prentice Hall, 2003 by Pearson Education, Inc., Upper Saddle River, NJ Rao, Singiresu, S., “Applied Numerical Methods for Engineers and Scientists, 2002 Prentice Hall, Upper Saddle River, NJ Mathews, John, H.; Fink, Kurtis, D., “Numerical Methods Using MATLAB” Fourth Edition, 2004 Prentice Hall, Upper Saddle River, NJ Varol, A., “Sayisal Analiz (Numerical Analysis), in Turkish, Course notes, Firat University, 2001