Assignment 1 AMATH 740, CS 770, CM 750

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment

Description

5/5 - (5 votes)

Reading:
Optional: C. Moler ”Numerical Computing with Matlab” (online, free download), especially Ch.
1.7
Required: M. Overton ”Numerical Computing with IEEE Floating Point Arithmetic” (posted 2.5
pages on integer arithmetic)
1. (a) Consider an approximation of the first derivative of f(x)
df
dx ≈
f(x + h) − f(x)
h
.
The error in this appximation is e(x)
e(x, h) = f(x + h) − f(x)
h
− f
0
(x). (1)
Using the Taylor series expansion of f(x + h) about x, obtain
e(x, h) = h
2
d
2f
dx2
(x + ξ).
Plot e(x, h) in (1) on the log-log scale for h ranging from 0.1 to 10−20 for the function
of your choosing at a point x of your choosing. In an exact arithmetic we would
expect e(x,h) to linearly decay with h. However with the floating point computer
arithmetic you will find that the error begins to increase starting at some h. Explain
this phenomenon and give a rough estimate (the order of magnitude is sufficient) for
this turning point.
(b) Repeat the part above for
d
2f
dx2

f(x + h) − 2f(x) + f(x − h)
h
2
2. Give your own examples that would illustrate inexactness of algebraic operations, noncommutativeness of algebraic operations, and cancellation errors in IEEE floating point arithmetics
(see Moler p.40 for an example). Include a print-out of your Matlab session or your code.
3. Exercise 1.38 in Moler
4. Exercises 3.1 – 3.6 in Overton
1