Introduction Scientific Computing (WISB356), 2023/2024
Location and time
Tuesday 13:15-17:00 and Thursday 9:00-12:45 starting on Tuesday April 23, 2024 in room BBG023 at the Uithof campus in Utrecht. Please check the rooms on MyTimeTable!
Teachers
Module 1: Paul Zegeling (Mathematics, UU)
Module 2: Tristan van Leeuwen (CWI/UU)
Teaching assistants: Mike de Vries and Niels Heijnekamp
Course material and software
Module 1: in this Module we use Matlab, see Free software at the UU for students. Please install Matlab before the lectures start! And bring your own laptop!
Module 2: Python will be used. If you haven't installed Python yet, please go to: [Anaconda]. A tutorial about jupyter notebooks you may find [here].
Information
All information on module 1 can be found on the present page.
All information on module 2 can be found on Tristan van Leeuwen's ISC webpage.
Grading
Based on two reports, one per module. Report 1 and Report 2 have equal weight and count for 50% of the final grade of the course. Each of the reports needs to obtain a grade of at least 5, and the rounded final grade must be at least 6. The reports can be written in either Dutch or English.
The reports can be written together with (at most) one fellow student.
====> Every student is individually accountable for the whole report.
Reports can be discussed individually afterwards.
This may influence the final grade.
Credits
7,5 ECTS
Description
The aim of this course is to provide a first orientation towards the area of
scientific computing by some case studies from various application areas. Topics treated are widely used techniques
from numerical linear algebra such as the solution of linear systems and eigenvalue problems, within the context of an application such as computing the square root of a matrix (connected to fractional derivatives and Levy flights in epidemiology simulation models) or the processing of images obtained by an MRI scanner. We will also study algorithms for numerically solving space-fractional (and other) partial differential equations.
Both theoretical aspects and practical, software-related
aspects will be treated. Every week there will be frontal lectures alternating with exercise/computer laboratory classes.
This course presents a taste of the master track Applied Mathematics, Complex systems, and Scientific Computing
and it represents an overview of scientific computing.
Prerequisites
Linear algebra (WISB121),
Calculus A (WISB132),
Calculus B (WISB137).
The Bachelor courses Programmeren in de Wiskunde (WISB152) and Numerieke Wiskunde (WISB251) are very useful.
It is not necessary to know Matlab already, as we will start with a gentle introduction to Matlab. Warning: be aware that the level of difficulty of the course will gradually increase during the period of the course, both conceptually and practically, so that near the end (in the second module) we expect the maximum effort from the student.
Schedule
We roughly follow the schedule below. Ch5 means Chapter 5 from the book by Cleve Moler,
"Experiments with Matlab", 2011. Small changes may still occur depending on our progress.
Module 1
We begin with an introduction in Matlab: Chapters 1, 2 (basic calculations, functions, plotting) and Chapters 4, 5 (matrices, linear systems) from the online book by Cleve Moler (2011), Experiments with Matlab. Next, we continue with nonlinear solvers for scalar equations, systems and matrix equations. These will be applied to solve space-fractional partial differential equation models from practice.
- Day 1 (Tuesday April 23, 2024):
Introduction Matlab (Ch1 and Ch2)
- Iterations, logistic equation, chaotic behaviour, Fibonacci sequence, plotting, while/if, flow diagrams.
- Demos from .m files from the book.
- Exercises Ch1: 1, 6, 9, 10, 15 and Ch2: 3, 4, 5, 6, 7, 8.
- Exercise 1a on the use of the "abc-formula" for solving quadratic equations. 1a (English summary of 1a).
- Exercise 1b to "simulate" a hurricane. 1b (English summary of 1b).
Example solutions for 1a and 1b.
- Exercise 1c on the logistic differential equation (DE). An explanation of the different options to treat the logistic DE numerically.
Create a matlab file to solve this problem (make graphs of the solution values as a function of the index).
An interesting video on the logistic differential equation that explains the (possible) chaotic behaviour and its applications in many areas.
- Useful slides: A quick introduction to Matlab, Johns Hopkins University, Computer Science Dept. 2007
- Day 2 (Thursday April 25, 2024)
Matrix laboratory (Ch4)
-
Matrices and Matlab
-
Solving systems, finding eigenvalues, determinants, norms, etc
-
Euler Backward, Method of Jacobi
- Exercises Ch4: 2, 3, 4, 5, 8, 14.
- Exercise 2a on a basic method for solving linear systems (Jacobi method). More information can be found here.
- Useful videos on linear algebra:
Essence of linear algebra
by 3Blue1Brown, a YouTube channel on animating mathematics.
Additional useful slides: Solving Systems of Linear Equations by Greg Fasshauer, Illinois Institute of Technology.
- Day 3 (Tuesday April 30, 2024):
Nonlinear equations
-
Basic methods and their properties
-
Continuous Newton versus Euler-Forward
-
Two dimensions, the complex version and Newton fractals
-
Today's lecture notes.
- Exercise 3a
Exercise 3b
Exercise 3c
Exercise 3d
Exercise 3e
Note that you need to specify the functions f, its derivative fprime, the Jacobian jac, etcetera in separate files!
- How to plot a Newton-fractal can be found
here.
- Exercise 3f on Newton's method for calculating eigenvalues and eigenvectors.
- Day 4 (Thursday May 2, 2024):
Heat equation and nonlinear differential equations
-
Finite-difference matrices and the Method-of-Lines: the matrix D2
-
Numerical stability: Euler-Forward vs Euler-Backward
-
IMEX method for nonlinear PDEs
-
Applications: Fisher PDE from population dynamics and a non-equilibrium model from geo-hydrology
- Today's lecture notes.
- Exercises: 4.1 on the heat equation (with a reference solution), and 4.2 on the nonlinear Fisher PDE (with a reference solution).
Exercise 4.3 on a PDE from geo-hydrology (with reference 1, reference 2 and reference 3 solutions).
On this sheet you can find a short explanation of the approximation via an IMEX-method.
And here you can find some background information about the tau-model.
- Day 5 (Tuesday May 7, 2024); 13:15-15:15! (15:30 Aes2-symposium):
Square roots of matrices
- Finite-difference (FD) matrices
- Square root(s) of some matrices
- Matrix-Newton method (stable or unstable?)
- Denman-Beavers algorithm
- Today's lecture notes.
- pth-roots of matrices: pdf
- Exercise 5.1 on finite difference matrices and their eigenvalues
Exercise 5.2 on the matrix-Newton method
Exercise 5.3 on the Denman-Beavers algorithm.
- ==> Thursday May 9, 2024: no class ("hemelvaartsdag")
- Day 6 (Tuesday May 14, 2024):
Space-fractional heat equation
- Fractional derivatives, the fractional Laplacian, applications
- The finite-difference matrix D3
- The Matlab functions expm and sqrtm; square roots of FD-matrices
- Today's lecture notes.
- Some extra information on the matrix square root sqrtm.m in Matlab.
- Exercises: 6.1 on space-fractional heat equations and 6.2 on a space-fractional Fisher equation.
- Day 7 (Thursday May 16, 2024; between 11:00 and 12:45):
Questions can be asked about Project 1 (for Report 1)
- You can find the information about Project 1 of Module 1 here (available).
- The deadline for Report 1 is THURSDAY May 30 11:00 before the start of the tutorial session of Lecture 4 of Module 2 (in room BBG001); a printed version or via e-mail in ONE pdf-file!.
Last update of this page by
Paul Zegeling: May 27, 2024.