The laws of thermodynamics are deceptively simple to state, but they are far-reaching in their consequences. The first law asserts that if heat is recognized as a form of energy, then the total energy of a system plus its surroundings is conserved; in other words, the total energy of the universe remains constant.
The first law is put into action by considering the flow of energy across the boundary separating a system from its surroundings. Consider the classic example of a gas enclosed in a cylinder with a movable piston. The walls of the cylinder act as the boundary separating the gas inside from the world outside, and the movable piston provides a mechanism for the gas to do work by expanding against the force holding the piston (assumed friction less) in place. If the gas does work W as it expands, and/or absorbs heat Q from its surroundings through the walls of the cylinder, then this corresponds to a net flow of energy W − Q across the boundary to the surroundings. In order to conserve the total energy U, there must be a counterbalancing change
ΔU = Q − W (1)
In the internal energy of the gas. The first law provides a kind of strict energy accounting system in which the change in the energy account (ΔU) equals the difference between deposits (Q) and withdrawals (W).
There is an important distinction between the quantity ΔU and the related energy quantities Q and W. Since the internal energy U is characterized entirely by the quantities (or parameters) that uniquely determine the state of the system at equilibrium, it is said to be a state function such that any change in energy is determined entirely by the initial (i) and final (f) states of the system: ΔU = Uf − Ui. However, Q and W are not state functions. Just as in the example of a bursting balloon, the gas inside may do no work at all in reaching its final expanded state, or it could do maximum work by expanding inside a cylinder with a movable piston to reach the same final state. All that is required is that the change in energy (ΔU) remain the same. By analogy, the same change in one’s bank account could be achieved by many different combinations of deposits and withdrawals. Thus, Q and Ware not state functions, because their values depend on the particular process (or path) connecting the same initial and final states. Just as it is more meaningful to speak of the balance in one’s bank account than its deposit or withdrawal content, it is only meaningful to speak of the internal energy of a system and not its heat or work content.
From a formal mathematical point of view, the incremental change dU in the internal energy is an exact differential (see differential equation), while the corresponding incremental changes d′Q and d′W in heat and work are not, because the definite integrals of these quantities are path-dependent. These concepts can be used to great advantage in a precise mathematical formulation of thermodynamics (see below Thermodynamic properties and relations).