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 parameter
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 (DGTSV) requires less storage and will normally be faster than the combination of
F01LEF and F04LEF, but
F07CAF (DGTSV) 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
.