Download presentation
Presentation is loading. Please wait.
Published byClaude Green Modified over 9 years ago
1
Numerical Analysis 1 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 2
3
Any Questions? 3 About the exercise?
4
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
5
Rootfinding 5 Given a function f, find a x such that f(x)=0
6
6 Is a rootfinding problem
7
7
8
8
9
9
10
Multiplicity 10
11
Definition 11
12
Multiplicity for polynomials For polynomials, multiplicity can be determined by factoring the polynomial That’s easy, but 12
13
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
14
15
15
16
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
17
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
18
19
A pathological example 19
20
2.1 20 The Bisection Method
21
Bisection method The most basic simple enclosure method All simple enclosure methods are based on Intermediate Value Theorem 21
22
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 23
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 24
25
Bisection method 25
26
In action 26 f(x)=x 3 +2x 2 -3x-1, and (a 1,b 1 )=(1,2)
27
27
28
28
29
Any Questions? 29
30
30 You know what the bisection method is, but so far it is not an algorithm, why?
31
An Algorithm 31 Requires a stopping condition
32
32 Convergence of {p n }
33
33
34
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
35 Rate of convergence, O(1/2 n ) Order of convergence, α=1 and λ=1/2 http://www.dianadepasquale.com/ThinkingMonkey.jpg
36
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 37
38
Which is the Best? 38 No one is always better than another answer
39
39
40
Which is the Best? 40 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 41
42
42
43
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
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) 44
45
Any Questions? 45 2.1 The Bisection Method
46
2.2 46 The Method of False Position
47
False position Very similar to bisection method Only differ in selecting p n 47
48
48
49
False position uses more information –values of f(a n ) and f(b n ) –rather than just the signs Selecting p n 49
50
Which method is better? 50
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) 51
52
52 Since false position has no theoretical bound of error, it requires effort to prove the convergence
53
53
54
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 – a n =a n-1, b n =p n-1 or – b n =b n-1, a n =p n-1 55 observation
56
56 The first problem
57
57 The second problem
58
58 The third problem
59
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 – a n =a n-1, b n =p n-1 or – b n =b n-1, a n =p n-1 60
61
Go back to the equation (4) 61 (b n -p)=(p n-1 -p)=e n-1
62
62
63
Any Questions? 63
64
Guarantee to convergence Now we know e n ≒ λ e n-1 One question that remains is –whether |λ| is less than 1 64 answer
65
The first condition 65 The remaining three conditions can be proved in a similar fashion
66
66 Now it’s time to select a stopping condition
67
Stopping condition Suppose the absolute error is used We have e n ≒ λ e n-1 We have to estimate e n 67
68
68
69
69 The first problem
70
70 The second problem
71
71 The third problem
72
Any Questions? 72 2.2 The Method of False Position
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.