> MATH 164 -- Lectures Log

MATH 164 - Introduction to Numerical Analysis

Instructor: Roberto De Leo.     Term: Fall 2020.

W1, August 24

Topics

  1. Introduction to the course.
  2. What is Numerical Analysis? Read this article by L. Trefethen.

W1, August 26

Topics

  1. Representing real numbers in Fixed Point systems.
  2. Truncation errors.
  3. A concrete example of truncation error: in a decimal fixed point system, $3(4/3-1)-1\neq0$!

W1, August 28

Topics

  1. Meaning of absolute and relative errors.
  2. An idea of floating-point systems.
  3. An example of propagation of errors: how significant digits are lost when subtracting two very close numbers.

W1 Assignments

Readings

  • Carefully read the textbook from page 1 to Experiment 2, ending at page 4.
  • Read the following elementary lecture notes on floating-point numbers: Lecture2-FloatingPoint.pdf, by H. Straubin (Boston College)
    We are going to discuss this content in class on Monday so make sure to read the notes before class and be ready to ask me in class anything you do not find 100% clear in these notes.
  • Give a read the Trefethen paper about what Numerical Analysis is about. You might find some part too hard, so perhaps concentrate on the parts I highlighted. At the end of the course, you should be able to understand better most of its content.

Homework

  1. Use octave-online and your own calculator to carry on the calculations in Experiment 1 at page 2 of your textbook. Write down the results you get with both of them. They could be different because hand calculators often use different floating point representations than standard PCs.
  2. Using either octave-online or your calculator, solve the equation $$ x^2-2x+\delta=0 $$ with $\delta=0.01$ in the fixed point system I introduced in class, the one with two digits after the dot, using two different but equivalent (can you see why they are so?) formulas: $$ x = 1-\sqrt{1-\delta} $$ and $$ x = \frac{\delta}{1+\sqrt{1-\delta}}. $$ Remember that, at every step, you have to truncate your results to the second digit after the dot. Which formula gives the most accurate result? Can you guess why?
  3. Solve the problem above using a floating point system with three digits. Remember that this just means that, at every step in your calculations, you must keep only the first three significant digits of the result.
    Hence, in such system, the number 12.34 would be truncated to 12.3; the number 7651.2 to 7650.0; the number 0.045678 to 0.0457 and so on. In particular, notice that 1.23+0.00123=1.23!

W2, August 31

Topics

  1. Examples of fixed-point and floating-point calculations.
  2. Taylor expansion of a function.

Readings

  1. Section 1.2, pages 10-11

W2, September 2

Topics

  1. The remainder term of the Taylor expansion of a function.

Readings

  1. Section 1.2, pages 11-13

W2, September 4

Topics

  1. The Bisection method.

Readings

  1. Section 2.1, pages 37-39

W3, September 7

Labour Day

W3, September 9

Topics

  1. Group work on evaluating a function via Taylor series.

W3, September 11

Topics

  1. More explanations on using Taylor series to evaluate a function within some given maximum error.

W3 Assignments

Readings

  • Carefully read the textbook pages 10-16 and 37-40.

W4, September 14

Topics

  1. More explanations on the bisection method to find approximate roots.

W4, September 16

Topics

  1. Difference between pseudo-code and code in some programming language.
  2. Conditionals in MATLAB.

W4, September 18

Topics

  1. Loops in MATLAB.
  2. A MATLAB implementation of the bisection method.

W4 Assignments

Readings

  • Carefully re-read the textbook pages 10-16 and 37-40.
  • Learn about loops and conditionals in Octave/MATLAB at pages 24-25 and 40-41 respectively

Homework

Solve the following problems from the book: #15 at page 17, #9 at page 43, #31 at page 45.

W5, September 21

Topics

  1. Iterating functions and web diagrams.

W5, September 23

Topics

  1. Main theorem on iterating functions: close to a fixed point $x_0$ of a differentiable function $f(x)$ with continuous first derivative, points converge to $x_0$ under iterations if $|f'(x_0)|<1$ and get far from $x_0$ under iterations if $|f'(x_0)|>1$. When $|f'(x_0)|=1$, nothing can be said in general.
  2. An important Example: the logistic map.

W3, September 25

Topics

  1. How to find roots with the fixed point method.
  2. Octave code to find roots with the fixed point method.

W5 Assignments

Readings

  • Carefully read the textbook pages 46-51 (you can skip the proofs).

Homework

Solve the following problems from the book: #5,6 at page 54, #19 at page 55.