We present the thermodynamic Bethe ansatz as a way to factorize the partition function of a 2d field theory, in particular, a conformal field theory and we compare it with another approach to factorization due to K. Schoutens which consists of diagonalizing matrix recursion relations between the partition functions at consecutive levels. We prove that both are equivalent, taking as examples the...