Successive Numeric Approximation Idea: Solve a mathematical problem using a numeric algorithm that estimates a solution General structure: use the current estimate of the solution to generate a better estimate Applied to difficult mathematical problems that cannot be solved analytically (e.g. using calc rules) These methods are used in built in MATLAB functions like fzero, integral, etc. Issues to consider: Does our algorithm always produce better estimates than the current estimate? If it does, this means it will converge to a solution! How quickly does our algorithm generate a "good" estimate? Known as the "convergence rate". Different ways to cacluate error in current estimate: Absolute error - |approx value - exact value| Relative error - absolute error/|exact value| Percent error = Relative error * 100% Issue: If we knew the exact value, wouldn't need to approximately solve the problem Can estimate the error in problem dependent ways. Ex: For finding a root of a function f, we want a point x such that f(x) = 0. If we have a current estimate y, we can estimate our error at y using |f(y) - f(x)| = |f(y)|. We will consider the algorithm to have converged when we get the error below a tolerance epsilon, which will be a small positive number (e.g. 10^-12). Convergence rates - an indication of how quickly we converge to the exact value Linear: error is reduced by a factor of the previous error e.g. new error = (1/2)*old error. Quadratic: error is reduced by a factor of the previous error squared e.g. new error = (old error)^2. Cubic: error is reduced by a factor of the previous error cubed e.g. new error = (old error)^3. Note: For quadratic and cubic convergence, original error needs to be small (in our examples, less than 1) for convergence to happen. Otherwise we might actually increase the error rapidly! Succesive numeric approximation is an extremely common tool that applies to many problems. We will only focus on finding roots.