In this paper, we numerically solve the thermodynamic Bethe-ansatz coupled equations for a one-dimensional Hubbard model at finite temperature and obtain the second order thermodynamics properties, such as the specific heat, compressibility, and susceptibility. We find that these three quantities could embody the phase transitions of the system, from the vacuum state to the metallic state, from the metallic state to the Mott-insulating phase, from the Mott-insulating phase to the metallic state, and from the metallic state to the band-insulating phase. With the increase of temperature, the thermal fluctuation overwhelms the quantum fluctuations and the phase transition points disappear due to the destruction of the Mott-insulating phase. But in the case of the strong interaction strength, the Mott-insulating phase is robust, embodying the compressibility. Furthermore, we study the thermodynamic properties of the inhomogeneous Hubbard model with trapping potential. Making use of the Bethe-ansatz results from the homogeneous Hubbard model, we construct the chemical potential-functional theory (-BALDA) for the inhomogeneous Hubbard model instead of the commonly used density-functional theory, in order to solve the in-convergence problem of the Kohn-Sham equation in the case of the divergence appearing in the exchange-correlation potential. We further point out a multi-dimensional bisection method which changes the Kohn-Shan equation into a problem of finding the fixed points. Through -BALDA we numerically solve the one-dimensional homogeneous Hubbard model of trapping potential. The density profile and the local compressibility are obtained. We find that at a given interaction strength, the metallic phase and the Mott-insulating phase are destroyed and the density profile becomes a Guassian distribution with increasing temperature. To the metallic phase, Friedel oscillation caused by quantum fluctuations is still visible at low temperature. With increasing temperature, Friedel oscillation will disappear. This situation reflects the fact that the thermal fluctuation overwhelms the quantum fluctuations. For the Mott-insulating phase, the Mott-insulating plateau is robust at a certain temperature and only the boundary of the Mott-insulating plateau is destroyed. With increasing temperature, the Mott insulating plateau will be destroyed. And the change of the local compressibility provides the information about such a change. So we conclude that the thermal fluctuation destroys the original quantum phase. Through our analysis, we find that the -BALDA can be used to study the finite temperature properties for the system of the exchange-correlation potential divergence with high efficiency.