Physicists give the first law of thermodynamics a makeover