Linear Algebra/Topic: Accuracy of Computations/Solutions

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Solutions[edit | edit source]

Problem 1

Using two decimal places, add and .

Answer

Sceintific notation is convienent to express the two-place restriction. We have . The has no apparent effect.

Problem 2

This intersect-the-lines problem contrasts with the example discussed above.

                

Illustrate that in this system some small change in the numbers will produce only a small change in the solution by changing the constant in the bottom equation to and solving. Compare it to the solution of the unchanged system.

Answer

The reduction

gives a solution of .

Problem 3

Solve this system by hand (Rice 1993).

  1. Solve it accurately, by hand.
  2. Solve it by rounding at each step to four significant digits.
Answer
  1. The fully accurate solution is that and .
  2. The four-digit conclusion is quite different.
Problem 4

Rounding inside the computer often has an effect on the result. Assume that your machine has eight significant digits.

  1. Show that the machine will compute as unequal to . Thus, computer arithmetic is not associative.
  2. Compare the computer's version of and . Is twice the first equation the same as the second?
Answer
  1. For the first one, first, is and so . For the other one, first and so .
  2. The first equation is while the second is .
Problem 5

Ill-conditioning is not only dependent on the matrix of coefficients. This example (Hamming 1971) shows that it can arise from an interaction between the left and right sides of the system. Let be a small real.

  1. Solve the system by hand. Notice that the 's divide out only because there is an exact cancelation of the integer parts on the right side as well as on the left.
  2. Solve the system by hand, rounding to two decimal places, and with .
Answer
  1. This calculation
    gives a third equation of . Substituting into the second equation gives so and thus . With those, the first equation says that .
  2. The solution with two digits kept
    comes out to be , , and .

References[edit | edit source]

  • Hamming, Richard W. (1971), Introduction to Applied Numerical Analysis, Hemisphere Publishing.
  • Rice, John R. (1993), Numerical Methods, Software, and Analysis, Academic Press.