Jan 23, 2002 ------------ - New topic: finding roots of equations - Diversion: calculator button pushing - (i) What happens if you keep pressing square root button? - (ii) Limit cycle of period 2 with 1/x button (or -x button) - (iii) Interesting property of the number 1.618034 - These have something to do with the topic of root finding! :) - Simple examples from algebraic equations - Solving painful equations - e.g., worked out cos(x) cosh(x) = 1 - Iterative solution - start with a guess - keep improving it - if you are in the "right ballpark area", you converge! - Bisection Method - analogy: finding an address on the street - Given a function f on [a,b] - f(a) is -ve - f(b) is +ve - where is the zero of f? - what are you assuming? - Intermediate Value Theorem - Hi-Lo game for finding the midpoint - algorithm - error formula - number of iterations needed to get an error - To use bisection - you need to have an iterval [a,b] - f() should be continous in [a,b] - What happens with bisection for f(x) = x^-1? - Convergence for bisection - at least linear - What happens if interval has many roots? - Another way to play Hi-Lo - method of false position (regula falsi) - instead of midpoint, take straight line intersection - if its a linear function, you converge in one step! - Newton's method - use tangent - no need for ranges; just be near the root - What happens if you are too far away from root? - catastrophy occurs! - examples of pathological cases - receding tangent - flat tangent - dancing points Jan 25, 2002 ------------ - Recap: - Bisection - linear convergence - asymptotic error constant = 0.5 - can calculate #steps for given accuracy - Regula Falsi - also linear convergence - asymptotic error constant < 1 (but difficult to determine) - good for linear functions - Derivation of newton's method: 2 ways - using equation for tangent - using taylor's series linearization - Can be used for many purposes, not just finding roots - e.g., finding square root (global conv.) - fishing rod analogy "throw and reel in" - e.g., solving with sin(x) = 0 in -Pi/2 <= x <= Pi/2 - limit cycle for x* where tan x* = 2x* - e.g., solving with x^20-1 = 0, x>0 - same fishing rod analogy "but really really slow here" Jan 28, 2002 ------------ - Revisit examples from last class in light of: - local convergence (e.g., the x = x - tanx iteration) - global convergence (e.g. square root finding) - Revisit conditions for local convergence of Newton's method - starting sufficiently close to root - f, f', f'' are continuous in a neighborhood of root - f'(r) <> 0 - If you know that you have a double root - can modify Newton's method suitably - Worked out problem 3.2.22 and teased out problem 3.2.10 - Secant method - approximate the derivative, from basic formula - requires values at two points - possibility of cancelation error - superlinear convergence (1.618034...) - Fixed point iteration - how to spot it - how to figure out what it is doing - again, an e.g., using the square root iteration - Worked out problem 3.3.16 from textbook - Review of basic root finding methods - Bisection - slow, but sure - requires that f() be continuous in interval - Newton - quadratic convergence - requires knowledge of derivative and function at a point - good near the root - Secant - needs two function values - doesn't require explicit derivative - possibility of cancelation error (use carefully)