0% found this document useful (0 votes)
63 views2 pages

Numerical Analysis

This document contains instructions for Assignment 1 of the MAT801 Numerik I course. It includes 3 exercises: 1. Prove bounds on rounding error and compute sinh(x) accurately for small x. 2. Analyze error in computing cos(x + δ) - cos(x) and prove whether addition is more accurate when terms are added left-to-right or right-to-left. 3. Compute two expressions for a summation, compare errors to the exact value, and sum exponential series recursively to machine precision. Analyze convergence of an iterative method in machine arithmetic.

Uploaded by

Anonymous edG2bq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views2 pages

Numerical Analysis

This document contains instructions for Assignment 1 of the MAT801 Numerik I course. It includes 3 exercises: 1. Prove bounds on rounding error and compute sinh(x) accurately for small x. 2. Analyze error in computing cos(x + δ) - cos(x) and prove whether addition is more accurate when terms are added left-to-right or right-to-left. 3. Compute two expressions for a summation, compare errors to the exact value, and sum exponential series recursively to machine precision. Analyze convergence of an iterative method in machine arithmetic.

Uploaded by

Anonymous edG2bq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

MAT801

Numerik I  Assignment 1
Deadline: 01.03.2018, 12:00

Exercise 1
a) Let x ∈ R and denote by rd(x) ∈ R(t, s) the symmetric rounding. Prove that

x − rd(x)
≤ 2−t
x

holds. (3 points)
b) Suppose that, for |x| small, one has an accurate value of y = ex − 1 (obtained, e.g.,
by Taylor expansion). Use this value to compute accurately sinh(x) = e −e2 . (1
x −x

point)

Exercise 2
a) Let
y = cos(x + δ) − cos(x). (1)
Explain the diculty of computing y for small values of δ . Find an alternative
expression of (1) that does not exhibit these diculties. (2 points)
b) Let x, y, z ∈ R(t, s). Use error analysis of rst order (i.e. ignore quadratic and higher
order error terms) to prove that the oating-point addition fl(fl(x + y) + z) is more
accurate than fl(x + fl(y + z)) if and only if |x + y| < |y + z|. (2 points)

Exercise 3
a) Write a program to compute
N   X N
1 1 1
(2)
X
SN = − =
i=1
i i+1 i=1
i(i + 1)

once using the rst summation and once using the (mathematically equivalent) second
summation. For N = 10k , k = 1 : 7, compute the respective absolute errors with
respect to the value limN →∞ SN = 1. Format your Matlab output so that the errors
can be compared easily. Comment on the results. (2 points)

1
b) Sum the series
∞ ∞
X (−1)n X 1
• , •
n=1
(n!)2 n=1
(n!)2
until there is no more change in the partial sums to within the machine precision.
Generate the terms recursively. Print the number of terms required and the value of
the sum. (2 points)
c) Let f (x) = (n + 1)x − 1. The iteration
1
xk = f (xk−1 ), k = 1, 2, . . . , K, x0 =
n
in exact arithmetic converges to the xed point 1/n in one step. What happens in
machine arithmetic? Run a program with n = 1 : 5 and K = 10 : 10 : 50 and explain
what you observe. (2 points)

You might also like