SOLVING EQUATIONS OF ONE VARIABLE

Similar documents
INTRODUCTION, FOUNDATIONS

Numerical Methods. Root Finding

MATH 3795 Lecture 12. Numerical Solution of Nonlinear Equations.

Finding Roots of Equations

Today s class. Numerical differentiation Roots of equation Bracketing methods. Numerical Methods, Fall 2011 Lecture 4. Prof. Jinbo Bi CSE, UConn

Nonlinear Equations. Chapter The Bisection Method

CHAPTER-II ROOTS OF EQUATIONS

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 4

INTRODUCTION TO NUMERICAL ANALYSIS

p 1 p 0 (p 1, f(p 1 )) (p 0, f(p 0 )) The geometric construction of p 2 for the se- cant method.

Chapter 6. Nonlinear Equations. 6.1 The Problem of Nonlinear Root-finding. 6.2 Rate of Convergence

NON-LINEAR ALGEBRAIC EQUATIONS Lec. 5.1: Nonlinear Equation in Single Variable

Root Finding (and Optimisation)

Scientific Computing. Roots of Equations

Solving Non-Linear Equations (Root Finding)

Bisection and False Position Dr. Marco A. Arocha Aug, 2014

Root Finding: Close Methods. Bisection and False Position Dr. Marco A. Arocha Aug, 2014

Solution of Algebric & Transcendental Equations

Finding the Roots of f(x) = 0. Gerald W. Recktenwald Department of Mechanical Engineering Portland State University

Finding the Roots of f(x) = 0

is the intuition: the derivative tells us the change in output y (from f(b)) in response to a change of input x at x = b.

Numerical Solution of f(x) = 0

Nonlinear Equations and Continuous Optimization

(a) Show that there is a root α of f (x) = 0 in the interval [1.2, 1.3]. (2)

CLASS NOTES Computational Methods for Engineering Applications I Spring 2015

TWO METHODS FOR OF EQUATIONS

Numerical Methods. Roots of Equations

by Martin Mendez, UASLP Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Numerical Methods Lecture 3

Solution of Nonlinear Equations

Finding roots. Lecture 4

CS 221 Lecture 9. Tuesday, 1 November 2011

SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS BISECTION METHOD

UNIT II SOLUTION OF NON-LINEAR AND SIMULTANEOUS LINEAR EQUATION

Exact and Approximate Numbers:

Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane.

BSM510 Numerical Analysis

APPLICATIONS OF DIFFERENTIATION

Practical Numerical Analysis: Sheet 3 Solutions

PART I Lecture Notes on Numerical Solution of Root Finding Problems MATH 435

Numerical Methods I Solving Nonlinear Equations

2.13 Linearization and Differentials

Topic 4b. Open Methods for Root Finding

Determining the Roots of Non-Linear Equations Part I

6.1 The function can be set up for fixed-point iteration by solving it for x

Numerical Analysis: Solving Nonlinear Equations

Applied Numerical Analysis

Root finding. Root finding problem. Root finding problem. Root finding problem. Notes. Eugeniy E. Mikhailov. Lecture 05. Notes

Numerical Methods Dr. Sanjeev Kumar Department of Mathematics Indian Institute of Technology Roorkee Lecture No 7 Regula Falsi and Secant Methods

Zeroes of Transcendental and Polynomial Equations. Bisection method, Regula-falsi method and Newton-Raphson method

Page No.1. MTH603-Numerical Analysis_ Muhammad Ishfaq

Mathematical Methods for Numerical Analysis and Optimization

Chapter 3: Root Finding. September 26, 2005

The Islamic University of Gaza Faculty of Engineering Civil Engineering Department. Numerical Analysis ECIV Chapter 5. Bracketing Methods

Roots of Equations. ITCS 4133/5133: Introduction to Numerical Methods 1 Roots of Equations

Hence a root lies between 1 and 2. Since f a is negative and f(x 0 ) is positive The root lies between a and x 0 i.e. 1 and 1.

Example - Newton-Raphson Method

NUMERICAL AND STATISTICAL COMPUTING (MCA-202-CR)

Iteration & Fixed Point

Root finding. Eugeniy E. Mikhailov. Lecture 06. The College of William & Mary. Eugeniy Mikhailov (W&M) Practical Computing Lecture 06 1 / 10

Math Numerical Analysis Mid-Term Test Solutions

Chapter 1. Root Finding Methods. 1.1 Bisection method

Scientific Computing. Roots of Equations

Numerical Analysis MTH603. Virtual University of Pakistan Knowledge beyond the boundaries

Variable. Peter W. White Fall 2018 / Numerical Analysis. Department of Mathematics Tarleton State University

SOLVING QUADRATICS. Copyright - Kramzil Pty Ltd trading as Academic Teacher Resources

NUMERICAL METHODS FOR SOLVING EQUATIONS

2D1240 Numerical Methods II / André Jaun, NADA, KTH NADA

Order of convergence. MA3232 Numerical Analysis Week 3 Jack Carl Kiefer ( ) Question: How fast does x n

Linear Algebra II (finish from last time) Root finding

APPROXIMATION OF ROOTS OF EQUATIONS WITH A HAND-HELD CALCULATOR. Jay Villanueva Florida Memorial University Miami, FL

Root finding. Eugeniy E. Mikhailov. Lecture 05. The College of William & Mary. Eugeniy Mikhailov (W&M) Practical Computing Lecture 05 1 / 10

Numerical Analysis Fall. Roots: Open Methods

i nfoclearinghouse.com Solving Non-linear Equations with SCILAB Gilberto E. Urroz, Ph.D., P.E. Distributed by

Applied Mathematics Letters. Combined bracketing methods for solving nonlinear equations

Scientific Computing: An Introductory Survey

CS 323: Numerical Analysis and Computing

Numerical Analysis MTH603

5 Finding roots of equations

Nonlinearity Root-finding Bisection Fixed Point Iteration Newton s Method Secant Method Conclusion. Nonlinear Systems

Numerical solutions of nonlinear systems of equations

Chapter 4. Solution of a Single Nonlinear Algebraic Equation

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 5. Nonlinear Equations

Midterm Review. Igor Yanovsky (Math 151A TA)

Limits and Their Properties

Numerical Integration (Quadrature) Another application for our interpolation tools!

15 Nonlinear Equations and Zero-Finders

Chapter 4. Solution of Non-linear Equation. Module No. 1. Newton s Method to Solve Transcendental Equation

Limits and the derivative function. Limits and the derivative function

The stationary points will be the solutions of quadratic equation x

Goals for This Lecture:

Computational Methods CMSC/AMSC/MAPL 460. Solving nonlinear equations and zero finding. Finding zeroes of functions

R x n. 2 R We simplify this algebraically, obtaining 2x n x n 1 x n x n

Solutions of Equations in One Variable. Newton s Method

A BRIEF REVIEW OF ALGEBRA AND TRIGONOMETRY

MATH 3795 Lecture 13. Numerical Solution of Nonlinear Equations in R N.

BEKG 2452 NUMERICAL METHODS Solution of Nonlinear Equations

Study Guide and Intervention. The Quadratic Formula and the Discriminant. Quadratic Formula. Replace a with 1, b with -5, and c with -14.

THE SECANT METHOD. q(x) = a 0 + a 1 x. with

Motivation: We have already seen an example of a system of nonlinear equations when we studied Gaussian integration (p.8 of integration notes)

Transcription:

1 SOLVING EQUATIONS OF ONE VARIABLE ELM1222 Numerical Analysis Some of the contents are adopted from Laurene V. Fausett, Applied Numerical Analysis using MATLAB. Prentice Hall Inc., 1999

2 Today s lecture Bisection Method Regula Falsi and Secant Method Newton s Method Fied-Point Iteration Matlab Functions

3 Equations of one variable Finding the zeros of nonlinear functions has a long story Although the solution of quadratic equations of one variable is possible analytically numerical estimation of the zeros or the roots may be desired. If it is impossible or difficult to find an eact solution we should employ numerical techniques for finding roots or zeros of nonlinear equations.

4 Bisection Method y = 2 3 Bisection is a systematic search technique to find a zero of a cont. function. It is dividing the interval into 2 sub-intervals and determining which has the zero in it Here the mid-point is m = a+b 2 The zero can be in the range of either [a, m] or [m, b]

5 Bisection Method Eample 1: Approimate the/a zero of y = f( = 2 3 using Bisection method. Sol.: Since f 1 = 2 and f 2 = 1 we can search for a zero in [1,2]. 3 a = 1 1 3 4 5 2 b = 2 After k iterations the error can be at most b a 2 5

6 Bisection Method Eample 2. Approimate a/the zero of y = f method. = 3 3 2 + 1 using Bisection Sol.: Since f 0 = 1 and f 1 = 1 we can search for a zero in [0,1].

7 Bisection Method Stopping Criteria: Stop the iterations when The function (y i is close enough to zero The change in the succesive iterations is ( i or y i less than a tol value The ma number of iterations ma _iter has reached

Regula Falsi and Secant Methods 8 ELM1222 Numerical Analysis Dr Muharrem Mercimek The Regula Falsi and Secant methods start with two points, (a, f(a and (b, f(b, satisfying the condition that f a. f b < 0 The line through the initial two points a, f a, b, f b can be epressed as: The net approimation to the zero is the value of where the straight line through the initial points crosses the -ais (when y is zero ( ( ( ( b a b a f b f b f y ( ( ( b f a f b f a b b

9 Regula Falsi Method If there is a zero in the interval [a, ], we leave the value of a unchanged and set b =. On the other hand, if there is no zero in [a, ], the zero must be in the interval [, b]; so we set a = and leave b unchanged.

10 Regula Falsi Method Eample 3: Approimate a/the zero of y = f method. = 3 2 using Regula-Falsi Sol.: Since f 1 = 1 and f 2 = 6 we can search for a zero in [1,2]. Our first approimation to the zero is b b f ( b a f ( a 2 6 / 7 8/ 7 1.1429 2 1 f ( b 2 6 6 1 We then find the value of the function: y f ( (8/ 7 3 2 0.5073 Since f(a and y are both negative, but y and f(b have opposite signs

11 Regula Falsi Method Stop the iterations when The function (y i is close enough to zero The change ( i or y i in the succesive iterations is less than a tol value The ma number of iterations ma _iter has reached

12 Secant Method The secant method, closely related to the Regula Falsi method. Instead of choosing the subinterval that must contain the zero, we form the net approimation from the two most recently generated points: At the k-th stage, the new approimation to the zero is kucg.korea.ac.kr 1 0 2 1 y1 y1 y0 k1 k y k k y k1 k1 y k Stopping Criteria: Stop the iterations when The function (y i is close enough to zero The change ( i or y i in the succesive iterations is less than a tol value The ma number of iterations ma _iter has reached

13 Secant Method Eample 4: Approimate the/a zero of y = f( = 2 3 using Secant method. Sol.: Since f 1 = 2 and f 2 = 1 we can search for a zero in [1,2]. 1 0 2 1 1 0 2 1 1 y1 2 (1 y y 1 ( 2 2 1 0 5 3 1.667

14 Newton s Method Like the Regula Falsi and Secant Methods Newton s Method uses a straight line approimation but in this case the line is tangent to the function. f ( f '( 0( 0 f ( 0 When f( 1 = 0 1 k1 0 k f ( f '( 0 0 f ( f '( k k

15 Newton s Method Eample 5: Approimate a/the zero of y = f method. = 4 2 3 using Newton s Sol.: Since f(0 = 3 and f(1 = 1 we can start with 0.5 f ( 4 2 3 f '( 8 1 f ( 0 2 0 0.5 1 f '( 4 0 f ( 1 1 2 1 1.0 7 /8 0.875 f '( 8 1 Stopping Criteria: Stop the iteration when The function (y i is close enough to zero The change ( i or y i in the succesive iterations is less than a tol value The ma number of iterations ma _iter has been reached

16 Oscillations in Newton s Method Newton s method give Oscillatory result for some funtions & initial estimates. 3 2 E f ( 3 3 kucg.korea.ac.kr

17 Fied Point Iteration Method A zero finding problem f = 0 can be converted to solving = g( Solution of equation = g( is investigated Rewrite the equation y = f = 5 3 10 + 3 as an implicit equation 5 3 10 + 3 = 0, = 0.5 3 0.3 = g( Starting with initial guess 0 Evaluate the function up to an iteration number or until the update is so small 1 = 0.5( 0 3 + 3 k = 0.5( k 1 3 + 0.3

18 Fied Point Iteration Method Convergence Theorem of fied-point iteration Not all g( functions converge to a good solution 1- For interval [a, b] of if g( maps values to a, b 2- If g is continuous in a, b 3- if there is a number N < 1 such that g N Then = g( has one solution and k = g( k 1 converges to for any starting point in [a, b] Stopping Criteria: Stop the iterations when The function (y i is close enough to zero The change ( i or y i in the succesive iterations is less than a tol value The ma number of iterations ma _iter has reached kucg.korea.ac.kr 18

19 Fied Point Iteration Method Eample 6: For problem y = f( = cos ( using a helper function g Check if g( may converge. = cos Condition checks: If is in [0,1] g( will be in [0,1] ( is given in term of radians = sin ( is continuous g ( = 0,85 1 g Then = cos ( has one solution and k = g( k 1 converges to for any starting point in [0,1] kucg.korea.ac.kr 19

20 Matlab s Methods roots(p outputs the roots of a polynomial p is a vector Eample 7: find the roots of 3 7 2 + 14 7 p=[1-7 14-7]; roots(p ans = 3.8019 2.445 0.75302 kucg.korea.ac.kr

21 Matlab s Methods fzero( function name,0 function name: string 0 : initial estimate of the root Eample 8: find the roots of 10 0.5; func=@( ^10-0.5 func = @(^10-0.5 fzero(func,0.5 ans = 0.9330 kucg.korea.ac.kr