  We use the discrete approach to solve the Schr\"odinger as well as the Bloch
equations for a free particle and the quantum gas of free particles embedded in
an infinite quantum well with the finite width. We obtain the expressions of
energy eigenvalues, the eigenfunctions as well as the density matrix and
partition function for the discrete case. By applying the continuous quantum
mechanics limit we recover the corresponding results in the continuous-variable
quantum mechanics.
