MATH245, Computational Mathematics

Undergraduate course, Lancaster University, Department of Mathematics & Statistics, 2018

My role: Graduate Teaching Assistant

1. Programming and R (4 lectures)

Data structures: vectors, matrices, lists. Indexing; matrices: multiplication; inversion; basic plotting: scatter plots, histograms; vector operations; simple simulation. Programming: functions; for loops; if tests, else and else if; while loops; debugging.

2. Numerical solution of equations (4 lectures)

Solution: bisection, fixed-point iterations, Newton-Raphson; rate of convergence & analysis. Optimisation: find critical points, golden section method; Higher dimensions. Optimisation subject to a single constraint: conversion to a higher-dimensional standard optimisation using a Lagrange multiplier and derivatives.

3. Numerical differentiation and integration (4 lectures)

1st derivative: forward, backwards and centred formulae; order of the approximations. 2nd derivative: centred formula; two dimensions. Trapezium rule, Simpson’s rule; rate of convergence; analysis. Basic idea of Gaussian quadrature and derivation of solution for two points use of 3-5 points.

4. Monte Carlo methods (4 lectures)

Recap weak law of large numbers and probability integral transforms. Simple Monte Carlo estimation of probabilities and expectations. Importance sampling for estimation of probabilities and expectations; heavy-tailed proposals. Advantages and disadvantages compared with numerical integration. Non-parametric bootstrap: confidence intervals for population properties such as mean, median, variance and interquartile range.

5. Numerical solution of ODEs (4 lectures)

Initial value ODEs of the form dx/dt = f(x,t): Euler, mid-point and modified Euler methods; order of the approximations. Modified Euler method motivated by trapezium rule. Runge Kutta 4th order method motivated by Simpson’s rule. Predator-prey (Lotka-Volterra) and epidemic examples.