The LUMPROVE function uses LU decomposition to iteratively improve an approximate solution X of a set of n linear equations in n unknowns Ax = b . The result is a vector, whose type and length are identical to X , containing the improved solution.
LUMPROVE is based on the routine
mprove
described in section 2.5 of
Numerical Recipes in C: The Art of Scientific Computing
(Second Edition), published by Cambridge University Press, and is used by permission.
Use LUMPROVE to improve an approximate solution X to the linear system Ax = B:
A = [[ 2.0, 1.0, 1.0], $ ; Create coefficient array A.
alud = A ; Create a duplicate of A.
B = [3.0, -8.0, 10.0] ; Define the right-hand side vector B.
X = [.89, 1.78, -0.88] ; Begin with an estimated solution X.
LUDC, alud, INDEX ; Decompose the duplicate of A.
result = LUMPROVE(A, alud, INDEX, B, X)