Remarkable Identities in Mechanics and Thermodynamics