Presentation is loading. Please wait.

Presentation is loading. Please wait.

EE, NCKU Tien-Hao Chang (Darby Chang)

Similar presentations


Presentation on theme: "EE, NCKU Tien-Hao Chang (Darby Chang)"โ€” Presentation transcript:

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

7

8

9

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

14

15

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

18

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)

27

28

29

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}

33

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

39

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

42

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 ๐‘ ๐‘›

48

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

53

54

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

59

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

62

63

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 ๐‘’ ๐‘›

69

70 The first problem

71 The second problem

72 The third problem

73 2.2 The Method of False Position


Download ppt "EE, NCKU Tien-Hao Chang (Darby Chang)"

Similar presentations


Ads by Google