Вы находитесь на странице: 1из 1

Numerical Methods-Assignment-2

Numerical errors, Error Propagation, Basic Concepts of Iteration & Stability


(1) Let M be a sufficiently large number which results in an overflow of memory and m be a suffi-
ciently small number which results in underflow of memory of a computing device. Then give the
output of the following operations:
(i) M × m (ii) M/m (iii) m/m (iv) k × M (v) k × m (vi) m/M, where k is a constant.

(2) In the following problems, show all the steps involved in the computation.
(i) Using 5−digit rounding and chopping, compute 37654 + 25.874 − 37679.
(ii) Let a = 0.00456, b = 0.123, c = 0.128. Using 3-digit rounding and chopping, compute
(a + b) + c and a + (b + c). What is your conclusion?
(iii) Let a = 2, b = 0.6, c = 0.602. Using 3−digit rounding and chopping, compute (a × b) + (a ×
c). What is your conclusion?

(3) Let x, y, and z be real numbers whose floating point approximations in a computing device co-
incide with x, y, and z, respectively. Show that the relative error in computing x(y + z) equals
ε1 + ε2 − ε1 ε2 , where ε1 = Er ( f l(y + z)) and ε2 = Er ( f l(x × f l(y + z))).

(4) Let ε = Er ( f l(x)). Show that


(i)|ε| ≤ 10−n+1 if the computing device uses n−digit (decimal) chopping.
(ii) |ε| ≤ 12 10−n+1 if the computing device uses n−digit (decimal) rounding.
(iii) Can the equality hold in the above inequalities?

(5) Let xA = 3.14 and yA = 2.651 be obtained from the numbers xT and yT respectively using 4-digit
rounding. For any such values of xT and yT , find the smallest interval that contains
(i) xT + yT (ii) xT /yT (iii) xT × yT .

(6) Let x < 0 < y be such that the approximate numbers xA and yA has seven and nine significant digits
with x and y respectively. Show that zA := xA − yA has at least six significant digits when compared
to z := x − y.

(7) Let xT be a real number. Let xA = 2.5 be an approximate value of xT with an absolute error at
most 0.01. The function f (x) = x3 is evaluated at x = xA instead of x = xT . Estimate the resulting
absolute error.

(8) Let f : R → R and g : R → R be continuously differentiable functions such that


0 0
(i) there exists constant M > 0 such that | f (x)| ≥ M and |g (x)| ≤ M for all x ∈ R,
(ii) the condition number of f is less than 1, and
(iii) the condition number of g is greater than 1.
Show that |g(x)| < | f (x)| for all x ∈ R.

(9) Find the condition number at a point x = c for the following functions
(i) f (x) = x2 , (ii) g(x) = π x , (iii) h(x) = bx .
2
sin (x)
(10) check for stability of computing the function h(x) = 1−cos 2 x for values of x very close to 0. Run

in Matlab and see the output for x = 10 (−7.97) for the function h(x) and also try with some non-
negative number less than x, for instance, x = 10−8 . Note that for any x ∈ R, h(x) = 1.

Вам также может понравиться