Answer to Quiz 1 Fri 11 Jan 2002


1. Apply three steps with the bisection method to find an approximation
   for a root of ln(x) = 0 inside the interval [a,b] = [0.1,1.5].
   Write your result with four significant decimal places after rounding,
   in scientific notation in the table below:

   +--------+-----------+-----------+-----------+-------------+
   |  step  |     a     |     b     |  (a+b)/2  | ln((a+b)/2) |
   +========+===========+===========+===========+=============+
   |    1   |  1.000E-1 |  1.500E+0 |  8.000E-1 |  -2.231E-1  |
   |    2   |  8.000E-1 |  1.500E+0 |  1.150E+0 |   1.398E-1  |
   |    3   |  8.000E-1 |  1.150E+0 |  9.750E-1 |  -2.532E-2  |
   +--------+-----------+-----------+-----------+-------------+

2. The expressions

               x^3 - y^3
     a(x,y) = -----------   and  b(x,y) = x^2 + x*y + y^2
                 x - y

   are mathematically equivalent.  
   However, there is an important numerical difference:

   (a) Take x = sqrt(10) and y = sqrt(10) + 10^(-8) and
       evaluate both a(x,y) and b(x,y).

       Write your answers below in full, as you see them on
       your calculator screen.


   a(sqrt(10),sqrt(10) + 10^(-8)) = 3.00001 E+1

   b(sqrt(10),sqrt(10) + 10^{-8}) = 3.000000009 E+1

   |a(sqrt(10),sqrt(10)+ 10^{-8}) 
    - b(sqrt(10),sqrt(10)+ 10^(-8))| = 9.9905131 E-5


   (b) Which expression (a(x,y) or b(x,y)) gives the most accurate value?
       Explain your choice.

   Expression b(x,y) is most accurate because we lose a lot of
   significant digits in x-y when x is close to y.  This loss of
   accuracy is magnified by the division.