<<

ECE3040: Table of Contents

Lecture 1: Introduction and Overview  Instructor contact information  Navigating the course web page  What is meant by numerical methods?  Example problems requiring numerical methods  What is Matlab and why do we need it?

Lecture 2: Matlab Basics I  The Matlab environment  Basic calculations  Command Window control & formatting  Built-in constants & elementary functions

Lecture 3: Matlab Basics II  The assignment operator “=” for defining variables  Creating and manipulating arrays  Element-by-element array operations: The “.” Operator  Vector generation with linspace and “:” (colon) operator  Graphing data and functions

Lecture 4: Matlab Programming I  Matlab scripts (programs)  Input-output: The input and disp commands  The fprintf command  User-defined functions  Passing functions to M-files: Anonymous functions  Global variables

Lecture 5: Matlab Programming II  Making decisions: The if-else structure  The error, return, and nargin commands  Loops: for and while structures  Interrupting loops: The continue and break commands

Lecture 6: Programming Examples  Plotting piecewise functions  Computing the factorial of a number  Beeping  Looping vs vectorization speed: tic and toc commands  Passing an “anonymous function” to Matlab function  Approximation of definite : Riemann sums  Computing cos(푥) from its power  Stopping criteria for iterative numerical methods  Computing the square root  Evaluating polynomials  Errors and Significant Digits

Lecture 7: Polynomials  Polynomials in engineering  Matlab numeric tools for polynomials  Matlab symbolic tools for polynomial and other analytic functions

Lecture 8: Approximations I  The Taylor series: taylor function  Taylor series expansion for some basic functions  Evidence of digital machine truncation error  computation using Taylor series  Rearrangement of formulas to control the round-off error  Significance of the Taylor series expansion point 푎

Lecture 9: Taylor Series Approximation II  Taylor series generation of approximate analytic solutions  The Gaussian and its polynomial approximations  Taylor series-based solution of nonlinear equations  Padé approximation: Approximation with a rational function

Lecture 10: Digital Machine Round-off Errors  Total error in a numerical method  Round-off error in the evaluation of simple formulas  Binary floating-point representation of numbers  The source of round-off errors  Truncation error vs round-off error in numerical differentiation

Lecture 11: Numerical Solution of Nonlinear Equations I  Introduction and problem formulation  Graphical method for estimating solutions  Taylor series-based method: The solve_poly function revisited  Fixed-point iteration method: Single equation  Fixed-point iteration method: System of equations  Solving for complex roots  Appendix: Convergence rate of the fixed-point method

Lecture 12: Numerical Solution of Nonlinear Equations II  Newton’s method  Convergence analysis of Newton’s method  Secant method  Newton’s method for solving a system of equations  Bisection method  Matlab built-in numerical solver: fzero and fsolve  Matlab built-in symbolic solver: solve  Comparison of the different root finding methods  Appendix: Proof of the quadratic convergence of Newton’s method

Lecture 13: Optimization I  Introduction and motivation  Extreme points: Maxima, minima and inflection  Polynomial optimization: The optm_poly function  Application of numerical root-finding methods to optimization  Golden-section search for maxima/minima

Lecture 14: Optimization II  Parabolic interpolation  Parabolic interpolation-based optimization  Matlab’s built-in optimization function: fminbnd  -based optimization method  User-defined functions grad_optm1 and grad_optm2

Lecture 15: Systems of Linear Equations I  Examples of systems of linear equations: Formulation and solution  Graphical representation: Singular and ill-conditioned systems  Gauss elimination: Function gauss  Pivoting: Function guass_pivot

Lecture 16: Systems of Linear Equations II  LU factorization and the solution of linear algebraic equations  Matlab’s lu function and the left-division operator: \  More on Matlab’s left-division operator  Iterative methods: Jacobi and Gauss-Seidel

Lecture 17: Polynomial Interpolation  Introduction  Interpolation using a single polynomial  Newton’s interpolation polynomials  Matlab built-in polynomial interpolation: polyfit  The curse of high-dimensional polynomials  Cubic spline interpolation  Matlab built-in cubic spline interpolation: spline  Interpolation using rational functions

Lecture 18: Curve Fitting by Least-Squares Regression  Introduction  Linear least-squares regression and the straight line model  Linearization of nonlinear models  General linear least-squares regression and the polynomial model  Polynomial regression with Matlab: polyfit  Non-linear least-squares regression  Numerical solution of the non-linear LSE optimization problem: Gradient search and Matlab’s fminsearch function

Lecture 19: I  Introduction  Numerical integration formulas: o Simple integration: Approximation with a constant o Midpoint rule: Another approximation with a constant o Trapezoidal Rule: Approximation with a straight line o Simpson’s 1/3 Rule: Approximation with a parabola o Simpson’s 3/8 Rule: Approximation with a 3rd-order polynomial  Matlab built-in numerical integration from data points: trapz  Numerical integration applied to generating Chebyshev

Lecture 20: Numerical Integration II  Introduction  Richardson extrapolation & Romberg integration  Gauss quadrature: Two-point Gauss-Legendre formula  Adaptive quadrature  Matlab numerical integration functions quad & quadl (or integral)  Matlab polynomial and symbolic integration: polyint and int  Taylor series-based integration  Multiple integrals: dblquad (integral2) and triplequad (integral3)  Monte Carlo integration

Lecture 21: Numerical Differentiation  Introduction  Differentiation formulas  Richardson extrapolation  Matlab numerical differentiation functions: diff  Matlab polynomial and symbolic differentiation: polyder and diff

Lecture 22: Numerical Solution of Differential Equations  Introduction  Euler’s method for solving first-order ODEs  Euler’s method for higher-order ODEs  Error analysis of Euler’s method  Improving Euler’s method: Heun’s & Runge-Kutta methods  Matlab’s function ode45  Case study: Bungee jumper  Appendix: Symbolic solution of ODE’s using Matlab’s dsolve

Appendix A: Numerical Solution of Some Interesting Systems of ODEs  Hanging Two-Mass, Two-Spring Linear (Ideal) System  Tunnel Diode Circuit  The (Diffusion-less) Lorenz Dynamical System  Euler’s Restricted Three-Body Problem  The General (Planar) Three-Body Problem  Extremizing Functions: The suspended chain and other problems

Appendix B: Summary of User-Defined and Built-in Matlab Functions

Appendix C: The 10 Most Important Matlab Functions for Numerical Methods

Appendix D: Numerical Methods and Vintage Programmable Calculators