DPTSV Example

To solve the equations

Ax = b,

where A is the symmetric positive definite tridiagonal matrix

A = $\displaystyle \left(\vphantom{
\begin{array}{rrrrr}
4.0 & -2.0 & 0 & 0 & 0 \\...
...
0 & 0 & 15.0 & 25.0 & 8.0 \\
0 & 0 & 0 & 8.0 & 5.0
\end{array} }\right.$$\displaystyle \begin{array}{rrrrr}
4.0 & -2.0 & 0 & 0 & 0 \\
-2.0 & 10.0 & ...
....0 & 0 \\
0 & 0 & 15.0 & 25.0 & 8.0 \\
0 & 0 & 0 & 8.0 & 5.0
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{rrrrr}
4.0 & -2.0 & 0 & 0 & 0 \\...
...
0 & 0 & 15.0 & 25.0 & 8.0 \\
0 & 0 & 0 & 8.0 & 5.0
\end{array} }\right)$  and  b = $\displaystyle \left(\vphantom{
\begin{array}{r}
6.0 \\
9.0 \\
2.0 \\
14.0 \\
7.0
\end{array} }\right.$$\displaystyle \begin{array}{r}
6.0 \\
9.0 \\
2.0 \\
14.0 \\
7.0
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{r}
6.0 \\
9.0 \\
2.0 \\
14.0 \\
7.0
\end{array} }\right)$.

Details of the LDLT factorization of A are also output.

Example program
Example data
Example results