Problem 7    Due 2/9/00

This problem illustrates the use of
PLU decomposition to solve systems of
linear equations.  Generate a 7x7
Hilbert matrix using the approach in
the class demonstration.  Factor the
matrix into P, L, and U using the Matlab
command 'lu'.  For information on how to
do this, type 'help lu' at the command
prompt.  Write a script which uses the
factorization to solve the problem A x = b
where A is the hilbert matrix, and b is
the vector:

b=
   7.00000000000000
   5.28214285714286
   4.34206349206349
   3.71309523809524
   3.25382395382395
   2.90061327561328
   2.61919746919747
You should do this by solving the consecutive
problems:
a)   P z = b
where P is the permutation matrix,

b)   L y = z
where L is the lower triangular matrix, and

c)   U x = y
where U is the upper triangular matrix.

You may -not- use the \ command to solve these
problems.  Instead, write a simple forward sub-
stitution routine to get y, and a back substitution
routine to get x.  Getting z is really easy, as
P'*P is the identity matrix for all permutation
matrices.

Show that your result is the same as you would
obtain from the command x = A \ b