The relativistic behaviour of the thermodynamical Lagrangian