Solutions to Practice Exam Problems

Heat, Work, and Ideal Gas (in HW 4)

One mole of an ideal diatomic gas at temperature T is expanded isothermally (at constant temperature) from volume V1 to final volume V2.

a) Plot this process on a PV diagram, assuming it is done slowly enough that the gas remains in equilibrium throughout. What is the functional form, i.e. how does P depend on V?

b) What is the final pressure?

c) Compute the heat, work and change in internal energy during this process? In writing down an equation for work, you must specify whether it's work done by the gas or on the gas.

d) Sketch a path from V2 to V1 that, if done immediately after the process described above, would result in the gas having done net positive work. Explain why? How is the net positive work related to the heat flowing into or out of the gas?

Solution:

a) For a constant temperature process, the P-V diagram will have a the functional form P(V)=NkT/V, as shown below.
Screenshot 2025-09-27 at 7.23.23 PM.pngb) For an isothermal process, the ideal gas law implies P2V2=P1V1=nRT. Since n=1,

P2=RTV1

c) Change in energy is zero, since ΔU∝ΔT=0. Next, the work done by the gas along such a reversible path can be calculated

Wbygas=∫V1V2PdV=nRT∫dVV=RTln⁡(V2/V1)

Finally, from the first law, ΔU=Q−Wbygas , so the heat absorbed is just Q=Wbygas.

d) Since V2>V1, the work done by the gas is positive. If we draw a process from 2 to 1 that stays below the curve, it will result in a cycle in which the gas does net positive work.

Two-state system (in HW 4)

Consider a collection of N two-state particles. Each can be in a state with energies {0,ϵ}. The total energy is the macroscopic variable:

U=∑i=1Nϵsi

where si∈{0,1}, i.e. each

  1. What is the multiplicity of microscopic configurations at a fixed energy U?

  2. Assume both U and N are very large, and comparable in size. Use the Stirling approximation to write the entropy to leading order in these large variables. How many terms do you need to keep in the Stirling approximation to get a nontrivial result?

  3. Define the energy density U/N=ϵρ, and rewrite the entropy as a function of ρ. At what value of ρ is the entropy maximal? What is the value of the maximal entropy?

  4. From the entropy you found in Part 3, compute the temperature. Then invert this equation to find the density ρ(T) as a function of temperature. Note that ∂S/∂U = (∂S/∂ρ)∂ρ/∂U=(∂S/∂ρ)(1/ϵN)

Solution:

  1. Let us define q=U/ϵ as the integer which represents the number of energy quanta ϵ. For fixed q, the number of configurations Ω(q) of spins is just N choose q.
Ω(q)=(Nq)=N!(N−q)!q!
  1. The entropy is
S/k=ln⁡Ω=ln⁡N!−ln⁡(N−q)!−ln⁡q!

I will apply the Stirling approximation to all of these terms:
ln⁡N!=Nln⁡N−N
ln⁡(N−q)!=(N−q)ln⁡(N−q)−(N−q)
ln⁡q!=qln⁡q−q

S/k=Nln⁡N−N−(N−q)ln⁡(N−q)+N−q−qln⁡q+q=Nln⁡N−(N−q)ln⁡(N−q)−qln⁡q

We actually only needed the very largest term Nln⁡N to get a nontrivial result for the entropy.

  1. using U/N=ϵq/N, I get ρ=q/N, and so
S/k=Nln⁡N−N(1−ρ)ln⁡(N(1−ρ))−Nρln⁡Nρ=−N(ρln⁡ρ+(1−ρ)ln⁡(1−ρ))

We have seen this function before. Plotting it will show that it is maximal at ρ=1/2. Otherwise, we can differentiate and set to zero:

∂∂ρ(SNk)=−ln⁡ρ+ln⁡(1−ρ)=0⇒1ρ−1=1

which implies ρ=1/2. At this point,

S=Nkln⁡2
  1. The temperature is
1T=∂S∂U=1ϵN∂ρS=kϵln⁡(1ρ−1)

multiplying both sides by ϵ/k and exponentiating:

exp⁡(ϵkT)=1ρ−1

Next, solving for ρ:

ρ(T)=11+eϵ/kT

At low temperatures, ρ→0, which is actually minimal entropy. For high temperature ρ→1/2, so high temperature has maximal entropy.


Entropy of 3-state spin (in HW 4)

Consider a collection of spins which can take three values: s={−1,0,+1} in an external magnetic field B.

The macroscopic variables for this system are the magnetization:

M=∑i=1Nsi

And the total energy

U=−μB∑isi

a) Take N = 2. Find all the possible macrostates, and enumerate their microstates.

b) Plot the entropy vs. U for this small system. Sketch what you think it will look like for larger systems (large N)? Sketch the temperature as a function of energy.

Challenge:

How many microstates exist for arbitrary N at a given energy U?

Solution:

a) I will write U=−μBM, where M=∑isi. For N=2, I will denote a configuration by the tuple (s1,s2)

M=−2 , {(−1,−1)}
M=−1, {(−1,0),(0,−1)}
M=0, {(−1,1),(1,−1),(0,0)}
M=1, {(1,0),(0,1)}
M=2 , {(1,1)}

b) Entropy vs. U for N=2 looks like the following:

Screenshot 2025-09-28 at 2.38.26 PM.png

This will be the shape for general N:

Screenshot 2025-09-28 at 2.38.35 PM.png
The argument is something like the following: for the extreme values U=±μBN, there will be only a single configuration, and the entropy must vanish at these extremes. The macrostate with the most configurations must be U=0, and the reasoning is very similar to the two-state paramagnet. In that case, we know that zero magnetization has the highest multiplicity. In this setting, we have in addition to paramagnetic configurations, the s=0 configurations, which only increases the number of configurations at U=0. This is rather loose, but it can be proven to be the case.

Finally, the temperature as a function of energy looks very similar to the paramagnet:

Screenshot 2025-09-28 at 2.38.46 PM.png


Entropy and Heat

An Einstein solid with q>>N, and total energy U=ϵq, has an entropy (Schroeder Eq. 3.9)

S=Nk[ln⁡(UϵN)+1]

a) How is the energy related to the temperature? Compare it to the equipartition theorem, and see if the number of degrees of freedom makes sense.
b) Consider a constant volume process which changes the temperature from T0 to 2T0. What is the change in entropy over this process? You may compute this in any way you like.

Solution:

a) We find the formula for temperature from the relation

1T=(∂S∂U)N,V=NkU

Rewriting, we obtain U=NkT. Comparing to the equipartition theorem, this implies there are two degrees of freedom. That makes sense, since an einstein solid models a collection of independent harmonic oscillators, and a harmonic oscillator hamiltonian has two quadratic degrees of freedom (see Lecture 2 )

b) This process is constant volume and constant N. Since entropy is a state function, the change in entropy only depends on the initial and final state. In this case, the only change is the temperature. Using U=NkT, we then have the change in entropy

ΔS=Nkln⁡(Uf/Ui)=Nkln⁡2

PV process and First Law

Below are two paths denoted 1 and 2, which take the system reversibly from A to B. Along which path does the gas do more work? Along with path does more heat flow into the system?

Screenshot 2025-09-25 at 11.47.07 AM.png

Solution:
The area under the curve P(V) gives the work done by the gas. Evidently,

W1bygas>W2bygas

Since U is a state function, and the change in U only depends on endpoints, ΔU1=ΔU2, i.e. the change in internal energy along path 1 is the same as that along path 2. Therefore

Q1−W1bygas=Q2−W2bygas

Rearranging

Q1−Q2=W1bygas−W2bygas>0

Therefore Q1>Q2, i.e. the heat absorbed by the system is greater along path 1 than it is along path 2.

Adiabatic and Isothermal processes

Two identical gases start initially at the same pressure and volume, and end at the same pressure. Assume one process is isothermal, and the other is adiabatic. Sketch these processes on a P-V diagram under two conditions: 1) the gases are compressed, and 2) the gases are expanded. What is the difference in final volume between the two gases in each of these scenarios? (c.f. Problem 1.38)

For these processes, we have

A) Adiabatic: PVγ=const..
B) Isothermal: PV=const.

where γ=(f+2)/f.

I get for isothermal transformation:

Pf=PiViVB

and adiabatic transformation:

Pf=PiViγVAγ

Solving, I get

VB=Vi(Pi/Pf), and VA=Vi(Pi/Pf)1/γ

The difference in volumes is

VA−VB=Vi(r1/γ−r),r=Pi/Pf

Another way to write this is:

VA−VB=Vir1/γ(1−r22+f)

Now we consider the specific scenarios:

  1. If the gas is compressed, we have something that looks like the plot on the left. Pf>Pi, which means r<1. Since 1/γ=f/(f+2)<1, we get that r1/γ>r, and so VA−VB>0. This also follows from the second formula, since for r<1, ra<1 for all a>0.
  2. If the gas is expanded (i.e. the gas does work), we get Pf<Pi, and r>1. This means r1/γ<r, and VA−VB<0. This also follows from the second equation, since for r>1, ra>1 for any a>0.

Both scenarios are visually obvious in the plot.

Screenshot 2025-09-28 at 3.31.14 PM.png