 So far, we haven't found any explanation for irreversibility in the fundamental laws of physics. But our analysis of the Sterling and Carnot cycles has led us to agree with Clausius. For practical purposes, a process is irreversible if it increases the entropy of the universe. No process is possible that lowers the entropy of the universe. And adding heat Q to a body at temperature T increases its entropy by delta S equals Q over T. The ideal monatomic gas is the model system we have used throughout this series for making quantitative calculations. Let's now try to use these ideas to figure out its entropy. We denote by U the internal energy of the gas. Q is heat transferred to the gas from the environment and W is work done by the environment on the gas. The gas satisfies the ideal gas law. Pressure times volume equals number of atoms times Boltzmann's constant times temperature. The internal energy is the heat capacity three-halves Nk times the temperature T. And the first law of thermodynamics gives us the relation du equals delta Q plus delta W. du is a tiny change in the internal energy delta Q is a tiny amount of added heat and delta W is a tiny amount of work done on the gas. Work is done when an external force compresses the gas. Consider a piston with cross-sectional area A. If a force F pushes the piston through a displacement dx the change in gas volume is dV equals minus A dx. And the work done delta W is F dx. This equals F over A times A dx. F over A force per area is pressure and A dx equals minus dV. So delta W equals minus P dV. Rewriting the first law is delta Q equals du minus delta W. We can substitute three-halves Nk dt for du and P dV for minus delta W. Then from the ideal gas law we can substitute Nk T over V for P. Then divide both sides of the equation by T. On the left we get delta Q over T which is dS the increase in the gases entropy. This is equal to on the right three-halves Nk dt over T plus Nk dV over V. Factoring out a common Nk this leaves dS equals Nk times the quantity three-halves dt over T plus dV over V. An expression like dV over V the change in volume divided by the volume is a dimensionless quantity representing the fractional change in the volume. dS is the change in S and dV over V is the change in the natural logarithm of V over V zero. Likewise, dt over T is the change in log T over T zero and we can always add a constant S zero. This gives us the entropy S as a function of the temperature T and the volume V. The log of one is zero so when T equals T zero and V equals V zero S equals S zero. Therefore if we can determine the entropy S zero at some temperature and volume T zero and V zero this expression gives us the entropy of the gas for any other temperature and volume. Using properties of logarithms we can express this in the more compact form. S equals Nk natural log of the quantity T over T zero to the three-halves power times V over V zero plus S zero. This is the absolute entropy of an ideal monatomic gas of N atoms at temperature T and volume V. Note that since S is a function of T and V which are state variables, S is also a state variable. The entropy of a gas sample is a function of only its current state independent of the processes used to arrive at that state. This expression is not yet of practical use because we don't know how to determine the constant S zero. But we can put it in a form that is replace T zero, V zero and S zero with T one, V one and S one. Move S one to the left side and replace S, T and V with S two, T two and V two. Then we have S two minus S one equals Nk log of the quantity T two over T one to the three-halves times V two over V one. This tells us what the change in entropy is in going from state one with temperature T one and volume V one to state two with temperature T two and volume V two. In the next video we'll use the techniques of statistical mechanics to solve for the absolute entropy of an ideal monatomic gas. The result is called the Sacher-Tetrode equation. However, in practical applications the simpler form we've derived here is often more useful. Although we've expressed entropy as a function of temperature and volume, we can use the ideal gas law to express a temperature ratio in terms of pressure and volume ratios. Substituting this into our equation then gives us an alternate expression for the entropy as a function of pressure and volume. A process is said to be isentropic if it occurs at constant entropy. Our entropy expression is constant if T to the three-halves times V is constant. Substituting PV for T gives us P to the three-halves times V to the five-halves is constant. And raising this to the two-thirds power we get P times V to the five-thirds is constant. So on a PV diagram curves where P varies is the inverse of V to the five-thirds are isentropic curves. We've encountered these before. They are the curves of adiabatic expansion and compression such as in the Carnot cycle. It makes sense that they are isentropic because adiabatic processes involve no heat transfer and hence no change in entropy. We have also discussed isothermal curves for which P varies is one over V. So we now have four state variables to describe the state of a gas sample of n atoms pressure P, volume V, temperature T and entropy S. Given any two of these variables we can calculate the other two variables. Let's simulate adiabatic that is isentropic expansion and compression. We start with n atoms at temperature T confined to a volume V. The volume is insulated. No heat flows to or from the gas. As we allow the middle wall to move right the volume clearly increases. Not as immediately obvious but still discernible. As atoms bounce off the moving wall they slow down reducing the average kinetic energy and therefore the gas temperature. So we could see the volume increasing and with some effort the temperature decreasing. But did you notice the entropy remaining constant? Well what does that even look like? Pressure varying as the inverse five thirds power of volume? That's a rather abstract quantity which is one reason why entropy is a challenging concept. You can measure volume with a ruler, temperature with a thermometer and pressure with a pressure gauge. But you won't find entropy gauges at your local hardware store. Now let's compress the gas. The decrease in volume is obvious. The increase in temperature is less obvious but still apparent if you carefully watch atoms bouncing off the moving wall. But constant entropy? It doesn't exactly jump out at us. After compression we return to our original state with n atoms at temperature T confined to a volume V. So the adiabatic expansion was reversible through adiabatic compression. Previously we considered the microscopic reversibility of all mechanical processes. If at some moment we reverse the velocities of every atom the entire system will retrace its evolution in reverse. But that is not what is happening here. Atomic velocities are not reversing as we go from expansion to compression. Indeed we have no mechanism to implement such precise and extensive changes. Instead all atomic states continue to evolve without sudden changes. All that is reversed is the velocity of the movable wall. The reversal is macroscopic, not microscopic. Although we return to the same macroscopic state, n atoms at temperature T in a volume V, it is not true that every atom has returned to its original position. The system has been reversed macroscopically, but not microscopically. So when we say that the Carnot cycle is reversible and running the cycle in the forward and then reverse directions returns the universe to its original state, we really should be more precise and say to its original macroscopic state. We do not return every atom in the universe to its original state. For practical purposes, when designing heat engines and heat pumps, this is the only kind of reversibility we care about. But it is an important distinction. The reversibility we are referring to when we discuss the second law is macroscopic reversibility. Microscopic reversibility, or theoretical possibility, is something we have no way of implementing in a large scale system. Heat flow from hot to cold is irreversible because there are no macroscopic changes that will cause heat to spontaneously flow from cold to hot, even though it is, in theory, microscopically reversible.