Download presentation

1
**EE, NCKU Tien-Hao Chang (Darby Chang)**

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

2
**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

3
About the exercise

4
**In this slide Rootfinding Bisection method False position multiplicity**

Intermediate Value Theorem convergence measures False position yet another simple enclosure method advantage and disadvantage in comparison with bisection method

5
**Given a function 𝑓, find a 𝑥 such that 𝑓 𝑥 =0**

Rootfinding Given a function 𝑓, find a 𝑥 such that 𝑓 𝑥 =0

6
**Is a rootfinding problem**

10
Multiplicity

11
Definition

12
**Multiplicity for polynomials**

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

13
**For non-polynomials What about this 𝑓 𝑥 =0, where 𝑓 𝑥 =2𝑥+ ln 1−𝑥 1+𝑥**

Clearly, 𝑓 0 =0, so the 𝑓(𝑥) has a root at 𝑥=0 But what is the multiplicity? 𝑓 0 = 𝑓 ′ 0 = 𝑓 ′′ 0 =0, but 𝑓 ′′′ 0 =−4 the equation has a root of multiplicity 3 at 𝑥=0 answer

16
**For non-polynomials What about this 𝑓 𝑥 =0, where 𝑓 𝑥 =2𝑥+ ln 1−𝑥 1+𝑥**

Clearly, 𝑓 0 =0, so the 𝑓(𝑥) has a root at 𝑥=0 But what is the multiplicity? 𝑓 0 = 𝑓 ′ 0 = 𝑓 ′′ 0 =0, but 𝑓 ′′′ 0 =−4 the equation has a root of multiplicity 3 at 𝑥=0

17
**Rootfinding methods 2 categories Simple enclosure**

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

19
**A pathological example**

20
2.1 The Bisection Method

21
**Bisection method The most basic simple enclosure method**

All simple enclosure methods are based on Intermediate Value Theorem

22
**Drawing proof for Intermediate Value Theorem**

23
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

24
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

25
Bisection method

26
In action 𝑓 𝑥 = 𝑥 3 +2 𝑥 2 −3𝑥−1, and 𝑎 1 , 𝑏 1 =(1,2)

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

31
**An algorithm requires a stopping condition**

32
Convergence of {pn}

34
**Note The bisection method converges to a root of 𝑓, not the root of 𝑓**

what’s the difference? 𝑓 𝑎 𝑓 𝑏 <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

35
**Rate of convergence, 𝑂( 1 2 𝑛 ) Order of convergence, 𝛼=1 and 𝜆= 1 2**

Rate of convergence, 𝑂( 1 2 𝑛 ) Order of convergence, 𝛼=1 and 𝜆= 1 2

36
**We are now in position to select a stopping condition**

37
Convergence measures For any rootfinding technique, we have 3 convergence measures to construct the stopping condition absolute error 𝑝 𝑛 −𝑝 <𝜀 relative error 𝑝 𝑛 −𝑝 𝑝 𝑛 <𝜀 test 𝑓(𝑝 𝑛 ) <𝜀

38
**No one is always better than another**

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

40
**No one is always better than another**

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

41
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

43
**Note Performance measure Underflow**

number of 𝑓 evaluations rather than number of iterations (𝑓 could involve many floating point operations) Underflow both 𝑓(𝑎) and 𝑓(𝑝) will approaching zero work with the signs rather than the sign of the product 𝑓 𝑎 𝑓(𝑝)

44
**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)

45
2.1 The Bisection Method

46
**The Method of False Position**

2.2 The Method of False Position

47
**False position Very similar to bisection method**

Only differ in selecting 𝑝 𝑛

49
**Selecting 𝑝 𝑛 False position uses more information**

values of 𝑓 𝑎 𝑛 and 𝑓 𝑏 𝑛 rather than just the signs

50
Which method is better?

51
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)

52
**Since false position has no theoretical bound of error, **

it requires effort to prove the convergence

55
Convergence analysis One observation to proceed the convergence analysis one of the endpoints remains fixed the other endpoint is just the previous approximation Namely an=an-1, bn=pn-1 or bn=bn-1, an=pn-1 observation

56
The first problem

57
The second problem

58
The third problem

60
Convergence analysis One observation to proceed the convergence analysis one of the endpoints remains fixed the other endpoint is just the previous approximation Namely 𝑎 𝑛 = 𝑎 𝑛−1 , 𝑏 𝑛 = 𝑝 𝑛−1 or 𝑏 𝑛 = 𝑏 𝑛−1 , 𝑎 𝑛 = 𝑝 𝑛−1

61
**Go back to the equation (4)**

𝑏 𝑛 −𝑝 = 𝑝 𝑛−1 −𝑝 = 𝑒 𝑛−1

64
**Guarantee to convergence**

Now we know 𝑒 𝑛 ≈𝜆 𝑒 𝑛−1 One question that remains is whether 𝜆 is less than 1 answer

65
**Guarantee to convergence**

Now we know 𝑒 𝑛 ≈𝜆 𝑒 𝑛−1 One question that remains is whether 𝜆 is less than 1

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

67
**Now it’s time to select a stopping condition**

68
**Stopping condition Suppose the absolute error is used**

We have 𝑒 𝑛 ≈𝜆 𝑒 𝑛−1 We have to estimate 𝑒 𝑛

70
The first problem

71
The second problem

72
The third problem

73
**2.2 The Method of False Position**

Similar presentations

OK

STATISTICS INTERVAL ESTIMATION Professor Ke-Sheng Cheng Department of Bioenvironmental Systems Engineering National Taiwan University.

STATISTICS INTERVAL ESTIMATION Professor Ke-Sheng Cheng Department of Bioenvironmental Systems Engineering National Taiwan University.

© 2018 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google