Department of Mathematics

Math 583: Mathematical Hacking


As usual, we regret that this is a made-up example, but it is just a way to make a point, and to use the linalg subpackage of scipy. Incidentally, I tried to use the Klamath Flow data to make a real problem involving averaging, but it did not really illustrate the ideas adequately, and would have involved too many technical issues for an ICE.

Use the Scipy function linalg.hilbert() to make a Hilbert matrix \(A\) of dimension 100. Make a solution vector \(x\) composed of 100 ones, and find a right-hand-side vector \(y\) as \(y=Ax.\)

  1. Now solve for \(x\) using the linalg.solve() function. Compare with the actual solution \(x\).
  2. Use Tikhonov regularization to solve for \(x\). Compare.
  3. Use a Truncated SVD to solve for \(x\). Compare.
  4. If time permits, do all this also for a uniformly distributed random vector for \(x\), and/or for a sinusoidal vector with 3-5 oscillations.

Assignment 3 is posted.

Department of Mathematics, PO Box 643113, Neill Hall 103, Washington State University, Pullman WA 99164-3113, 509-335-3926, Contact Us
Copyright © 2009-15 Kevin Cooper