f04lef solves a system of tridiagonal equations following the factorization by
f01lef. This routine is intended for applications such as inverse iteration as well as straightforward linear equation applications.
Following the factorization of the
by
tridiagonal matrix
as
by
f01lef,
f04lef may be used to solve any of the equations
for
, the choice of equation being controlled by the argument
job. In each case there is an option to perturb zero or very small diagonal elements of
, this option being intended for use in applications such as inverse iteration.
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
x04aaf).
The computed solution of the equations
, say
, will satisfy an equation of the form
where
can be expected to satisfy a bound of the form
being a modest constant and
being the
machine precision. The computed solution of the equations
and
will satisfy similar results. The above result implies that the relative error in
satisfies
where
is the condition number of
with respect to inversion. Thus if
is nearly singular,
can be expected to have a large relative error. Note that
f01lef incorporates a test for near singularity.
If you have single systems of tridiagonal equations to solve you are advised that
f07caf requires less storage and will normally be faster than the combination of
f01lef and
f04lef, but
f07caf does not incorporate a test for near singularity.
This example solves the two sets of tridiagonal equations
where
The example program first calls
f01lef to factorize
and then two calls are made to
f04lef, one to solve
and the second to solve
.