Approximation · Error · Convergence

Applied Numerical Analysis

How do we compute an approximate solution to a mathematical problem, and decide whether it is accurate enough?

Recommended background: linear algebra and calculus 2.

This course is being built. Only some of the units are published; the rest are marked ‘in preparation’. What is published is complete and can be studied now.

Learning materials and visual explanations

  1. Numbers and Errors in the Computer

    Available

    Binary representation, floating point, rounding, and how errors arise and grow.

    A computer can get even a simple sum wrong, one a child in school can do. You will see how it stores numbers, learn to recognise the limits of its accuracy, and understand how a tiny error can grow.

    At the end of the unit you will be able to tell when a computer result can be trusted, measure an error in absolute and in relative terms, and recognise when small errors accumulate into a significant mistake.

    1. 1.1LessonHow Computers Store NumbersHow a computer stores numbers: binary fractions, the floating-point format and the IEEE 754 standard.
    2. 1.2LessonBack to the Question: Rounding and Machine EpsilonThe stored values behind the opening question, a tie resolved to even, machine epsilon, and how the gap between numbers grows with their size.
    3. 1.2ExerciseComputing the Stored Representation: Two MethodsTwo ways to find the binary64 number the computer stores for a decimal, step by step, and two sums that look alike but behave differently.
    4. 1.2ExercisePractice: How Accurate Is the Computer?Inspect stored bits, explore the limits of binary64, compare floating-point numbers safely, and solve the rounding puzzle: practice for the lecture “How Computers Store Numbers”.
    5. 1.3LessonSmall Errors, Big Consequences: The Patriot ClockHow a rounding error of one part in ten million brought down a missile defence: absolute and relative error, accumulation, truncation and round-off error, and cancellation.
    6. 1.3ExercisePractice: error, accumulation and subtraction of nearly equal numbersAbsolute and relative error, avoiding accumulated drift and rewriting a formula that subtracts nearly equal numbers, the usual mistakes and transfer questions: practice for the lecture on the Patriot clock and numerical error.
    7. 1.3ExerciseUnit 1, questions to solve on paper: numbers and errorsTen questions in three groups (concepts, short hand calculations, transfer to a new situation) on number representation, rounding and error accumulation, written to be solved on paper without the simulators.
    8. 1.4Application and depthChoosing numbers for real systemsThree real failures (a stock index, a rocket, an aircraft power system) and the design decisions about numbers behind them: representation, rounding rule, range, error threshold and what to do with exceptions.
  2. Nonlinear Equations in One Variable

    Available

    Bisection, regula falsi, secant, Newton–Raphson, fixed-point iteration, and inverse quadratic interpolation.

    How do you look for a solution without knowing in advance where it is? Sometimes you can advance carefully, with a clear boundary around the region where the solution must lie. Sometimes you can try faster jumps, and you will also learn when they may take you far from the target. You will practise changing your mind: watching the numbers while a method runs, and switching to another method in the middle when the plan stops working.

    At the end of the unit you will be able to choose, run and compare bisection, regula falsi, the secant method, Newton–Raphson, fixed-point iteration and Brent’s method; read the step and the residual together; change method in the middle of a run.

    1. 2.1LessonThe intermediate value theorem and bisection: where a function crosses zeroSolving an equation that has no formula, starting from the interest rate hidden in monthly instalments: the intermediate value theorem proved by bisection, the error bound, the rate of convergence and real-world examples.
    2. 2.2LessonRegula falsi: proofs and convexityThe method of regula falsi: the chord, the proof that it stays inside the bracket, and a convex function where one end stays in place and the method converges, and a proof that it converges to the root, without convexity, when the root is unique.
    3. 2.3LessonThe rate of convergence: a weak bound and a strong ratioHow many digits a method gains per step: the error, linear convergence in a weak sense (bisection) and in a strong sense (regula falsi with a fixed end), the order of convergence, and a proof that the ratio of convergence is 1 − f′(r)/f[a, r].
    4. 2.3ExercisePractice: bisection and regula falsiBisection and regula falsi by hand with a table, the usual mistakes, transfer questions and a Python implementation: practice for the lecture on finding where a function crosses zero.
    5. 2.4LessonUsing the Slope: Newton–Raphson and the Secant MethodFinding the volatility implied by a real option price in a handful of steps: Newton-Raphson, the secant method, quadratic convergence, and when the slope misleads.
    6. 2.4ExercisePractice: Newton and the secant methodNewton steps by hand and a cycle where the tangent does not help, the usual mistakes, transfer questions and a Python implementation: practice for the lecture on methods that use the slope.
    7. 2.5LessonRepeating a Rule: Fixed-Point Iteration and Inverse Quadratic InterpolationFixed-point iteration and why its error shrinks by the factor |g′|, Newton as a special case, inverse quadratic interpolation without a derivative, and how Brent’s method combines the fast steps with bisection.
    8. 2.5ExercisePractice: fixed-point iteration and inverse quadratic interpolationFixed-point iterations by hand, predicting the convergence factor, one step of inverse quadratic interpolation, the usual mistakes, and a Python implementation: practice for the lesson on repeating a rule.
    9. 2.6ExerciseChoosing a method: which tool for which problemA lab session after all the root-finding methods: what each one needs and what it risks, problems with stated assumptions and costs, and the habit of changing method in the middle of a run when the numbers say the plan is not working.
    10. 2.6ExerciseUnit 2, questions to solve on paper: nonlinear equationsTen questions in three groups (concepts, short hand calculations, transfer to a new situation) on bisection, Newton, fixed-point iteration, inverse quadratic interpolation and the cost of root-finding methods, written to be solved on paper without the simulators.
  3. Nonlinear Systems and Optimization

    In preparation

    Multivariable Newton method and gradient descent.

    When a problem has several unknowns or several goals, the space of possibilities is large. You will learn how to search it, and how to tell real progress from getting stuck in a solution that is only locally good.

    At the end of the unit you will be able to search a large space of possibilities and tell real progress from a trap that is only locally good.

  4. Systems of Linear Equations

    In preparation

    LU and Cholesky factorizations, and the Jacobi and Gauss–Seidel iterations.

    Systems of equations raise a question: do the data allow a stable solution, or could a small change in them change the result a great deal?

    At the end of the unit you will be able to judge whether the data allow a stable solution, and how much a small change in them can move the answer.

  5. The Largest Eigenvalue

    In preparation

    The power method.

    A system can look too complicated to tell where it is heading. You will search for the hidden forces that shape its motion, and find out whether small differences fade away or grow.

    At the end of the unit you will be able to find the dominant direction of a system and tell whether small differences fade or grow.

  6. Interpolation

    In preparation

    Lagrange and Newton polynomials and natural cubic splines.

    In the real world we almost never get all the information. You will learn to connect the moments you measured, and to ask whether the path you built between them is reasonable, or whether your guess invented a story the data do not support.

    At the end of the unit you will be able to connect measurements and judge whether the path between them is supported by the data.

  7. Smoothing and Regression

    In preparation

    Padé approximation, the least-squares principle, and several kinds of regression.

    Real data jump, wobble and sometimes mislead. You will learn to tell what really changes from what is noise, and not to let a random fluctuation pull you away from the trend.

    At the end of the unit you will be able to separate a trend from noise.

  8. Numerical Differentiation

    In preparation

    Forward, backward and central differences, and formulas from interpolating polynomials.

    A picture of one moment tells us the state now, but not whether we are advancing, stopping or losing height. You will infer, from partial pictures, what is changing and how fast, and when the information you hold is enough to act.

    At the end of the unit you will be able to estimate how fast something changes from partial data, and choose a step size.

  9. Numerical Integration

    In preparation

    Rectangle, trapezoid, and Simpson rules, with error estimates.

    Large results are sometimes built from many small changes, each barely noticeable alone. You will put the parts together, understand the total effect, and estimate how far the conclusion can be trusted even without a perfect picture of every step.

    At the end of the unit you will be able to add up many small changes and bound how far the total can be off.

These materials supplement the teaching in the course. The syllabus, deadlines, assessment instructions, and group announcements are published in the institution’s course system.