Numerical Analysis EE NCKU TienHao Chang Darby Chang
Numerical Analysis EE, NCKU Tien-Hao Chang (Darby Chang) 1
In the previous slide n Error (motivation) n Floating point number system – difference to real number system – problem of roundoff n Introduced/propagated error n Focus on numerical methods – three bugs 2
Any Questions? About the exercise 3
In this slide n Rootfinding – multiplicity n Bisection method – Intermediate Value Theorem – convergence measures n False position – yet another simple enclosure method – advantage and disadvantage in comparison with bisection method 4
Rootfinding 5
Is a rootfinding problem 6
7
8
9
Multiplicity 10
Definition 11
Multiplicity for polynomials n n For polynomials, multiplicity can be determined by factoring the polynomial That’s easy, but 12
For non-polynomials n answer 13
14
15
For non-polynomials n 16
Rootfinding methods n 2 categories – simple enclosure methods – fixed point iteration schemes n Simple enclosure – bisection and false position – guaranteed to converge to a root, but slow n Fixed point iteration – Newton’s method and secant method – fast, but require stronger conditions to guarantee convergence 17
18
A pathological example 19
2. 1 The Bisection Method 20
Bisection method n n The most basic simple enclosure method All simple enclosure methods are based on Intermediate Value Theorem 21
Drawing proof for Intermediate Value Theorem 22
In Plain English n n 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 n n n 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 n Repeat the process on that half 24
Bisection method 25
In action 26
27
28
Any Questions? 29
You know what the bisection method is, but so far it is not an algorithm, why? 30
An algorithm requires a stopping condition 31
32
33
Note n 34
http: //www. dianadepasquale. com/Thinking. Monkey. jpg 35
We are now in position to select a stopping condition 36
Convergence measures n 37
Which is the Best? No one is always better than another answer 38
39
Which is the Best? No one is always better than another 40
Algorithm n 41
42
Note n 43
Summary of bisection method n Advantage – straightforward – inexpensive (1 evaluation per iteration) – guarantee to converge n Disadvantage – error estimation can be overly pessimistic – (drawing for a extreme case of bisection method) 44
Any Questions? 2. 1 The Bisection Method 45
2. 2 The Method of False Position 46
False position n 47
48
n 49
Which method is better? 50
Which method is better n 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) n Thus, we can have a more appropriate stopping condition for false position – (we will use this advantage in Section 2. 6) 51
Since false position has no theoretical bound of error, it requires effort to prove the convergence 52
53
54
Convergence analysis n One observation to proceed the convergence analysis – one of the endpoints remains fixed – the other endpoint is just the previous approximation n Namely observation – an=an-1, bn=pn-1 or – bn=bn-1, an=pn-1 55
The first problem 56
The second problem 57
The third problem 58
59
Convergence analysis n 60
Go back to the equation (4) 61
62
Any Questions? 63
Guarantee to convergence n answer 64
Guarantee to convergence n 65
The first condition n The remaining three conditions can be proved in a similar fashion 66
Now it’s time to select a stopping condition 67
Stopping condition n 68
69
The first problem 70
The second problem 71
The third problem 72
Any Questions? 2. 2 The Method of False Position 73
- Slides: 73