### Description

This course covers the most important numerical methods that an engineer should know. We derive basic algorithms in root finding, matrix algebra, integration and interpolation, ordinary and partial differential equations. We learn how to use MATLAB to solve numerical problems. Access to MATLAB online and the MATLAB grader is given to all students who enroll.

We assume students are already familiar with the basics of matrix algebra, differential equations, and vector calculus. Students should have already studied a programming language, and be willing to learn MATLAB.

The course contains 74 short lecture videos and MATLAB demonstrations. After each lecture or demonstration, there are problems to solve or programs to write. The course is organized into six weeks, and at the end of each week there is an assessed quiz and a longer programming project.

Download the lecture notes:

http://www.math.ust.hk/~machas/numerical-methods-for-engineers.pdf

Watch the promotional video:

https://youtu.be/qFJGMBDfFMY

### What you will learn

**Scientific Computing**

This week we learn how to program using MATLAB. We learn how real numbers are represented in double precision and how to do basic arithmetic with MATLAB. We learn how to use scripts and functions, how to represent vectors and matrices, how to draw line plots, how to use logical variables, conditional statements, for loops and while loops. Your programming project will be to write a MATLAB code to compute the bifurcation diagram for the logistic map.

**Root Finding**

Root finding is a numerical technique to find the zeros of a function. We learn the bisection method, Newton’s method and the secant method. We derive the order of convergence of these methods. A computation of a Newton fractal is demonstrated using MATLAB, and we discuss MATLAB functions that can find roots. Your programming project will be to write a MATLAB code using Newton’s method to compute the Feigenbaum delta from the bifurcation diagram for the logistic map.

**Matrix Algebra**

Matrix algebra done on the computer is often called numerical linear algebra. When performing Gaussian elimination, round-off errors can ruin the computation and must be handled using the method of partial pivoting, where row interchanges are performed before each elimination step. The LU decomposition algorithm then includes permutation matrices. We introduce operation counts, and teach the big-Oh notation for predicting the increase in computational time with larger problem size. We show how to count operations for Gaussian elimination and forward and backward substitution. The power method for computing the largest eigenvalue and associated eigenvector of a matrix is explained. Finally, we show how to use Gaussian elimination to solve a system of nonlinear differential equations using Newton’s method. Your programming project will be to write a MATLAB code that applies Newton’s method to the Lorenz equations.

**Quadrature and Interpolation**

In the first part of this week, we learn how to compute definite integrals—also called quadrature. We begin by learning the basics of quadrature, which include the elementary formulas for the trapezoidal rule and Simpson’s rule, and how these formulas can be used to develop composite integration rules. We then learn about Gaussian quadrature, and how to construct an adaptive quadrature routine in which the software itself determines the appropriate integration step size. We conclude this section by learning how to use the MATLAB function integral.m. In the second part of this week we learn about interpolation. Given a sample of function values, a good interpolation routine will be able to estimate the function values at intermediate sample points. Linear interpolation is widely used, particularly when plotting data consisting of many points. Here, we develop the more sophisticated method of cubic spline interpolation, to be used if the sample points are more sparse. Your programming project will be to write a MATLAB code to compute the zeros of a Bessel function. This requires combining both quadrature and root-finding routines.