Review Taylor Series and Error Analysis Roots of Equations Linear Algebraic Equations Optimization Numerical Differentiation and Integration Ordinary Differential Equations Partial Differential Equations Curve Fitting 1
Taylor Series Lagrange remainder 2
Roots of Equations Bracketing Methods Bisection Method False Position Method Open Methods Fixed Point Iteration Newton-Raphson Method Secant Method Roots of Polynomials Müller s Method Bairstow s Method 3
Bisection Method Example: Use range of [202:204] Root is in upper subinterval 4
Bisection Method Use range of [203:204] Root is in lower subinterval 5
Fixed Point Iteration Special attention Read Chap 6.1, 6.6 Example 6
Newton-Raphson Method Use tangent to guide you to the root 7
Linear Algebraic Systems Gaussian Elimination Forward Elimination Back Substitution LU Decomposition 8
Gaussian Elimination Forward elimination Eliminate x 1 from row 2 Multiply row 1 by a 21 /a 11 9
Gaussian Elimination Eliminate x 1 from row 2 Subtract row 1 from row 2 Eliminate x 1 from all other rows in the same way Then eliminate x 2 from rows 3-n and so on 10
Gaussian Elimination Forward elimination Back substitute to solve for x 11
LU Decomposition Substitute the factorization into the linear system We have transformed the problem into two steps Factorize A into L and U Solve the two sub-problems LD = B UX = D 12
LU Decomposition Example Factorize A using forward elimination 13
LU Decomposition Example 14
LU Decomposition Example 15
LU Decomposition Example 16
Optimization Methods One-dimensional unconstrained optimization Golden-Section Quadratic Interpolation Newton s Method Multidimensional unconstrained optimization Direct Methods Gradient Methods Constrained Optimization Linear Programming 17
Golden-section search Algorithm Pick two interior points in the interval using the golden ratio 18
Golden-section search Two possibilities 19
Golden-section search Example 20
Golden-section search 21
Golden-section search 22
Newton s Method Newton-Raphson could be used to find the root of an function When finding a function optimum, use the fact that we want to find the root of the derivative and apply Newton-Raphson 23
Newton s Method Example 24
Newton s Method Example 25
Special attention Quadratic interpolation Use a second order polynomial as an approximation of the function near the optimum 26
Special attention Gradient Methods Given a starting point, use the gradient to tell you which direction to proceed The gradient gives you the largest slope out from the current position 27
Numerical Integration Newton-Cotes Trapezoidal Rule Simpson s Rules (Special attention for unevenly distributed points) Romberg Integration Gauss Quadrature 28
Newton-Cotes Formulas Special attention Read Chap 21.2-3 Trapezoidal Rule Simpson s 1/3 Rule Simpson s 3/8 Rule 29
Integration of Equations Romberg Integration Use two estimates of integration and then extrapolate to get a better estimate Special case where you always halve the interval - i.e. h 2 =h 1 /2 30
Romberg Integration 31
Ordinary Differential Equations Runge-Kutta Methods Euler s Method Heun s Method RK4 Multistep Methods Boundary Value Problems Eigenvalue Problems 32
Euler s Method Example: True: h=0.5 33
Heun s Method Local truncation error is O(h 3 ) and global truncation error is O(h 2 ) 34
Heun s Method 35
Classic 4th-order R-K Special attention to ODE equation system Not only one equation method 36
Curve Fitting Least Squares Regression Interpolation Fourier Approximation 37
Polynomial Regression Special attention Lecture note 19 Chap 17.1 An m th order polynomial will require that you solve a system of m+1 linear equations Standard error 38
Newton (divided difference) Interpolation polynomials 39
Newton (divided difference) Interpolation polynomials 40
Interpolation General Scheme for Divided Difference Coefficients 41
Interpolation General Scheme for Divided Difference Coefficients 42
Interpolation Example: Estimate ln 2 with data points at (1,0), (4,1.386294) Linear interpolation 43
Interpolation Example: Estimate ln 2 with data points at (1,0), (4,1.386294), (5,1.609438) Quadratic interpolation 44
Interpolation Example: Estimate ln 2 with data points at (1,0), (4,1.386294), (5,1.609438), (6,1.791759) Cubic interpolation 45
Spline Interpolation Spline interpolation applies low-order polynomial to connect two neighboring points and uses it to interpolate between them. Typical Spline functions 46
Cubic Spline Functions This gives us n-1 equation with n-1 unknowns the second derivatives Once we solve for the second derivatives, we can plug it into the Lagrange interpolating polynomial for second derivative to solve for the splines 47
Cubic Spline Functions Example: (3,2.5), (4.5,1), (7,2.5), (9,0.5) At x=x 1 =4 48
Cubic Spline Functions At x=x 2 =7 49
Cubic Spline Functions Solve the system of equations to find the second derivatives 50
Cubic Spline Equations 51
Cubic Spline Equations Substituting for other intervals 52
Final Exam December 16 Friday, 8:00 AM~10:00 AM, ITE 127 Closed book, three cheat sheets (8.5x11in) allowed Office hours: December 12, 1-3pm, or by appointment TA December 13, 11am-12noon or by appointment 53