Exam 1(c) Wed 8 Oct 2003

  1. Suppose the basis of our floating-point numbers is ten and all numbers have a fraction of three decimal places long, with exponents ranging between -9 and +9.
    1. What is the machine precision in this number system?
    2. What is the result of 72.3+2.89 in this number system?
                                                            +--------+
                                                            |    /20 |
                                                            +--------+
    

  2. Consider
                     x             dx          abs(f(x))
              --------------------------------------------
               6.702462e-01   -1.228685e-02   1.846068e-06
               6.794614e-01   -9.215139e-03   5.841073e-07
               6.863727e-01   -6.911355e-03   1.848152e-07
    
    This sequence is obtained by Newton's method. The first column lists the successive approximations for a root, the "dx" in the second column is the increment added to the previous approximation to obtain the "x" at the current line. The last column lists the absolute value of the function evaluated at the approximation.
    1. Estimate the multiplicity of the root from this sequence.
    2. Use the multiplicity to find a more accurate value for the root.
                                                            +--------+
                                                            |    /15 |
                                                            +--------+
    
  3. Consider the system Ax = b, A an n-by-n matrix, det A not zero, b an n-vector, with solution x. The calculated solution xx satisfies A xx = b. Let r = b - A xx. Show that
          ||r||                      ||x - xx||
         ------- <= ||A|| ||A^(-1)|| -----------
          ||b||                        ||x||
    
                                                            +--------+
                                                            |    /15 |
                                                            +--------+
    
  4. Consider f(x) = cos(5x) over the interval [0,1].
    1. Starting with [0,1], apply two steps of the golden section search method, and indicate on the graph below where you do the function evaluations.
      In addition, mark the new intervals as [a1,b1], [a2,b2], and [a3,b3] on the x-axis.

    2. Write the values for x1, x2, f(x1), and f(x2) in the table below:
         +--------+-----------+-----------+-----------+------------+
         |  step  |    x1     |     x2    |   f(x1)   |   f(x2)    |
         +========+===========+===========+===========+============+
         |    0   |  3.820E-1 |  6.180E-1 |           |            |
         |    1   |           |           |           |            |
         |    2   |           |           |           |            |
         +--------+-----------+-----------+-----------+------------+
      
                                                            +--------+
                                                            |    /20 |
                                                            +--------+
    
  5. Consider
                  [  5.028e-01   3.046e-01   6.822e-01  ]
             A =  [  7.095e-01   1.897e-01   3.028e-01  ]
                  [  4.289e-01   1.934e-01   5.417e-01  ]
    
    1. Compute the LU decomposition of A with partial pivoting. Use 4 decimal places with rounding, and write all floating-point numbers in scientific format.
    2. What is the determinant of A?
                                                            +--------+
                                                            |    /30 |
                                                            +--------+