1 / 72

Numerical Analysis

Numerical Analysis. 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. About the exercise?. In this slide.

urian
Download Presentation

Numerical Analysis

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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 • multiplicity • Bisection method • Intermediate Value Theorem • convergence measures • False position • yet another simple enclosure method • advantage and disadvantage in comparison with bisection method

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

  6. Is a rootfinding problem

  7. Multiplicity

  8. Definition

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

  10. 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 answer

  11. 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

  12. 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

  13. A pathological example

  14. 2.1 The Bisection Method

  15. Bisection method • The most basic simple enclosure method • All simple enclosure methods are based on Intermediate Value Theorem

  16. Drawing proof for Intermediate Value Theorem

  17. 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

  18. 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

  19. Bisection method

  20. In action f(x)=x3+2x2-3x-1, and (a1,b1)=(1,2)

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

  22. An Algorithm Requires a stopping condition

  23. Convergence of {pn}

  24. 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 ofeven multiplicity(the sign does not change on either side of such roots) • is common to all simple enclosure techniques

  25. http://www.dianadepasquale.com/ThinkingMonkey.jpg Rate of convergence, O(1/2n)Order of convergence, α=1 and λ=1/2

  26. We are now in position to select a stopping condition

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

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

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

  30. 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

  31. 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)

  32. 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)

  33. 2.1 The Bisection Method

  34. 2.2 The Method of False Position

  35. False position • Very similar to bisection method • Only differ in selecting pn

  36. Selecting pn • False position uses more information • values of f(an) and f(bn) • rather than just the signs

  37. Which method is better?

More Related