Fundamental equations of thermodynamics