MATH/COSC 3416 Course Outline
Numerical Methods I
January 2010
Course Description
This is an introductory course in numerical methods and analysis.
The prerequisites are a full year of calculus (MATH 1036/1037),
an introductory linear algebra course (MATH 1057) and an
introductory differential equations course (MATH 2066).
An introduction to programming is also assumed.
The course has a programming component using MATLAB.
Maple may also be used in a few places.
Course Organization
Textbook: Numerical Mathematics and Computing,
6th Edition
Authors: Ward Cheney and David Kincaid
Publisher: Thomson (Brooks/Cole)
Prerequisite:
MATH 1037, MATH 1057, MATH 2066, COSC 1046 or ENGR 1077
Instructor: Dr. B.G. Adams
Office: FA-378
Phone: 675-1151 x 2323
Email: badams 'at' laurentian 'dot' ca
Note: Only send messages using your university email address
Lecture Times: Tue, Thur: 8:30 am - 9:45 am
Room: C-301
Grading scheme
The final grade will be determined on the basis of
| Best 4 of 5 assignments |
30% |
Jan 22, Feb 5, Feb 26, Mar 12, Mar 26 |
| 2 Term tests (15% each) |
30% |
Feb 9, Mar 23 |
| Final exam (3 hours) |
40% |
Scheduled by registrar |
NOTE: Assignments are due in the course lockerette at 11:30 am
NOTE: Term test times are 8:30 am - 9:45 am
Course Outline
Introduction (2 weeks)
- Machine representation of floating point numbers.
- Absolute and relative roundoff error
- loss of significance theorem and Matlab examples
- Taylor series approximations to functions.
Convergence of Taylor series.
- Numerical examples of series summation and convergence using MATLAB.
- The derivative problem using limit definition
- Recurrence relations. Stable and unstable recurrence relations.
Backward iteration. MATLAB examples.
- Convergence rates for iterative methods. Examples of slow and
fast convergence. MATLAB examples.
Root Finding Methods (2 weeks)
- Bisection method and fixed point iteration and onvergence
analysis.
- Newton and secant methods and convergence analysis.
- Writing MATLAB functions for root finding methods
- The MATLAB fzero function.
- Applied examples using MATLAB
Interpolation and Extrapolation (2 weeks)
- Efficient evaluation of polynomials. Lagrange form of
interpolating polynomials.
- Newton form of the interpolating polynomials.
- Algorithms
for calculating the Newton form based on a divided difference
table.
- Writing MATLAB functions for interpolation
- Errors in polynomial interpolation.
- The Runge phenomenon
- Using Chebyshev polynomials for better approximations.
- Estimating derivatives numerically using Richardson extrapolation.
- Obtaining derivative formulas from interpolating polynomials.
- Built-in MATLAB functions for interpolation.
Numerical Integration (2 weeks)
- Riemann integral definition using upper and lower sums.
- Trapezoidal and Simpson rules, composite rule, algorithm,
Matlab functions, error analysis.
- Recursive trapezoidal formula, the Romberg extrapolation
method, algorithm, MATLAB function.
- Gaussian integration (quadrature)
- Applied examples using MATLAB
Numerical Solution of Linear Systems (2 weeks)
- Brief review of linear algebra, matrix and vector operations,
determinants, and the solution of linear
systems of equations using row reduction methods.
Matrix inverse using row reduction methods.
- Solving
Ax = b when A is an upper
triangular or lower triangular matrix, algorithms.
- The general case
Ax = b using gaussian elimination
to upper triangular form and back substitution.
- Naive Gaussian elimination, algorithms, complexity.
Eliminating zero pivot elements.
- Roundoff error examples in solution of
Ax = b.
- Reducing roundoff error using maximal column pivoting and
scaled column pivoting, algorithms, MATLAB fnuctions. Using
pivot vectors (permutation vectors) to avoid explicit
row exchanges.
- Separating the Gaussian elimination part from
the back substitution part, algorithms and MATLAB functions.
- LU factorization (
A = LU) using naive Gaussian
elimination.
Solving Ax = b using LU factorization,
forward substitution
and backward substitution, algorithms and MATLAB
functions.
- LU factorization (
PA = LU) using maximal column
pivoting and the permutation matrix P
(defined by pivot vector) to obtain
the LU decomposition of PA, algorithms and Matlab
functions.
- Efficient calculation of the matrix inverse and determinant
using the LU factorization.
- Ill-conditioned matrices and the condition number.
Examples using Hilbert and Vandermonde matrices.
Numerical Solution of ODE's (2 weeks)
- Brief review of first order DE's
x'(t) = f(t,x)
and systems of DE's.
Geometric interpretation of a first order DE.
- Using DFIELD and PPLAT to solve and graph DE's
- Euler's method for the initial value problem
x'(t) = f(t,x),
x(t0) = x0.
Local and global truncation errors, algorithms and Maple procedures.
- Higher order Taylor series methods, algorithms and
MATLAB functions.
- Runge-Kutta methods. Derivation of 2nd order and the classical
4th order methods, algorithms, MATLAB functions.
- The 4th order Runge-Kutta method for a system of first order
differential equations, algorithm and Maple procedure for the
case of a system of two equations
x'(t) = f(t,x,y) and y'(t) = g(t,x,y).
- Case study: The "rabbits and foxes" problem as a dynamical system
of two first order DE's, closed solution curves and
population curves as functions of time, obtained using the
4-th order Runge-Kutta method for systems.
-
Built-in MATLAB functions for solving systems of first
order DE's.
Assignments and Tests
assign1.pdf
(solutions1.html)
assign2.pdf
(solutions2.html)
assign3.pdf
(solutions3.html)
assign4.pdf
(solutions4.html)
assign5.pdf
(solutions5.html)
Test 1 study guide
Term test 1 solutions
Test 2 study guide
Term test 2 solutions
Matlab tutorial, m files, and Other Resources
Matlab Tutorial
You should try the following Matlab tutorial:
tutorial.pdf
Scripts from tutorial:
fact.m
falling_object.m
quad_script.m
sq_root1.m
sq_root2.m
sq_root3.m
Introductory Notes
intro.pdf
Scripts from Introductory Notes
err.m
Relative and absolute errors
roundoff1.m
Roundoff error accumulation
machine_eps.m
Calculating the machine epsilon
roundoff2.m
Loss of significance in subraction
roundoff3.m
Elimination of loss of significance
sin1.m
sin2.m
sinf.m
x - sin x
logsum1.m
Slow series for log(2)
logsum2.m
Fast series for log(2)
deriv.m
Approximating the derivative
of a function using the limit definition from calculus.
recurrence1.m
stable recurrence relation
recurrence2.m
unstable recurrence relation
recurrence3.m
backward recurrence relation
slowroot.m
slow recurrence relation
fastroot.m
fast recurrence relation
Scripts for root finding
bisect.m
Bisection method
newton.m
Newtons method
secant.m
Secant method
fpoint0.m,
fpoint.m
Fixed point iteration method
annuity.m
Annuity example
fzero_test.m
Using the Matlab fzero function
cable.m
Suspended cable example
beam_example.m
Beam example
floating_sphere.m
Finding the depth of a floating sphere
Scripts for interpolation and extrapolation
eval_poly.m
Evalaute a polynomial using nested form
interp_poly.m
Using the Matlab polyfit and polyval functions
lip.m
Evalaute lagrange interpolating polynomial
newton_table.m
Newton divided difference table
newton_table_test.m
Example of Newton divided difference table
newton_poly.m
Coefficients of the newton polynomial
newton_eval.m
Evaluating Newton polynomial at a point
linear_table.m
linear interpolating table for exp(x)
quad_table.m
quadratic interpolating table for exp(x)
runge.m
Runge phnomenon
richardson.m
Richardson extrapolation table for derivative
richtest.m
Richardson extrapolation example
Numerical Integration
riemann.m
Reimann sum example
trap.m
Trapezoidal rule
traptest.m
Trapezoidal rule example
simp.m
Simpson's rule
simptest.m
Simpson's rule example
romberg.m
Romberg table
rombergtest.m
Romberg examplee
gauss2.m
2nd degree gaussian integration
gauss3.m
3rd degree gaussian integration
gauss_test.m
gaussian example
quad_test.m
Test of Matlabs' quaud function
Linear Systems
ngauss.m
Naive gaussian elimination
ngausstest.m
Example of Naive gaussian elimination
zgauss.m
Eliminating zero pivots
zgausstest.m
Example of zgauss
mgauss.m
Maximal column pivoting
mgausstest.m
Example of mgauss
sgauss.m
Scaled partial pivoting
sgausstest.m
Example of sgauss
gauss.m
Gaussian elimination only
gaussSolve.m
Solving systems using gauss
gausstest.m
Example of gauss and gaussSolve
truss.m
Example of gauss and gaussSolve for a truss
nluFactor.m
Naive lu factorization
nluSolve.m
Solving system using nluFactor
nlutest.m
Example of nluFactor and nluSolve
luFactor.m
lu factorization using scaled partial pivoting
luSolve.m
Solving system using luFactor
lutest.m
Example of luFactor and luSolve
inverse.m
Computing inverse using gauss and gaussSolve
Differential equations
euler.m
Euler's method for first order DE
euler_test1.m
Example of Euler's method
taylor4.m
4th order taylor method
taylor4_test1.m
Example of 4th order Taylor method
rk2.m
2nd order Runge-Kutta method
rk2_test1.m
Example of 2nd order Runge-Kutta method
rk4.m
4th order Runge-Kutta method
rk4_test1.m
Example of 4th order Runge-Kutta method