Fundamental thermodynamic relation