- dr. R.P. Dwight <r.p.dwight@tudelft.nl>
- Part of the BSc in Aerospace Engineering, TU Delft
Prerequisites: university-level a) calculus, and b) linear algebra. Exposure to real analysis would be an advantage, but is not necessary. In addition numerical exercises will be done in Python - some programming experience is required.
Topics: Numerical analysis is a broad heading, and we will cover a toolbox of methods for solving the problems of:
- Solving nonlinear (systems of) equations;
- Interpolating data;
- Regressing data;
- Approximating derivatives and integrals;
- Solving ordinary differential equations (ODEs); and
- Solving continuous minimization/maximization problems.
Structure: The course is structured in 6 modules, each module taking about one week, and tackling one of the above problems. For each module there are homework questions, old exams, and Python tutorials, in addition to the lecture material (videos) and course reader.
- Module 0: Introduction, motivation and fundamentals
- Module I: Solution of nonlinear equations
- Module II: Polynomial interpolation
- Module III: Advanced interpolation and regression
- Module IV: Numerical differentiation and integration
- Module V: Numerical solution of ODEs
- Module VI: Numerical optimization
Recordings of inverted classrooms:
- Module I: Numerical root-finding - Chapters 1-2
- Module II: Polynomial interpolation + regression - Chapters 3, 5
- Module III: Multi-dimensional + spline interpolation - Chapter 4
- Module IV: Numerical differentiation and integration - Chapters 6-7
- Module V: Numerical solution of ODEs - Chapter 8
- Module VI: Numerical optimization - Chapter 9
- Module 1: [questions] [answers]
- Module 2: [questions] [answers]
- Module 3: [questions] [answers]
- Module 4: [questions] [answers]
- Module 5: [questions] [answers]
- Module 6: [questions] [answers]
- 2015
- Modules 1-2: [questions] [answers]
- Modules 3-4: [questions] [answers]
- Modules 5-6: [questions] [answers]
- 2016
- Modules 1-2: [questions] [answers]
- Modules 3-4: [questions] [answers]
- Modules 5-6: [questions] [answers]
- Resit (Modules 1-6): [questions] [answers]
- 2017
- Modules 1-2: [questions] [answers]
- Modules 3-4: [questions] [answers]
- Modules 5-6: [questions] [answers]
- Resit (Modules 1-6): [questions] [answers]
- 2018
- Modules 1-2: [questions] [answers] [working]
- Modules 3-4: [questions] [answers]
- Modules 5-6: [questions] [answers]
- Resit (Modules 1-6): [questions] [answers]
- 2019
- Modules 1-2: [questions] [answers]
- Modules 3-4: [questions] [answers]
- Modules 5-6: [questions] [answers]
- Resit (Modules 1-6): [questions] [answers]
- 2022
- Modules 1-2: [questions] [answers]
- Modules 3-4: [questions] [answers]
- Modules 5-6: [questions] [answers]
4b. Worked solutions
These are worked solutions for the homework questions, as well as the Quizzes of 2013, 2015 & 2016. These were written entirely by an ex-student Sam van Elsloo, but I've checked everything personally and they are now an official part of the course material. Please let me know (as with all course material), if you find any errors.
- Homeworks 1-2: [solutions]
- Homeworks 3-4: [solutions]
- Homeworks 5-6: [solutions]
- Quizzes 1-2: [solutions]
- Quizzes 3-4: [solutions]
- Quizzes 5-6 (only 2013, 2015): [solutions]
For each Module an IPython notebook is available. These can be worked through on your own laptops if you have a complete scientific Python install (numpy, scipy, ipython, etc.) - Anaconda with Python 3.6 is recommended. For those with no programming experience, try following a couple of lessons at Codecademy. The notebooks do not require advanced Python knowledge.
To ensure access for everyone I've setup a server at: https://ipython.lr.tudelft.nl:8888. The port number is important! Your username is your TU Delft NetID, and your password will appear in Brightspace GradeCenter. The notebooks will appear on this server. Moreover, on this server you can run the notebooks from within any browser, make modifications, plots, etc. Please just bear in mind that your code is not running locally, but on the server, which has limited capacity. So please don't perform long-running computations. And anyone doing e.g. BitCoin mining will be kicked off quickly!
Notebook files:- Basics_Convergence.ipynb
- Basics_Floating_point.ipynb
- Basics_Taylor_series.ipynb
- Module1_Root_finding.ipynb
- Module2_Polynomial_interpolation.ipynb
- Module3_Cubic_splines.ipynb
- Module3_Radial_basis_functions.ipynb
- Module4_Numerical_Differentiation.ipynb
- Module4_Numerical_Integration.ipynb
- Module5_ODEs.ipynb
- Module6_Optimization.ipynb
5b. IPython Assignments (bonus points)
There are two programming assignments for this course, A and B, available on the IPython server and here. Each assignment is worth 0.25 bonus points (added to your grade from the exams) - and requires you to carefully do a programming exercise. To login to the server and see the assignment:- Go to https://ipython.lr.tudelft.nl:8888 in a browser.
- Your username is your netid (without @tudelft.nl), your password you will find in GradeCenter for this course (this is a randomly chosen word).
- On successful login you will see a directory listing with ~12 IPython notebooks and a directory Assignment_A (see below). The former are ungraded, and just to help you grasp the material if you need them. To start the graded Assignment go to Assignment_A and open Assignment_A.ipynb. You can edit this document and run code; all your edits will be saved on the server permanently. If you make a mess of it and want to start from scratch you can replace Assignment_A.ipynb with the one available on the course website: Assignment_A.ipynb. It is much easier to just copy the original on the server before you start making changes however.
- Grading will be done on the basis of a single numeric answer that you obtain at the end of the assignment. This value depends on your netid, and if it is not correct you will not get the bonus points, regardless of the nature of your error. The assignment offers many locations where you can check the correctness of your code - including the final answer - use these! This assignment is (at least partially) an exercise in being careful and precise.
- You don't need to "submit" your assignment, as such. After completing the assignment (and double checking your answer), just leave your saved file Assignment_A/Assignment_A.ipynb on the server. On the deadline I will grab this file from your account, and whatever is in that file after the deadline will constitute your submission.
- I recommend doing the assignment in small groups of ~2-3 - and especially if you have no Python experience try to team up with somebody who does. Every individual has to submit their own answer based on their netid however.
- You are eligible for the bonus points only if your grade from the quizzes is (>= 5.0). Also if your grade from the quizzes is 10.0, unfortunately I can't give you any more points...
The course has two slots per week in Q3, mostly Tuesdays 13:45-15:30 and Fridays 15:45-17:30 - but varying week-to-week. One slot per week will be used for:
- Tutorials - A short recap lecture of the week's material, introduction of advanced material, followed by audience discussion, and answering requested homework questions. You must prepare for the tutorial by studying the week's material in advance! The tutorials will not be useful for you otherwise. Tutorial slides (from 2023):
- 1-on-1 Help sessions - Individual or small-group help. Come with your questions about anything and the lecturers and TAs will attempt to answer them. Also for questions about advanced topics.
The course is assessed with 3 partial exams, in Weeks 3.4, 3.6 and 3.9. Please check Osiris for the dates and times already - you'll need to be available for all three partial exams to get credit for the course. These exams all require registration in Osiris, and since the first one is week 3.4 the deadline is soon after the start of the course.
The exam questions will be the same style as in previous years - i.e. 10 multiple choice questions in 1.5 hours. The exams will be preferentually held on-site, if not possible they will be remote using Mobius with remote proctoring.
There are three fundamental study activities which can help gain understanding of the - sometimes abstract - ideas in this course:
- Teach someone else;
- Devise variations of the method and hypothetical situations; and
- Explore connections between parts of the course.
- In your own words (without reference to the reader or lectures),
communicate to someone a basic idea or definition. For example:
- What is a root?
- What is a fixed-point iteration?
- What does "convergence" mean?
- Why are we interested in convergent methods only?
- What is the significance of i?
- Create variations of methods/problems, ask "What if...?" questions.
For example:
- What happens if we divide an interval into two unequal pieces in recursive bisection? How is the convergence rate affected?
- What happens if we apply a fixed-point iteration to a linear function?
- Or Newton to a linear function?
- Could we generalize Newton's method, by using a quadratic approximation of f(x) at x_0, to get even better convergence?
- If we want a very low error (e.g. \(10^{-16}\)) which root finding algorithm should we use? I.e. which will give an answer in the fewest evaluations of f?
- Can we combine two or more of the methods learnt to get an algorithm that has nicer properties than any of them individually?
- What if we need to solve the problem: min f(x)? Can we do this with a root-finding method? What requirements must we place on f?
- What kind of problems are going to occur when using these methods with floating-point arithmetic?
- Find connections between course compenents. Understand one idea
in terms of another. For example:
- How does Newton's method relate to the Taylor expansion?
- How does Newton relate to fixed-point iterations in general?
- In what way is the number of iterations N, in root-finding methods, similar to the number of intervals N, in the integration method discussed in the lectures? In what ways are they different?