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
$n$ by
$n$ tridiagonal matrix
$\left(T-\lambda I\right)$ as
by
F01LEF, F04LEF may be used to solve any of the equations
for
$x$, 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
$U$, this option being intended for use in applications such as inverse iteration.
If on entry
${\mathbf{IFAIL}}={\mathbf{0}}$ or
${-{\mathbf{1}}}$, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
The computed solution of the equations
$\left(T-\lambda I\right)x=y$, say
$\stackrel{-}{x}$, will satisfy an equation of the form
where
$E$ can be expected to satisfy a bound of the form
$\alpha $ being a modest constant and
$\epsilon $ being the
machine precision. The computed solution of the equations
${\left(T-\lambda I\right)}^{\mathrm{T}}x=y$ and
$Ux=y$ will satisfy similar results. The above result implies that the relative error in
$\stackrel{-}{x}$ satisfies
where
$c\left(T-\lambda I\right)$ is the condition number of
$\left(T-\lambda I\right)$ with respect to inversion. Thus if
$\left(T-\lambda I\right)$ is nearly singular,
$\stackrel{-}{x}$ 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
$T$ and then two calls are made to F04LEF, one to solve
$Tx=y$ and the second to solve
${T}^{\mathrm{T}}x=y$.