Equilibrium and non-equilibrium thermodynamics