The increase in the internal energy of a system is equal to the amount of energy added by heating the system, minus the amount lost as a result of the work done by the system on its surroundings.
The first law of thermodynamics basically states that a thermodynamic system can store or hold energy and that this internal energy is conserved. Heat is a process by which energy is added to a system from a high-temperature source, or lost to a low-temperature sink. In addition, energy may be lost by the system when it does mechanical work on its surroundings, or conversely, it may gain energy as a result of work done on it by its surroundings. The first law states that this energy is conserved: The change in the internal energy is equal to the amount added by heating minus the amount lost by doing work on the environment. The first law can be stated mathematically as:
where is a small increase in the internal energy of the system, is a small amount of heat added to the system, and is a small amount of work done by the system.
The δ's before the heat and work terms are used to indicate that they describe an increment of energy which is to be interpreted somewhat differently than the dU increment of internal energy. Work and heat are processes which add or subtract energy, while the internal energy U is a particular form of energy associated with the system. Thus the term "heat energy" for means "that amount of energy added as the result of heating" rather than referring to a particular form of energy. Likewise, the term "work energy" for means "that amount of energy lost as the result of work". The most significant result of this distinction is the fact that one can clearly state the amount of internal energy possessed by a thermodynamic system, but one cannot tell how much energy has flowed into or out of the system as a result of its being heated or cooled, nor as the result of work being performed on or by the system. The first explicit statement of the first law of thermodynamics was given by Rudolf Clausius in 1850: "There is a state function E, called ‘energy’, whose differential equals the work exchanged with the surroundings during an adiabatic process."
Note that the above formulation is favored by engineers and physicists. Chemists prefer a second form, in which the work term is defined as the work done on the system, and therefore insert a plus sign in the above equation before the work term. This article will use the first definition exclusively.
The mathematical statement of the first law is given by:
where is the infinitesimal increase in the internal energy of the system, is the infinitesimal amount of heat added to the system, and is the infinitesimal amount of work done by the system. The infinitesimal heat and work are denoted by δ rather than d because, in mathematical terms, they are not exact differentials. In other words, they do not describe the state of any system. The integral of an inexact differential depends upon the particular "path" taken through the space of thermodynamic parameters while the integral of an exact differential depends only upon the initial and final states. If the initial and final states are the same, then the integral of an inexact differential may or may not be zero, but the integral of an exact differential will always be zero. The path taken by a thermodynamic system through state space is known as a thermodynamic process.
An expression of the first law can be written in terms of exact differentials by realizing that the work that a system does is, in case of a reversible process, equal to its pressure times the infinitesimal change in its volume. In other words where is pressure and is volume. Also, for a reversible process, the total amount of heat added to a system can be expressed as where is temperature and is entropy. Therefore, for a reversible process, :
Since U, S and V are thermodynamic functions of state, the above relation holds also for non-reversible changes. The above equation is known as the fundamental thermodynamic relation.
In the case where the number of particles in the system is not necessarily constant and may be of different types, the first law is written:
where is the (small) number of type-i particles added to the system, and is the amount of energy added to the system when one type-i particle is added, where the energy of that particle is such that the volume and entropy of the system remains unchanged. is known as the chemical potential of the type-i particles in the system. The statement of the first law, using exact differentials is now:
If the system has more external variables than just the volume that can change, the fundamental thermodynamic relation generalizes to:
Here the are the generalized forces corresponding to the external variables .
A useful idea from mechanics is that the energy gained by a particle is equal to the force applied to the particle multiplied by the displacement of the particle while that force is applied. Now consider the first law without the heating term: . The pressure P can be viewed as a force (and in fact has units of force per unit area) while dV is the displacement (with units of distance times area). We may say, with respect to this work term, that a pressure difference forces a transfer of volume, and that the product of the two (work) is the amount of energy transferred as a result of the process.
It is useful to view the TdS term in the same light: With respect to this heat term, a temperature difference forces a transfer of entropy, and the product of the two (heat) is the amount of energy transferred as a result of the process. Here, the temperature is known as a "generalized" force (rather than an actual mechanical force) and the entropy is a generalized displacement.
Similarly, a difference in chemical potential between groups of particles in the system forces a trasfer of particles, and the corresponding product is the amount of energy transferred as a result of the process. For example, consider a system consisting of two phases: liquid water and water vapor. There is a generalized "force" of evaporation which drives water molecules out of the liquid. There is a generalized "force" of condensation which drives vapor molecules out of the vapor. Only when these two "forces" (or chemical potentials) are equal will there be equilibrium, and the net transfer will be zero.
The two thermodynamic parameters which form a generalized force-displacement pair are termed "conjugate variables". The two most familiar pairs are, of course, pressure-volume, and temperature-entropy.
Paths through the space of thermodynamic variables are often specified by holding certain thermodynamic variables constant. It is useful to group these processes into pairs, in which each variable held constant is one member of a conjugate pair.
The pressure-volume conjugate pair is concerned with the transfer of mechanical or dynamic energy as the result of work.
The temperature-entropy conjugate pair is concerned with the transfer of thermal energy as the result of heating.
The above have all implicitly assumed that the boundaries are also impermeable to particles. We may assume boundaries that are both rigid and thermally insulating, but are permeable to one or more types of particle. Similar considerations then hold for the (chemical potential)-(particle number) conjugate pairs.