# Entropy Calculation

4.3 Entropy Calculations for Ideal Gases
For a closed system, the first law provides:

If the process of change occurs under reversible conditions then the above equation becomes:

(4.18)
However for an ideal gas: (4.19)
Thus combining eqns. 4.18 and 4.19:
Or:
(4.20)
Integrating between an initial (T0, P0) and any final (T, P):

 Or: (4.21)
The last equation provides a direct expression for computing entropy change between two states for an ideal gas.
For the special case of a reversible adiabatic dQ = 0; hence dS= 0. Thus:
For constant , it follows that: (4.22)
One may note that eqn. 4.22 provides the same relation as obtained by the Fist Law analysis as in eqn. 3.18.
4.4 Mathematical Statement of the 2nd Law
Consider a mechanically irreversible adiabatic between two equilibrium states X and Y. In fig. 4.7 this path is reproduced as a broken line between points. Next the fluid is returned to the original state by means two sequential processes: (i) a mechanically reversible adiabatic process Y-Z, and then (ii) a reversible isobaric compression Z-X. Assuming that the mechanically irreversible process X-Y leads to an entropy change, heat transfer must occur during process Z-X (since none occurs on Y-Z). This is because for the reversible return path the same entropy change must occur as between X to Y. Since the return path is reversible we must get  Thus, integrating this expression for the return path:
4.7 Cycle containing an irreversible adiabatic process A to B
 (4.23)
For the entire cycle we must have  Thus, net total work during the cycle may be written as:. However, since (as depicted by the P-V diagram) a net work would need to be done onthe system over the cycle, it follows that Therefore, using eqn. 4.23, it follows that:   that is: . This implies that the entropy change for the original irreversible step A to B, we have:  Therefore, we conclude that the original irreversible step is accompanied by a positive change of entropy. It may be additionally shown that if the original process occurred through irreversible heat transfer process an increase of entropy would result likewise.
It may be pointed out during the return reversible process, since the heat transfer (during the isobaric path) occurs under reversible conditions it must occur under infinitesimal temperature gradient between the system and surrounding. Thus for the system and the surrounding the net entropy change (gives by:) is equal and opposite. Consequently the total entropy change of the universe (system + surrounding) is zero during this step. During the initial irreversible path X to Y, while entropy increases for the system, for the surrounding there is no change. Nevertheless, for the universe as such there is a positive change in entropy.
Since the above conclusion is not premised on any specific internal nature of the system, the above result may be generalized: all irreversible processes are accompanied by a positive change of entropy of the universe. This leads to a mathematical statement of the second law:
 (4.24)
At this point we can revert to the question that was stated at the beginning of this chapter: what change in a system is thermodynamically feasible? The second law provides answer to this, i.e., a process can only proceed in a direction that results in a positive change in the total entropy of the universe, the limiting value of zero being attained only by a fully reversible process. The corollary to this is: no process is possible for which the total entropy of the universe decreases.