Consider the heating of a working substance by a reversible process as shown whose base represents the entropy and the vertical ordinate represents the absolute temperature.
Now Consider any point A on the curve 1-2. At this point, let a small quantity of heat (&Q) be supplied to the working substance, which will increase the entropy by dS. Let the absolute temperature at this instant be T. Then according to the definition of entropy,
&Q = TdS
From Fig we see that the terms TdS represents the area under the curve during this change of entropy.
From Equations we get
ds = &Q/T
The total change in entropy may be obtained by integration the above expression from state 1 to state 2.
then we found
TdS = dU + pdv