Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)

Slides:



Advertisements
Similar presentations
Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)
Advertisements

EE, NCKU Tien-Hao Chang (Darby Chang)
Lecture 5 Newton-Raphson Method
CSE 330: Numerical Methods
Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)
Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)
Regula-Falsi Method. Type of Algorithm (Equation Solver) The Regula-Falsi Method (sometimes called the False Position Method) is a method used to find.
Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)
Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)
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).
CSCE Finding Roots of Equations This is a fundamental computational problem Several methods exist. We will look at the bisection method and at Newton’s.
Second Term 05/061 Roots of Equations Bracketing Methods.
Roots of Equations Bracketing Methods.
Revision.
Root-Finding Algorithm Bisection method Suppose we want to solve the equation f(x) = 0. Given two points a and b such that f(a) and f(b) have opposite.
Lectures on Numerical Methods 1 Numerical Methods Charudatt Kadolkar Copyright 2000 © Charudatt Kadolkar.
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
Roots of Equations Open Methods Second Term 05/06.
FP1: Chapter 2 Numerical Solutions of Equations
Fin500J: Mathematical Foundations in Finance Topic 3: Numerical Methods for Solving Non-linear Equations Philip H. Dybvig Reference: Numerical Methods.
- + Suppose f(x) is a continuous function of x within interval [a, b]. f(a) = - ive and f(b) = + ive There exist at least a number p in [a, b] with f(p)
Chapter 3 Root Finding.
Section 5.5 – The Real Zeros of a Rational Function
Theorems on continuous functions. Weierstrass’ theorem Let f(x) be a continuous function over a closed bounded interval [a,b] Then f(x) has at least one.
Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)
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.
Scientific Computing Algorithm Convergence and Root Finding Methods.
Solving Non-Linear Equations (Root Finding)
Continuity ( Section 1.8) Alex Karassev. Definition A function f is continuous at a number a if Thus, we can use direct substitution to compute the limit.
Lecture 3 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
1 Nonlinear Equations Jyun-Ming Chen. 2 Contents Bisection False Position Newton Quasi-Newton Inverse Interpolation Method Comparison.
In section 11.9, we were able to find power series representations for a certain restricted class of functions. Here, we investigate more general problems.
Problem of the Day No calculator! What is the instantaneous rate of change at x = 2 of f(x) = x2 - 2 ? x - 1 A) -2 C) 1/2 E) 6 B) 1/6 D) 2.
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.
Newton’s Method, Root Finding with MATLAB and Excel
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)
MAT 4725 Numerical Analysis Section 2.1 The Bisection Method
Solution of Nonlinear Equations Topic: Bisection method
Numerical Methods Solution of Equation.
Sullivan PreCalculus Section 3.6 Real Zeros of a Polynomial Function Objectives Use the Remainder and Factor Theorems Use Descartes’ Rule of Signs Use.
Sullivan Algebra and Trigonometry: Section 5.2 Objectives Use the Remainder and Factor Theorems Use Descartes’ Rule of Signs Use the Rational Zeros Theorem.
Section 4.2 Rolle’s Theorem & Mean Value Theorem Calculus Winter, 2010.
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.
1 M 277 (60 h) Mathematics for Computer Sciences Bibliography  Discrete Mathematics and its applications, Kenneth H. Rosen  Numerical Analysis, Richard.
MATH342: Numerical Analysis Sunjae Kim.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 2 / Chapter 5.
Solution of Nonlinear Equations ( Root Finding Problems )
Numerical Methods and Analysis
3.7 The Real Zeros of a Polynomial Function
Newton’s Method for Systems of Non Linear Equations
Read Chapters 5 and 6 of the textbook
3.7 The Real Zeros of a Polynomial Function
Important Values for Continuous functions
Intermediate Value Theorem
SOLUTION OF NONLINEAR EQUATIONS
Intermediate Value Theorem
Sec:5.2 The Bisection Method.
Copyright © Cengage Learning. All rights reserved.
MATH 1910 Chapter 3 Section 8 Newton’s Method.
EE, NCKU Tien-Hao Chang (Darby Chang)
Presentation transcript:

Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)

In the previous slide Error (motivation) Floating point number system –difference to real number system –problem of roundoff Introduced/propagated error Focus on numerical methods –three bugs 2

Any Questions? 3 About the exercise?

In this slide Rootfinding –multiplicity Bisection method –Intermediate Value Theorem –convergence measures False position –yet another simple enclosure method –advantage and disadvantage in comparison with bisection method 4

Rootfinding 5 Given a function f, find a x such that f(x)=0

6 Is a rootfinding problem

7

8

9

Multiplicity 10

Definition 11

Multiplicity for polynomials For polynomials, multiplicity can be determined by factoring the polynomial That’s easy, but 12

For non-polynomials What about this f(x)=0, where Clearly, f(0)=0, so the f(x) has a root at x=0 But what is the multiplicity of this root? – f(0)=f’(0)=f’’(0)=0, but f’’’(0)=-4 –the equation has a root of multiplicity 3 at x=0 13 answer

14

15

For non-polynomials What about this f(x)=0, where Clearly, f(0)=0, so the f(x) has a root at x=0 But what is the multiplicity of this root? – f(0)=f’(0)=f’’(0)=0, but f’’’(0)=-4 –the equation has a root of multiplicity 3 at x=0 16

Rootfinding methods 2 categories –simple enclosure methods –fixed point iteration schemes Simple enclosure –bisection and false position –guaranteed to converge to a root, but slow Fixed point iteration –Newton’s method and secant method –fast, but require stronger conditions to guarantee convergence 17

18

A pathological example 19

The Bisection Method

Bisection method The most basic simple enclosure method All simple enclosure methods are based on Intermediate Value Theorem 21

22 Drawing proof for Intermediate Value Theorem

In Plain English Find an interval of that the endpoints are opposite sign Since one endpoint value is positive and the other negative, zero is somewhere between the values, that is, at least one root on that interval 23

Bisection method The objective is to systematically shrink the size of that root enclosing interval The simplest and most natural way is to cut the interval in half Next is to determine which half contains a root –Intermediate Value Theorem, again Repeat the process on that half 24

Bisection method 25

In action 26 f(x)=x 3 +2x 2 -3x-1, and (a 1,b 1 )=(1,2)

27

28

Any Questions? 29

30 You know what the bisection method is, but so far it is not an algorithm, why?

An Algorithm 31 Requires a stopping condition

32 Convergence of {p n }

33

Note The bisection method converges to a root of f, not the root of f –what’s the difference? f(a)f(b)<0 –guarantees the existence of a root, but not uniqueness, and the bisection method converge to one of these roots The bisection method cannot locate roots of even multiplicity (the sign does not change on either side of such roots) –is common to all simple enclosure techniques 34

35 Rate of convergence, O(1/2 n ) Order of convergence, α=1 and λ=1/2

36 We are now in position to select a stopping condition

Convergence measures For any rootfinding technique, we have 3 convergence measures to construct the stopping condition –absolute error –relative error –test 37

Which is the Best? 38 No one is always better than another answer

39

Which is the Best? 40 No one is always better than another

Algorithm Suppose that we decide to use the absolute error, but we don’t know the value of p With the theorem, we can now construct an algorithm 41

42

Note Performance measure –number of f evaluations rather than number of iterations ( f could involve many floating point operations) Underflow –both f(a) and f(p) will approaching zero –work with the signs rather than the sign of the product f(a)f(p) 43

Summary of bisection method Advantage –straightforward –inexpensive (1 evaluation per iteration) –guarantee to converge Disadvantage –error estimation can be overly pessimistic –(drawing for a extreme case of bisection method) 44

Any Questions? The Bisection Method

The Method of False Position

False position Very similar to bisection method Only differ in selecting p n 47

48

False position uses more information –values of f(a n ) and f(b n ) –rather than just the signs Selecting p n 49

Which method is better? 50

Which method is better From another aspect to only the convergence rate –bisection method provides a theoretical bound of error, but no error estimate –false position provides computable error estimate –(the only one advantage of false position) Thus, we can have a more appropriate stopping condition for false position –(we will use this advantage in Section 2.6) 51

52 Since false position has no theoretical bound of error, it requires effort to prove the convergence

53

54

Convergence analysis One observation to proceed the convergence analysis –one of the endpoints remains fixed –the other endpoint is just the previous approximation Namely – a n =a n-1, b n =p n-1 or – b n =b n-1, a n =p n-1 55 observation

56 The first problem

57 The second problem

58 The third problem

59

Convergence analysis One observation to proceed the convergence analysis –one of the endpoints remains fixed –the other endpoint is just the previous approximation Namely – a n =a n-1, b n =p n-1 or – b n =b n-1, a n =p n-1 60

Go back to the equation (4) 61 (b n -p)=(p n-1 -p)=e n-1

62

Any Questions? 63

Guarantee to convergence Now we know e n ≒ λ e n-1 One question that remains is –whether |λ| is less than 1 64 answer

The first condition 65 The remaining three conditions can be proved in a similar fashion

66 Now it’s time to select a stopping condition

Stopping condition Suppose the absolute error is used We have e n ≒ λ e n-1 We have to estimate e n 67

68

69 The first problem

70 The second problem

71 The third problem

Any Questions? The Method of False Position