better positive integer check
function to solve tridiag matrices with the Richtmayer's algorithm
function to compute g(t)
other trace function
function to solve Ad = u
calcoef: function to compute the matrix cc