### Course Description

This course is an introduction to numerical analysis with an emphasis on practical applications, implementation, and algorithm design. The primary objective of this course is to gain an understanding of the algorithms and pitfalls encountered when performing numerical operations on computational systems. The secondary objective is to gain practical programming experience with C/C++ and Matlab, including algorithm design and the proper understanding and use of available numerical algorithms.

Syllabus [ PDF ]

Course Forum: Piazza (requires login)

### Textbooks

[ PDF ] Numerical Methods in Practice - (in progress)

### Lectures

[ PPTX ] [ PDF ] Lecture 00 - Introduction to numerical methods, quantization errors, aliasing

[ PPTX ] [ PDF ] Lecture 01 - Representing numbers in digital systems, integers, floating point, arithmetic

- Source code for data type output: bintype.cpp
- Raw (little-endian) data type output: output.bin
- Hex editor website: hexed.it

[ PPTX ] [ PDF ] Lecture 02 - Loss of precision, reformulation, Taylor series, mean value theorem, quadratic equation

[ PPTX ] [ PDF ] Lecture 03 - Evaluating polynomials, Horner's algorithm, polynomial derivatives

[ PPTX ] [ PDF ] Lecture 04 - Finding roots of equations, programming assignment 1

[ PPTX ] [ PDF ] Lecture 05 - Big-O notation, error, algorithmic complexity

[ PPTX ] [ PDF ] **Section 1 Review**

[ PPTX ] [ PDF ] Lecture 06 - Solving linear systems

[ PPTX ] [ PDF ] Lecture 07 - Gaussian elimination stability

[ PPTX ] [ PDF ] Lecture 08 - Properties of linear systems, LU decomposition, matrix inversion

[ PPTX ] [ PDF ] Lecture 09 - Random numbers and Monte-Carlo methods

[ PPTX ] [ PDF ] **Section 2 Review
**

[ PPTX ] [ PDF ] Lecture 10 - Finite differences, difference calculus

[ PPTX ] [ PDF ] Lecture 11 - Differential equations, Euler's method

[ PPTX ] [ PDF ] Lecture 12 - Integration, trapezoid rule, Simpson's rule

[ PPTX ] [ PDF ] Lecture 13 - Least squares fitting, linear least squares

[ PPTX ] [ PDF ] Lecture 14 - Interpolation

[ PPTX ] [ PDF ] Lecture 15 - Kessel Run (Euler's method, Monte-Carlo methods, vector math)

- [ source ] Matlab code for a particle in an electric field
- [ source ] Matlab code for solving and
- [ source ] Matlab code for simulating a satellite and gravity well

[ PPTX ] [ PDF ] **Section 3 Review**

### Homework and Sample Problems

[ PDF ] Homework 1 - Calculating Error

[ PDF ] Homework 2 - Representing numbers in digital systems

[ PDF ] Homework 3 - Numerical precision

[ PDF ] Worksheet - Reformulation Problems [ answers ]

[ PDF ] Homework 4 - Evaluating functions and optimization

[ PDF ] Homework 5 - Partial pivoting and matrix conditioning

[ PDF ] Homework 6 - Random Numbers

[ PDF ] Example Exam, [ PDF ] Answers (Section 1)

[ PDF ] Example Exam, [ PDF ] Answers (Section 2)

[ PDF ] Example Exam, [ PDF ] Answers (Section 3)

[ PDF ] Example Exam, [ PDF ] Answers (Section 3)

### Programming

#### Programming Reviews/Tutorials

[ PPTX ] Visual Studio (C/C++) coding and compiling tutorial

[ PDF ] Matlab Review

#### Programming Assignments

[ PDF ] Programming Assignment 1 - Finding roots of equations (C/C++)

- polynomials.txt - randomized inputs and corresponding roots that can be used to test your code

[ PDF ] Programming Assignment 2 - LU Decomposition Using Partial Pivoting (C/C++)

- linear system from lecture 6 (steps are in the notes) [ sample output ]
- linear system from lecture 7 (steps are in the notes) [ sample output ]
- geometric series (n = 7) (x = 1 for all x, should succeed for both LU and LUP) [ sample output ]
- geometric series (n = 8) (x = 1 for all x, should fail for float, succeed for double) [ sample output ]
- Neal et al. permuted (x = 10 for all x, should fail for LU but succeed for LUP) [ sample output ]
- (output files were generated using the scipy.linalg.lu function in SciPy) [ source code ]

[ PDF ] Programming Assignment 3 - The Kessel Run (Matlab/Python)

- [ cluster1.mat ] file containing the gravity wells for the assignment