Properties of Some Tridiagonal Matrices and Their Application to Boundary Value Problems