Entropy is a state function , whose differential is expressed as .

With reference to eq98, for a reversible cycle. Dividing eq98 by ,

Substituting the definition of from the first law of thermodynamics in eq116:

We have shown in an earlier article that is an exact differential for an ideal gas. Since the line integral of any exact differential involved in a cyclic process is zero,

The function appears to be the differential of a state function. If it is, we must prove that eq118 applies to any working substance, not just an ideal gas. The proof follows the same logic as the proof that eq98 is applicable to any working substance in a Carnot engine. This is accomplished by replacing with and repeating the steps from eq99 through eq105. We call this new state function, entropy, :

###### Question

Is eq119 applicable to irreversible processes? If not, is that in conflict with the fact that is path-independent?

###### Answer

Eq119 is only applicable to reversible processes. In fact, eq119 is commonly written as . Furthermore, the integral of eq119 is only applicable to a reversible process in a closed system, as is poorly defined for an open system.

The integral of eq119 is not in conflict with being path-independent because a line integral requires a well-defined path, which is not associated with an irreversible process. However, we can compute for an irreversible process if we can find a reversible process or a combination of reversible processes from point A to point B. This is due to being a state function, which means that is only dependent on the initial and final states.

Note that in eq119 is the same for both the system and the reservoir (surroundings) for a reversible process. For a closed system undergoing reversible processes, we can substitute eq119 in the differential form of eq24 to give

If only pV work is involved,

Similarly, we can compute for an irreversible process if we can find a reversible process or a combination of reversible processes from point A to point B. Eq121, which is the combination of the first and second laws of thermodynamics, is called the *fundamental equation*** of thermodynamics**.