Numerical Analysis I, Fall 2017 (http://www.math.nthu.edu.tw/˜ wangwc/)

Homework Assignment for Week 01

Due Friday, Sep 22, 1:20PM. Goal: Review basic programming skills. Understand source and amplification of errors resulted from floating point arithmetics and how to avoid it, if possible.

1. Section 1.2: Problems 19, 22, 28.

For your convenience, a scanned copy for section 1.2 problems is available on the course homepage, for this week only.

In problem 22, use standard double-precision calculation, which is default in most modern languages including matlab (i.e. need not round or chop to 3-digits). In addition of summing to i = 9, experiment with summing to i = 10, i = 11, etc. and check the result. It helps you to explain why.

If you choose to use matlab, don’t forget to turn on ’format long’. Also, you can trust the result of ’exp(-5)’ as the true answer.

2. We showed in class that relative error resulted from multiplication and division is roughly 3ε_{M}. How about adding two numbers of the same sign? Explain.

3. Find both roots of x^{2} + 10^{4}x + 10^{−4} = 0 as accurate as possible with standard doubleprecision calculation.

4. Download plotf.m from the course homepage, read it and figure out what it is about.