# Spring 2018 Physics 441

- Office hours
- David Roundy: MF 1-2, 401B Weniger or upon request. My door is open when I'm in my office, and students are welcome to enter with questions.
- Syllabus
- The syllabus is here.
- Textbook
*Thermal Physics*by Kittel and Kroemer. The textbook is not required, but the course will follow the text reasonably closely.- Course notes
- If you wish, you may download this entire website as an ebook, or as a PDF file.
- Homework
- Homework will be due in class on Wednesday of each week (but not the first week of class). You should be able to start each homework the week before it is due. See the syllabus for details on homework grading. You may use the solutions (or any other resource you wish to use) but at the end of each problem, please cite what resources you used (students you worked with, whether you looked at the solutions, etc). Note that
*verbatim*copying from any source is plagiarism. I recommend*not*using the solutions.

## Introduction and course philosophy

This is your second course in thermal physics. *Energy and Entropy* took a thermodyamics-first approach, with primary emphasis on how you could *measure* something, and only later introducing how you could *predict* it. I strongly support this approach, but it is not the most common approach to thermal physics.

I will teach this course in a more traditional order and approach, following the text of Kittel and Kroemer. This is the textbook that I used as an undergraduate. It's an excellent book, but very much uses a more mathematical theory-first approach than I prefer.

Since this is now your second course in thermal physics, this should balance things out. With your *Energy and Entropy* background, you should be able to make physical connections with the math more easily. By organizing this course in this different way, I hope to broaden and deepen your understanding of thermal physics, while at the same time showing you a wide range of different physical systems.

*Brief* review of *Energy and Entropy*

### Extensive/intensive

If you consider two identical systems taken together (e.g. two cups of water, or two identical cubes of metal), each thermodynamic property either doubles or remains the same.

- Extensive
- An extensive property, such as
**mass**will double when you've got twice as much stuff. - Intensive
- An intensive property, such as
**density**will be the same regardless of how much stuff you've got.

We care about extensivity and intensivity for several reasons. In one sense it functions like dimensions as a way to check our work. In another sense, it is a fundamental aspect of each measurable property, and once you are accustomed to this, you will feel very uncomfortable if you *don't* know whether it is extensive or intensive.

### How to measure things

- Volume
- Measure dimensions and compute it. (
**extensive**) - Pressure
- Force per area. Can equalize if systems can exchange volume. (
**intensive**) - Temperature
- Find something that depends on temperature, and calibrate it. Alternatively use an ideal gas. Equalizes when systems are in contact. (
**intensive**) - Energy
- Challenging... measure work and heat (e.g. by measuring power into resistor). (
**extensive**) \[\begin{align}W &= -\int pdV\end{align}\] - Entropy
- (
**extensive**) Measure heat for a quasistatic process and find \[\begin{align}\Delta S &= \int \frac{dQ}{T}\end{align}\] - Derivatives
- Measure changes of one thing as the other changes, with the right stuff held fixed.

### First Law (Energy conservation)

\[\begin{align} dU &= dQ + dW \end{align}\]### Second Law (Entropy increases)

\[\begin{align} \Delta S_{system} + \Delta S_{environment} \ge 0 \end{align}\]### Thermodynamic identity

\[\begin{align} dU &= TdS - pdV \end{align}\]### Thermodynamic potentials

- Helmholtz free energy
- \[\begin{align} F &= U - TS \\ dF &= dU - TdS - SdT \\ &= -SdT -pdV \end{align}\]
- Enthalpy
- \[\begin{align} H &= U + pV \\ dH &= dU + pdV + Vdp \\ &= TdS + Vdp \end{align}\]
- Gibbs free energy
- \[\begin{align} G &= H - TS \\ &= U -TS+pV \\ dG &= dH - TdS - SdT \\ &= -SdT +Vdp \end{align}\]

### Statistical entropy

Boltzmann formulation (microcanonical or for large \(N\)): \[\begin{align} S(E) &= k_B \ln g \end{align}\] Gibbs formulation (always true): \[\begin{align} S(E) &= -k_B \sum_{i}^{\text{all states}} P_i \ln P_i \end{align}\]### Boltzmann ratio

\[\begin{align} \frac{P_i}{P_j} &= e^{-\frac{E_i - E_j}{k_BT}} \\ P_i &= \frac{e^{-\frac{E_i - E_j}{k_BT}}}{\sum_j^{\text{all states}} e^{-\frac{E_j}{k_BT}}} \end{align}\]### Thermal averages

The average value of any quantity is given by the weighted average \[\begin{align} \left<X\right> &= \sum_i^{\text{all states}} P_i X_i \end{align}\]# Week 1: Gibbs entropy approach

There are two different approaches for deriving the results of statistical mechanics. These results differ in what fundamental postulates are taken, but agree in the resulting predictions. The textbook takes a traditional microcanonical Boltzmann approach.

This week, before using that approach, we will reach the same results using the Gibbs formulation of the entropy (sometimes referred to as the "information theoretic entropy"), as advocated by Jaynes. Note that Boltzmann also used the more general Gibbs entropy, even though it doesn't appear on his tombstone.

## Microstates vs. macrostates

You can think of a **microstate** as a quantum mechanical energy eigenstate. As you know from quantum mechanics, once you have specified an energy eigenstate, you know all that you can about the state of a system. Note that before quantum mechanics, this was more challenging. You *can* define a microstate classically, and people did so, but it was harder. In particular, the number of microstates classically is generally both infinite and non-countable, since any real number for position and velocity is possible. Quantum mechanics makes this all easier, since any finite (in size) system will have an infinite but countable number of microstates.

When you have a non-quantum mechanical system (or one that you want to treat classically), a microstate represents one of the "primitive" states of the system, in which you have specified all possible variables. In practice, it is common when doing this to specify what we might call a "mesostate", but call it a microstate. e.g. you might hear someone describe a microstate of a system of marbles in urns as defined by how many marbles of each color are in each urn. Obviously there are many quantum mechanical microstates corresponding to each of those states.

- Small White Boards
- Write down a description of one particular macrostate.

A **macrostate** is a state of a system in which we have specified all the properties of the system that will affect any measurements we may care about. For instance, when defining a macrostate of a given gas or liquid, we could specify the internal energy, the number of molecules (or equivalently mass), and the volume. We need to specify all three properties (if we want to ask, for instance, for the entropy), because otherwise we won't have a unique answer. For different sorts of systems there are different ways that we can specify a macrostate. In this way, macrostates have a flexibility that real microstates do not. e.g. I could argue that the macrostate of a system of marbles in urns would be defined by the number of marbles of each color in each urn. After all, each macrostate would still correspond to many different energy eigenstates.

## Probabilities of microstates

The name of the game in statistical mechanics is determining the probabilities of the various microstates, which we call \(\{P_i\}\), where \(i\) represents a microstate. I will note here the term **ensemble**, which refers to a set of microstates with their associated probabilities. We define ensembles according to what constraints we place on the microstates, e.g. in this discussion we will constrain all microstates to have the same volume and number of particles, which defines the **canonical ensemble.** Next week/chapter we will discuss the microcanonical ensemble (which also constrains all microstates to have identical energy), and other ensembles will follow. Today's discussion, however, will be largely independent of which ensemble we choose to work with, which generally depends on what processes we wish to consider.

### Normalization

The total probability of all microstates added up must be one. \[\begin{align} \sum_i^{\text{all $\mu$states}}P_i = 1 \end{align}\]This may seem obvious, but it is very easy to forget when lost in algebra!

### From probabilities to observables

If we want to find the value that will be measured for a given observable, we will use the weighted average. For instance, the internal energy of a system is given by: \[\begin{align} U &= \sum_i^{\text{all $\mu$states}}P_i E_i \\ &= \left<E_i\right> \end{align}\]where \(E_i\) is the energy eigenvalue of a given microstate. The \(\langle E_i\rangle\) notation simply denotes a weighted average of \(E\). The subscript in this notation is optional.

This may seem wrong to you. In quantum mechanics, you were taught that the outcome of a measurement was always an eigenvalue of the observable, *not* the expectation value (which is itself an average). The difference is in how we are imagining performing a measurement, and what the size of the system is thought to be.

In contrast, imagine measuring the mass of a liter of water, for instance using a balance. While you are measuring its mass, there are water molecules leaving the glass (evaporating), and other water molecules from the air are entering the glass and condensing. The total mass is fluctuating as this occurs, far more rapidly than the scale can tip up or down. It reaches balance when the weights on the other side balance the *average* weight of the glass of water.

The process of measuring pressure and energy are similar. There are continually fluctuations going on, as energy is going back and forth between your system and the environment, and the process of measurement (which is slow) will end up measuring the average.

In contrast, when you perform spectroscopy on a system, you do indeed see lines corresponding to discrete eigenvalues, even though you are using a macroscopic amount of light on what may be a macroscopic amount of gas. This is because each photon that is absorbed by the system will be absorbed by a single molecule (or perhaps by two that are in the process of colliding). Thus you don't measure averages in a direct way.

In thermal systems such as we are considering in this course, we will consider the kind of observable where the average value of that observable is what is measured. This is why statistics are relevant!

## Energy as a constraint

Energy is one of the most fundamental concepts. When we describe a macrostate, we will (almost) always need to constrain the energy. For real systems, there are always an infinite number of microstates with no upper bound on energy. Since we never have infinite energy in our labs or kitchens, we know that there is a practical bound on the energy.

We can think of this as applying a mathematical constraint on the system: we specify a \(U\), and this disallows any set of probabilities \(\{P_i\}\) that have a different \(U\).

- Small Group Question
- Consider a system that has just three microstates, with energies \(-\epsilon\), \(0\), and \(\epsilon\). Construct three sets of probabilities corresponding to \(U=0\).

- Question
- Given that each of these answers has the same \(U\), how can we find the correct set of probabilities are for this \(U\)? Vote on which
**you**think most acceptable!

So entropy is a kind of weighted average of \(-\ln P_i\).

The Gibbs entropy expression (sometime referred to as the information theory entropy, or Shannon entropy) can be shown to be the only possible entropy function (of of \(\left\{P_i\right\}\)) that has a reasonable set of properties:

It must be extensive. If you subdivide your system into uncorrelated and noninteracting subsystems (or combine two noninteracting systems), the entropy must just add up. Solve problem 2 on the homework this week to show this. (Technically, it must be additive even if the systems interact, but that is more complicated.)

The entropy must be a continuous function of the probabilities \(\left\{P_i\right\}\). Realistically, we want it to be analytic.

The entropy shouldn't change if we shuffle around the labels of our states, i.e. it should be symmetric.

When all microstates are equally likely, the entropy should be maximized.

All microstates have zero probability except one, the entropy should be minimized.

- Note
- The constant \(k\) is called Boltzmann's constant, and is sometimes written as \(k_B\). The text prefers to set \(k_B=1\) in effect, and defines \(\sigma\) as \(S/k_B\) to make this explicit. I will include \(k_B\) but you can and should keep in mind that it is just a unit conversion constant.

How is this mixed up?

- Small Group Question
- Compute \(S\) for each of the above probability distributions.
- Answer
- \[\begin{equation*} \begin{array}{rccc|c} E_i\text{:} & -\epsilon & 0 & \epsilon & S \\ \hline P_i\text{:} & 0 & 1 & 0 & 0\\ P_i\text{:} & \frac12 & 0 & \frac12 & \ln 2 \\ P_i\text{:} & \frac13 & \frac13 & \frac13 & \ln 3 \end{array} \end{equation*}\] You can see that if more states are probable, the entropy is higher. Or alternatively you could say that if the probability is more "spread out", the entropy is higher.

### Maximize entropy

The correct distribution is that which maximizes the entropy of the system, its Gibbs entropy, subject to the appropriate constraints. Yesterday we tackled a pretty easy 3-level system with \(U=0\). If I had chosen a different energy, it would have been much harder to find the distribution that gave the highest entropy.

- Small Group Question
- Find the probability distribution for our 3-state system that maximizes the entropy, given that the total energy is \(U\).
- Answer
- We have two constraints,
\[\begin{align}
\sum_\mu P_\mu &= 1 \\
\sum_\mu P_\mu E_\mu &= U
\end{align}\]
and we want to maximize
\[\begin{align}
S &= -k\sum_\mu P_\mu \ln P_\mu.
\end{align}\]
Fortunately, we've only got three states, so we write down each sum explicitly, which will make things easier.
\[\begin{align}
P_- + P_0 + P_+ &= 1 \\
-\epsilon P_- + \epsilon P_+ &= U \\
P_+ &= P_- + \frac{U}{\epsilon} \\
P_- + P_0 + P_- + \frac{U}{\epsilon} &= 1 \\
P_0 &= 1 - 2P_- - \frac{U}{\epsilon} \\
\end{align}\]
Now that we have all our probabilities in terms of \(P_-\) we can simplify our entropy:
\[\begin{align}
-\frac{S}{k} &= P_-\ln P_- + P_0 \ln P_0 + P_+\ln P_+ \\
&= P_-\ln P_-
+
\left(P_- + \tfrac{U}{\epsilon}\right)\ln\left(P_- + \tfrac{U}{\epsilon}\right)
\notag\\&\quad
+ \left(1-2P_--\tfrac{U}{\epsilon}\right)\ln\left(1-2P_--\tfrac{U}{\epsilon}\right)
\end{align}\]
Now we can maximize this entropy by setting its derivative to zero!
\[\begin{align}
-\frac{\frac{dS}{dP_-}}{k} &= 0 \\
&= \ln P_- + 1
- 2\ln\left(1-2P_--\tfrac{U}{\epsilon}\right) -2
\notag\\&\quad
+ \ln\left(P_- + \tfrac{U}{\epsilon}\right) + 1
\\
&= \ln P_-- 2\ln\left(1-2P_--\tfrac{U}{\epsilon}\right)
+\ln\left(P_- + \tfrac{U}{\epsilon}\right)
\\
&= \ln\left(\frac{P_-\left(P_- + \tfrac{U}{\epsilon}\right)}{
\left(1-2P_--\tfrac{U}{\epsilon}\right)^2}\right)
\\
1 &= \frac{P_-\left(P_- + \tfrac{U}{\epsilon}\right)}{
\left(1-2P_--\tfrac{U}{\epsilon}\right)^2}
\end{align}\]
And now it is just a polynomial equation...
\[\begin{align}
P_-\left(P_- + \tfrac{U}{\epsilon}\right) &=
\left(1-2P_--\tfrac{U}{\epsilon}\right)^2
\\
P_-^2 + \tfrac{U}{\epsilon}P_- &=
1 - 4P_- -2\tfrac{U}{\epsilon}
+ 4P_-^2+4P_-\tfrac{U}{\epsilon} + \tfrac{U^2}{\epsilon^2}
\end{align}\]
At this stage I'm going to stop. Clearly you could keep going and solve for \(P_-\) using the quadratic equation, but we wouldn't learn much from doing so. The point here is that we
*can*solve for the three probabilities given the internal energy constraint. However, doing so is a major pain, and the result is not looking promising in terms of simplicity. There is a better way!

## Lagrange multipliers

If you have a function of \(N\) variables, and want to apply a single constraint, one approach is to use the constraint to algebraically eliminate one of your variables. Then you can set the derivatives with respect to all remaining variables to zero to maximize. This is what you presumably did in the last activity. However, in many cases this isn't feasible. And when there are many variables, it is almost universally inconvenient. A nicer approach for maximization under constraints is the method of Lagrange multipliers.

The idea of Lagrange multipliers is to introduce an additional variable (called the Lagrange multiplier) rather than eliminating one. This may seem counterintuitive, but it allows you to create a new function that can be maximized by setting its derivative with to all \(N\) variables to zero, while still satisfying the constraint.

Suppose we have a situation where we want to maximize \(F\) under some constraints: \[\begin{align} F = F(w,x,y,z) \\ f_1(w,x,y,z) = C_1 \\ f_2(w,x,y,z) = C_2 \end{align}\] We define a new variable \(L\) as follows: \[\begin{align} L &\equiv F + \lambda_1 (C_1-f_1(w,x,y,z)) + \lambda_1 (C_2-f_2(w,x,y,z)) \end{align}\] Note that \(L=F\) provided the constraints are satisfied, since the constraint means that \(f_1(x,y,z)-C_1=0\). We then maximize \(L\) by setting its derivatives to zero: \[\begin{align} \left(\frac{\partial L}{\partial w}\right)_{x,y,z} &= 0\\ &= \left(\frac{\partial F}{\partial w}\right)_{x,y,z} - \lambda_1 \frac{\partial f_1}{\partial w} - \lambda_2 \frac{\partial f_2}{\partial w} \\ \left(\frac{\partial L}{\partial x}\right)_{w,y,z} &= 0\\ &= \left(\frac{\partial F}{\partial x}\right)_{w,y,z} - \lambda_1 \frac{\partial f_1}{\partial x} - \lambda_2 \frac{\partial f_2}{\partial x} \end{align}\] \[\begin{align} \left(\frac{\partial L}{\partial y}\right)_{w,x,z} &= 0\\ &= \left(\frac{\partial F}{\partial y}\right)_{w,x,z} - \lambda_1 \frac{\partial f_1}{\partial y} - \lambda_2 \frac{\partial f_2}{\partial y} \\ \left(\frac{\partial L}{\partial z}\right)_{w,x,y} &= 0\\ &= \left(\frac{\partial F}{\partial z}\right)_{w,x,y} - \lambda_1 \frac{\partial f_1}{\partial z} - \lambda_2 \frac{\partial f_2}{\partial z} \end{align}\] This gives us four equations. But we need to keep in mind that we also have the two constraint equations: \[\begin{align} f_1(x,y,z) &= C_1 \\ f_2(x,y,z) &= C_2 \end{align}\]We now have six equations and *six* unknowns, since \(\lambda_1\) and \(\lambda_2\) have also been added as unknowns, and thus we can solve all these equations simultaneously, which will give us the maximum under the constraint. We also get the \(\lambda\) values for free.

### The meaning of the Lagrange multiplier

So far, this approach probably seems pretty abstract, and the Lagrange multiplier \(\lambda_i\) seems like a strange number that we just arbitrarily added in. Even were there no more meaning in the multipliers, this method would be a powerful tool for maximization (or minimization). However, as it turns out, the multiplier often (but not always) has deep physical meaning. Examining the Lagrangian \(L\), we can see that \[\begin{align} \left(\frac{\partial L}{\partial C_1}\right)_{w,x,y,z,C_2} &= \lambda_1 \end{align}\]so the multiplier is a derivative of the lagrangian with respect to the corresponding constraint value. This doesn't seem to useful.

More importantly (and less obviously), we can now think about the original function we maximized \(F\) as a function (after maximization) of just \(C_1\) and \(C_2\). If we do this, then we find that \[\begin{align} \left(\frac{\partial F}{\partial C_1}\right)_{C_2} &= \lambda_1 \end{align}\]I think this is incredibly cool! And it is a hint that Lagrange multipliers may be related to Legendre transforms.

## Maximizing entropy

When maximizing the entropy, we need to apply*two*constraints. We must hold the total probability to 1, and we must fix the mean energy to be \(U\). This time I'm going to call my lagrange multipliers \(\alpha k_B\) and \(\beta k_B\) so as to reduce the number of subscripts required and also to make all the Boltzmann constants go away. \[\begin{align} L &= S + \alpha k_B\left(1-\sum_i P_i\right) + \beta k_B \left(U - \sum_i P_i E_i\right) \\ &= -k_B\sum_iP_i\ln P_i + \alpha k_B\left(1-\sum_i P_i\right) \notag\\&\quad + \beta k_B \left(U - \sum_i P_i E_i\right) \end{align}\] where \(\alpha\) and \(\beta\) are the two Lagrange multipliers. I've added here a couple of factors of \(k_B\) mostly to make the \(k_B\) in the entropy disappear. We want to maximize this, so we set its derivatives to zero: \[\begin{align} \frac{\partial L}{\partial P_i} &= 0 \\ &= -k_B\left(\ln P_i + 1\right) - k_B\alpha - \beta k_B E_i \\ \ln P_i &= -1 -\alpha - \beta E_i \\ P_i &= e^{-1 -\alpha - \beta E_i} \end{align}\] So now we know the probabilities in terms of the two Lagrange multipliers, which already tells us that the probability of a given microstate is exponentially related to its energy. At this point, it is convenient to invoke the normalization constraint... \[\begin{align} 1 &= \sum_i P_i \\ &= \sum_i e^{-1-\alpha-\beta E_i} \\ &= e^{-1-\alpha}\sum_i e^{-\beta E_i} \\ e^{1+\alpha} &= \sum_i e^{-\beta E_i} \\ \end{align}\] Where we define the normalization factor as \[\begin{align} Z \equiv \sum_i^\text{all states} e^{-\beta E_i} \end{align}\] which is called the

**partition function**. Putting this together, the probability is \[\begin{align} P_i &= \frac{e^{-\beta E_i}}{Z} \\ &= \frac{\textit{Boltzmann factor}}{\textit{partition function}} \end{align}\] At this point, we haven't yet solved for \(\beta\), and to do so, we'd need to invoke the internal energy constraint: \[\begin{align} U &= \sum_i E_i P_i \\ U &= \frac{\sum_i E_i e^{-\beta E_i}}{Z} \end{align}\] As it turns out, \(\beta =\frac{1}{k_BT}\). This follows from my claim that the Lagrange multiplier is the partial derivative with respect to the constaint value \[\begin{align} k_B\beta &= \left(\frac{\partial S}{\partial U}\right)_{\text{Normalization=1}} \end{align}\]

However, I did not prove this to you. I will leave demonstrating this as a homework problem.

## Homework for week 1 (PDF)

**Energy, Entropy, and Probabilities**The internal energy and entropy can each be defined as a weighted average over microstates: \[\begin{align} U &= \sum_i E_i P_i & S &= -k_B\sum_i P_i \ln P_i \end{align}\] We also saw that the probability of each microstate could be defined in terms of a Lagrange multiplier \(\beta\) as \[\begin{align} P_i &= \frac{e^{-\beta E_i}}{Z} & Z &= \sum_i e^{-\beta E_i} \end{align}\] We can put these probabilities into the above weighted averages in order to relate \(U\) and \(S\) to \(\beta\). Do so, and see what connections you can make with thermodynamics that you know. In particular, the thermodynamic identity gives a relationship between internal energy and entropy. \[\begin{align} dU = TdS - pdV \end{align}\]**Gibbs entropy is extensive**Consider two*noninteracting*systems \(A\) and \(B\). We can either treat these systems as separate, or as a single combined system \(AB\). We can enumerate all states of the combined by enumerating all states of each separate system. The probability of the combined state \((i_A,j_B)\) is given by \(P_{ij}^{AB} = P_i^AP_j^B\). In other words, the probabilities combine in the same way as two dice rolls would, or the probabilities of any other uncorrelated events.Show that the entropy of the combined system \(S_{AB}\) is the sum of entropies of the two separate systems considered individually, i.e. \(S_{AB} = S_A+S_B\). THis means that entropy is extensive. Use the Gibbs entropy for this computation. You need make no approximation in solving this problem.

Show that if you have \(N\) identical non-interacting systems, their total entropy is \(NS_1\) where \(S_1\) is the entropy of a single system.

- Note
- In real materials, we treat properties as being extensive even when there are interactions in the system. In this case, extensivity is a property of large systems, in which surface effects may be neglected.

**Boltzmann probabilities**Consider the three-state system with energies \((-\epsilon,0,\epsilon)\) that we discussed in class.

At infinite temperature, what are the probabilities of the three states being occupied?

At very low temperature, what are the three probabilities?

What happens to the probabilities if you allow the temperature to be negative?

# Week 2: Entropy and Temperature

This week we will be following Chapter 2 of Kittel and Kroemer, which uses a microcanonical approach (or Boltzmann entropy approach) to relate entropy to temperature. This is an alternative derivation to the Gibbs approach we used last week, and it can be helpful to have seen both. In a few ways the Boltzmann approach is conceptually simpler, while there are a number of *other* ways in which the Gibbs approach is simpler.

### Fundamental assumption

The difference between these two approaches is in what is considered the fundamental assumption. In the Gibbs entropy approach we assumed that the entropy was a "nice" function of the probabilities of microstates, which gave us the Gibbs formula. From there, we could maximize the entropy to find the probabilities under some set of constraints.

The Boltzmann approach makes what is perhaps simpler assumption, which is that if only microstates with a given energy are permitted, then all of the microstates with that energy are equally probable. (This scenario with all microstates having the same energy is the **microcanonical ensemble**.) Thus the macrostate with the most corresponding microstates will be most probable macrostate. The number of microstates corresponding to a given macrostate is called the **multiplicity** \(g(E,V)\). In this approach, multiplicity (which did not show up last week!) becomes a fundamentally important quantity, since the macrostate with the highest multiplicity is the most probable macrostate.

- Outline of the week
One or two topics per day:

- Quick version showing the conclusions we will reach.
- Finding the multiplicity of a paramagnet (Chapter 1).
- Combining two non-interacting systems; defining temperature.
- Central limit theorem and how "large \(N\)" does its magic.

## Quick version

This quick version will tell you all the essential physics results for the week, without proof. The beauty of statistical mechanics (whether following the text or using the information-theory approach of last week) is that you don't *actually* need to take on either faith or experiment the connection between the statistical theory and the empirical definitions used in thermodynamics.

### Entropy

The multiplicity sounds sort of like entropy (since it is maximized), but the multiplicity is*not*extensive (

*nor*intensive), because the number of microstates for two identical systems taken together is the

*square*of the number of microstates available to one of the single systems. This naturally leads to the Boltzmann definition of the entropy, which is \[\begin{align} S(E,V) = k_B\ln g(E,V). \end{align}\]

The logarithm converts the multiplicity into an extensive quantity, in a way that is directly analogous to the logarithm that appears in the Gibbs entropy.

For large systems (e.g. systems composed of \(\sim 10^{23}\) particles$), the *most probable* configuration is essentially the same as *any remotely probable* configuration. This comes about due for the same reason that if you flip \(10^{23}\) coins, you will get \(5\times 10^{22} \pm 10^{12}\) heads. On an absolute scale, that's a lot of uncertainty in the number of heads that would show up, but on a fractional scale, you're pretty accurate if you assume that 50% of the flips will be heads.

### Temperature

From*Energy and Entropy*(and last week), you will remember that \(dU = TdS - pdV\), which tells us that \(T = \left(\frac{\partial U}{\partial S}\right)_V\). If we assume that only states with one particular energy \(E\) have a non-zero probability of being occupied, then \(U=E\), i.e. the thermodynamic internal energy is the same as the energy of any allowed microstate. Then we can replace \(U\) with \(E\) and conclude that \[\begin{align} T &= \left(\frac{\partial E}{\partial S}\right)_V \\ \frac1T &= \left(\frac{\partial S}{\partial E}\right)_V \\ &= \left(\frac{\partial k_B\ln g(E,V)}{\partial E}\right)_V \\ &= k_B \frac1g \left(\frac{\partial g}{\partial E}\right)_V \end{align}\]

From this perspective, it looks like our job is to learn to solve for \(g(E)\) and from that to find \(S(E)\), and once we have done those tasks we will know the temperature (and soon everything else).

- Differentiable multiplicity
The above assumes that \(g(E)\) is a differentiable function, which means that the number of microstates must be a continuous function of energy! This highlights one of the distinctions between the microcanonical approach and our previous (cannonical) Gibbs approach.

In reality, we know from quantum mechanics that any system of finite size has a finite number of eigenstates within any given energy range, and thus \(g(E)\) cannot be either continuous or differentiable. Boltzmann, of course, did not know this, and assumed that there were an infinite number of microstates possible within any energy range, and would strictly speaking interpret \(g(E)\) in terms of a volume of phase space.

The resolution to this conundrum is to invoke large numbers, and to assume that we are averaging \(g(E)\) over a range of energies in which there are many, many states. For real materials with \(N\approx 10^{23}\), this assumption is pretty valid. Much of this chapter will involve learning to work with this large \(N\) assumption, and to use it to extract physically meaningful results. In the Gibbs approach this large \(N\) assumption was not needed.

As Kittel discusses towards the end of the chapter, we only really need to know \(g(E)\) up to some constant factor, since a constant factor in \(g\) becomes a constant additive change in \(S\), which doesn't have any physical impact.

The "real" \(g(E)\) is a smoothed average over a range of energies. In practice, doing this can be confusing, and so we tend to focus on systems where the energy is always an integer multiple of some constant. Thus a focus on spins in a magnetic field, and harmonic oscillators.

## Multiplicity of a paramagnet

So now the question becomes how to find the number of microstates that correspond to a given energy \(g(E)\). Once we have this in an analytically tractable form, we can everything else we might care for (with effort). This is essentially a counting problem, and much of what you need is introduced in Chapter 1. We will spend some class time going over one example of computing the multiplicity. Consider a paramagnetic system consisting of spin \(\frac12\) particles that can be either up or down. Each spin has a magnetic moment in the \(\hat z\) direction of \(\pm m\), and we are interested in the total magnetic moment \(M\), which is the sum of all the individual magnetic moments.

- Small Group Question
Work out how many ways a system of 4 spins can have any possible magnetization of enumerating all the microstates corresponding to each magnetization.

Now find a mathematical expression that will tell you the multiplicity of a system with an even number \(N\) spins and just one \(\uparrow\) spin. Then find the multiplicity for two \(\uparrow\) spins, and for three \(\uparrow\) spins.

Now find a mathematical expression that will tell you the multiplicity of a system with an even number \(N\) spins and magnetization \(M=2sm\) where \(s\) is an integer. We call \(s\) the

**spin excess**, since \(N_\uparrow = \frac12N + s\). Alternatively, you could write your expression in terms of the number of up spins \(N_\uparrow\) and the number of down spins \(N_\downarrow\).- Answer
- We can enumerate all spin microstates:
- \(M=-4m\)
- \(\downarrow\downarrow\downarrow\downarrow\) g=1
- \(M=-2m\)
- \(\downarrow\downarrow\downarrow\uparrow\) \(\downarrow\downarrow\uparrow\downarrow\) \(\downarrow\uparrow\downarrow\downarrow\) \(\uparrow\downarrow\downarrow\downarrow\) g=4
- \(M=0\)
- \(\downarrow\downarrow\uparrow\uparrow\) \(\downarrow\uparrow\uparrow\downarrow\) \(\uparrow\uparrow\downarrow\downarrow\) \(\uparrow\downarrow\downarrow\uparrow\) \(\uparrow\downarrow\uparrow\downarrow\) \(\downarrow\uparrow\downarrow\uparrow\) g=6
- \(M=2m\)
- \(\uparrow\uparrow\uparrow\downarrow\) \(\uparrow\uparrow\downarrow\uparrow\) \(\uparrow\downarrow\uparrow\uparrow\) \(\downarrow\uparrow\uparrow\uparrow\) g=4
- \(M=4m\)
- \(\uparrow\uparrow\uparrow\uparrow\) g=1
- To generalize this to \(g(N,s)\), we need to come up with a systematic way to count the states that have the same spin excess \(s\). Clearly if \(s=\pm N/2\), \(g=1\), since that means that all the spins are pointed the same way, and there is only one way to do that. \[\begin{align} g(N,s=\pm \frac12N) &= 1 \end{align}\] Now if we have just one spin going the other way, there are going to be \(N\) ways we could manage that: \[\begin{align} g\left(N,s=\pm \left(\frac12N-1\right)\right) &= N \end{align}\] Now when we go to flip it so we have two spins up, there will be \(N-1\) ways to flip the second spin. But then, when we do this we will end up counting every possibility twice, which means that we will need to divide by two. \[\begin{align} g\left(N,s=\pm \left(\frac12N-2\right)\right) &= N(N-1)/2 \end{align}\] When we get to adding the third \(\uparrow\) spin, we'll have \(N-2\) spins to flip. But now we have to be even more careful, since for the same three up-spins, we have several ways to reach that microstate. In fact, we will need to divide by \(6\), or \(3\times 2\) to get the correct answer (as we can check for our four-spin example). \[\begin{align} g\left(N,s=\pm \left(\frac12N-3\right)\right) &= \frac{N(N-1)(N-2)}{3!} \end{align}\] At this stage we can start to see the pattern, which comes out to \[\begin{align} g\left(N,s\right) &= \frac{N!}{\left(\frac12 N + s\right)!\left(\frac12N -s\right)!} \\ &= \frac{N!}{N_\uparrow!N_\downarrow!} \end{align}\]

### Stirling's approximation

As you can see, we now have a bunch of factorials. Once we compute the entropy, we will have a bunch of logarithms of factorials. \[\begin{align} N! &= \prod_{i=1}^N i \\ \ln N! &= \ln\left(\prod_{i=1}^N i\right) \\ &= \sum_{i=1}^N \ln i \end{align}\] So you can see that the log of a factorial is a sum of logs. When the number of things being summed is large, we can approximate this sum with an integral. This may feel like a funny business, particularly for those of you who took my computational class, where we frequently used sums to approximate integrals! But the approximation can go both ways. In this case, if we approximate the integral as a sum we can find an analytic expression for the factorial: \[\begin{align} \ln N! &= \sum_{i=1}^N \ln i \\ &\approx \int_1^{N} \ln x dx \\ &= \left.x \ln x - x\right|_{1}^{N} \\ &= N\ln N - N + 1 \end{align}\] At this point, we should recognize that the \(1\) that we see is much smaller than the other two terms, and is actually likely to be wrong. Importantly, there is a larger error being made here, which we can see if we zoom into the upper end of our integral. We are missing \(\frac12 \ln N\)! The reason is that our integral went precisely to \(N\), but if we imagine a midpoint rule picture (or trapezoidal rule) we are missing half of that last point. This gives us: \[\begin{align} \ln N! &\approx \left(N+\frac12\right)\ln N - N \end{align}\]We could find the constant term correctly (it is not 1), but that is more work, and even the \(\frac12\) above is usually omitted when using Stirling's approximation, since it is much smaller than the others when \(N\gg 0\)

## Entropy of our spins

I'm going to use a different approach than the text to find the entropy of this spin system when there are many spins and the spin excess is relatively small. \[\begin{align} S &= k\ln g\left(N,s\right) \\ &= k\ln\left(\frac{N!}{\left(\tfrac12 N + s\right)!\left(\tfrac12N -s\right)!}\right) \\ &= k\ln\left(\frac{N!}{N_\uparrow!N_\downarrow!}\right) \\ &= k\ln\left(\frac{N!}{\left(h + s\right)!\left(h -s\right)!}\right) \end{align}\] At this point I'm going to define for convenience \(h\equiv \tfrac12 N\), just to avoid writing so many \(\tfrac12\). I'm also going to focus on the \(s\) dependence of the entropy. \[\begin{align} \frac{S}{k} &= \ln\left(N!\right) - \ln\left(N_\uparrow!\right) - \ln\left(N_\downarrow!\right) \\ &= \ln N! - \ln(h+s)! - \ln(h-s)! \\ &= \ln N! - \sum_{i=1}^{h+s} \ln i - \sum_{i=1}^{h-s} \ln i \end{align}\] At the last step, I wrote the log of the factorial as a sum of logs. Now we can pull out the bit that is independent of \(s\) to separate the \(s=0\) value from the contribution due to \(s\). \[\begin{align} \frac{S}{k} &= \ln N! -2\sum_{i=1}^h \ln i - \sum_{i=h+1}^{h+s} \ln i + \sum_{i=h-s+1}^{h} \ln i \\ &= \ln N! - 2\ln h - \sum_{i=h+1}^{h+s} \ln i + \sum_{i=h-s+1}^{h} \ln i \\ &= \frac{S_0}{k} - \sum_{i=h+1}^{h+s} \ln i + \sum_{i=h-s+1}^{h} \ln i \end{align}\] In the last step here, I defined \(S_0\) to be the entropy when \(s=0\) for convenience. We now have a couple of sums to simplify. \[\begin{align} \frac{S-S_0}{k} &= -\sum_{i=h+1}^{h+s} \ln i + \sum_{i=h-s+1}^{h} \ln i \\ &= -\sum_{k=1}^{s} \ln(h+ k) + \sum_{k=1}^{s} \ln (h-k+1) \\ &= \sum_{k=1}^{s} \left(\ln (h-k+1) - \ln(h+ k)\right) \\ &= \sum_{k=1}^{s} \left(\ln h + \ln\left(1-\frac{k-1}{h}\right) - \ln h - \ln\left(1+ \frac{k}{h}\right)\right) \\ &= \sum_{k=1}^{s} \left(\ln\left(1-\frac{k-1}{h}\right) - \ln\left(1+ \frac{k}{h}\right)\right) \end{align}\] Now we make our first approximation: we assume \(s\ll N\), which means that \(s\ll h\). \[\begin{align} \frac{S-S_0}{k} &\approx \sum_{k=1}^{s} \left(-\frac{k-1}{h} - \frac{k}{h}\right) \\ &= -\frac2{h}\sum_{k=1}^{s} \left(k-\tfrac12\right) \end{align}\] Now we have this sum to solve. You can find this sum either geometrically or with calculus. The calculus involves turning the sum into an integral. As you can see in the figure, the integral \[\begin{align} \int_0^s x dx = \tfrac12 s^2 \end{align}\]has the same value as the sum.

The geometric way to solve this looks visually very much the same as the integral picture, but instead of computing the area from the straight line, we cut the stair-step area "half" and fit the two pieces together such that they form a rectangle with width \(s/2\) and height \(s\).

Taken together, this tells us that when \(s\ll N\) \[\begin{align} S(N,s) &\approx S(N,s=0) - k\frac{2}{h}\frac{s^2}{2} \\ &= S(N,s=0) - k\frac{2s^2}{N} \end{align}\] This means that the multiplicity is gaussian: \[\begin{align} S &= k \ln g \\ g(N,s) &= e^{\frac{S(N,s)}{k}} \\ &= e^{\frac{S(N,s=0)}{k} - \frac{2s^2}{N}} \\ &= g(N,s=0)e^{-\frac{2s^2}{N}} \end{align}\]Thus the multiplicity (and thus probability) is peaked at \(s=0\) as a gaussian with width \(\sim\sqrt{N}\). This tells us that the width of the peak *increases* as we increase \(N\). However, the excess spin *per particle decreases* as \(\sim\frac{1}{\sqrt{N}}\). So that means that our fractional polarization becomes far more sharply peaked as we increase \(N\).

## Thermal contact

Suppose we put two systems in contact with one another. This means that energy can flow from one system to the other. We assume, however, that the contact between the two systems is weak enough that their energy eigenstates are unaffected. This is a bit of a contradiction you'll need to get used to: we treat our systems as non-interacting, but assume there is some energy transfer between them. The reasoning is that the interaction between them is very small, so that we can treat each system separately, but energy can still flow.

We ask the question: "How much energy will each system end up with after we wait for things to settle down?" The answer to this question is that energy will settle down in the way that maximizes the number of microstates.

For the moment, let's consider two systems in contact:

- System \(A\)
- A system of 10 spins each with energy \(\pm \frac12\). This system has the following multiplicity found from Pascal's triangle: \[\begin{equation*}\small \begin{array}{ccccccccccc} 1 \\ 1 & 1 \\ 1 & 2 & 1 \\ 1 & 3 & 3 & 1 \\ 1 & 4 & 6 & 4 & 1 \\ 1 & 5 & 10 & 10 & 5 & 1 \\ 1 & 6 & 15 & 20 & 15 & 6 & 1 \\ 1 & 7 & 21 & 35 & 35 & 21 & 7 & 1 \\ 1 & 8 & 28 & 56 & 70 & 56 & 28 & 8 & 1 \\ 1 & 9 & 36 & 84 & 126 & 126 & 84 & 36 & 9 & 1 \\ 1 & 10 & 45 & 120 & 210 & 252 & 210 & 120 & 45 & 10 & 1 \\ \hline -5 & -4 & -3 & -2 & -1 & 0 & 1 & 2 & 3 & 4 & 5 \end{array} \end{equation*}\]
- System \(B\)
- Three objects that can each have energy 1-6, as in three 6-sided dice. This system has the following multiplicity: \[\begin{equation*}\small \begin{array}{cr|rrrrrrrrrrrrrrrrrrrrrrrrr} E & g \\ \hline 3 & 1 & 1\times 111 \\ 4 & 3 & 3\times 211 \\ 5 & 6 & 3\times 311 & 3\times 221 \\ 6 & 10 & 3\times 411 & 6\times 321 & 1\times 222 \\ 7 & 15 & 3\times 511&6\times 421&3\times 331&3\times 322 \\ 8 & 21 & 3\times 611 & 6\times 521 & 6\times 431 & 3\times 422 & 3\times 322 \\ 9 & 25 & 6\times 621 & 6\times 531 & 3\times 522 & 3\times 441 & 6\times 432 & 1\times 333 \\ 10 & 27 & 6\times 653 & 3\times 644 & 6\times 541 & 6\times 532 & 3\times 442 & 3\times 433 \\ 11 & 27 & 6\times 641 & 6\times 632 & 3\times 551 & 6\times 542 & 3\times 533 & 3\times 443 \\ 12 & 25 & 6\times 651 & 6\times 642 & 3\times 633 & 3\times 552 & 6\times 543 & 1\times 444 \\ 13 & 21 & 3\times 661 & 6\times 652 & 6\times 643 & 3\times 553 & 3\times 544 \\ 14 & 15 & 3\times 662 & 6\times 653 & 3\times 644 & 3\times 554 \\ 15 & 10 & 3\times 663 & 6\times 654 & 1\times 555 \\ 16 & 6 & 3\times 664 & 3\times 655 \\ 17 & 3 & 3\times 665 \\ 18 & +\hfill 1 & 1\times 666 \\\hline 6^3 = & 216 \end{array} \end{equation*}\]

We now want to consider these two systems taken together. You might wonder why I made these examples so very large. The answer is that we are going to be looking at \(\frac{dg}{dE}\), and we need something large enough that the slope is actually interesting. Also, these two systems demonstrate the universal property that when you combine many similar systems together you get a multiplicity that is increasingly sharply peaked.

Given the above, we know for each possible energy of systems \(A\) or \(B\) how many microstates there are. The total number of microstates for system \(A\) is \(2^{10} = 1024\), while the total number of microstates for system \(B\) is \(6^3=216\).

- Question
- What is the total number of microstates when you consider these systems as a single combined system?
- Answer
- We need to multiply the numbers of microstates, because for each microstate of \(A\), it could be in any microstate of \(B\). So the total is \(2^{10}3^6=221184\). Let's not attempt to enumerate all these microstates.

Since we have two separate systems here, it is meaningful to ask what the probability is system \(A\) to have a given energy, given that the combined system has energy \(E_{AB}\).

- Small group question
- Work out the probability for system \(A\) to have every possible energy (please end up with a decimal number), given that the total energy \(E_{AB}\) has a fixed value that I will tell you. What is the most probable energy for system \(B\)? Total energies: 1,2,3,4,5,6,7,8.

Why did I make you do all this work?

This probability distribution has a peak. As we go to larger numbers, this peak will get sharper. As you adjusted the total energy, the peak shifted to a different \(E_B\).

There is a pattern here that tells us what the temperature is! (Or what it is related to...)

\[\begin{equation*} \begin{array}{cc|cc|cc|ccc} E_B & E_A & g_A & g_B & g_A' & g_B' & g_A'/g_A & g_B'/g_B \\\hline -1^{-} & 6^+ & 252 & 21 & \sim 66 & \sim 4.5 & \sim .31 & \sim .45 \\ \end{array} \end{equation*}\]

The closest here are the ratios of the slope of the multiplicity to the multiplicity itself. With this few particles, the discreteness makes taking derivatives challenging, so it's not a terribly convincing demonstration, but we can also prove that this ratio should be equal on the two sides, provided the multiplicity is smooth.

### Showing it is (related to) temperature

The probability of a given energy \(E_B\) given that the total energy is \(E_{AB}\) is given by \[\begin{align} P(E_B|E_{AB}) = \frac{g_B(E_B)g_A(E_{AB}-E_B)}{ \sum_{E} g_B(E)g_A(E_{AB}-E) } \end{align}\] To find the energy with maximum probability, we can take a derivative with respect to \(E_B\) and set it to zero: \[\begin{align} \frac{dP}{dE_B} &= 0 \\ &= \frac{g_B'(E_B)g_A(E_{AB}-E_B) - g_B(E_B)g_A'(E_{AB}-E_B)}{ \sum_{E} g_B(E)g_A(E_{AB}-E) } \end{align}\] We note that the denominator can be multiplied out, simplifying things: \[\begin{align} g_B'(E_B)g_A(E_{AB}-E_B) &= g_B(E_B)g_A'(E_{AB}-E_B) \\ \frac{g_B'(E_B)}{g_B(E_B)} &= \frac{g_A'(E_{AB}-E_B)}{g_A(E_{AB}-E_B)} \end{align}\] So indeed, our inference that the ratio of this slope to value is equal on the two sides was correct. How do we turn this into a temperature? One way is to recognize this pattern of drivative of a function over the function as the derivative of a logarithm. \[\begin{align} \frac{d \ln g}{dE} &= \frac{\frac{dg}{dE}}{g(E)} \end{align}\]Then we can note that this logarithm is an extensive quantity, which smells like an entropy, given that its derivative seems to relate to temperature. Making this relationship explicit requires an actual definition of temperature (rather than simply the fact that the temperature of two systems in thermal equilibrium are equal.

As you already know, \[\begin{align} T = \left(\frac{\partial U}{\partial S}\right)_{V} \end{align}\] so it should be unsurprising (plus you already know) that \[\begin{align} S &= k_B\ln g \\ \frac1{T} &= \left(\frac{\partial S}{\partial E}\right)_{V} \end{align}\]## Recap from 1st homework

In your solution to your first homework problem from last week, you showed that \[\begin{align} S &= k\beta U + k\ln Z \\ U &= TS - kT \ln Z \end{align}\] We can now turn this around and identify \[\begin{align} - kT \ln Z &= U - TS \end{align}\]as the Helmholtz free energy \(F\equiv U-TS\), which you already learned about in Energy and Entropy. To the extent that you have a physical interpretation for the free energy, this gives you a physical interpretation for the partition function, beyond simply being a normalization constant.

## Homework for week 2 (PDF)

**Entropy and Temperature**(K&K 2.1) Suppose \(g(U) = CU^{3N/2}\), where \(C\) is a constant and \(N\) is the number of particles.- Show that \(U=\frac32 N k_BT\).
- Show that \(\left(\frac{\partial^2S}{\partial U^2}\right)_N\) is negative. This form of \(g(U)\) actually applies to the ideal gas.

**Paramagnetism**(K&K 2.2) Find the equilibrium value at temperature \(T\) of the fractional magnetization \[\begin{equation} \frac{M}{Nm} \equiv \frac{2\langle s\rangle}{N} \end{equation}\] of a system of \(N\) spins each of magnetic moment \(m\) in a magnetic field \(B\). The spin excess is \(2s\). The energy of this system is given by \[\begin{align} U &= -MB \end{align}\] where \(M\) is the total magnetization. Take the entropy as the logarithm of the multiplicity \(g(N,s)\) as given in (1.35 in the text): \[\begin{equation} S(s) \approx k_B\log g(N,0) - k_B\frac{2s^2}{N} \end{equation}\] for \(|s|\ll N\), where \(s\) is the spin excess, which is related to the magnetization by \(M = 2sm\).*Hint*: Show that in this approximation \[\begin{equation} S(U) = S_0 - k_B\frac{U^2}{2m^2B^2N}, \end{equation}\]with \(S_0=k_B\log g(N,0)\). Further, show that \(\frac1{kT} = -\frac{U}{m^2B^2N}\), where \(U\) denotes \(\langle U\rangle\), the thermal average energy.

**Quantum harmonic oscillator**(K&K 2.3)- Find the entropy of a set of \(N\) oscillators of frequency \(\omega\) as a function of the total quantum number \(n\). Use the multiplicity function (1.55): \[\begin{equation} g(N,n) = \frac{(N+n-1)!}{n!(N-1)!} \end{equation}\] and assume that \(N\gg 1\). This means you can make the Sitrling approximation that \(\log N! \approx N\log N - N\). It also means that \(N-1 \approx N\).
- Let \(U\) denote the total energy \(n\hbar\omega\) of the oscillators. Express the entropy as \(S(U,N)\). Show that the total energy at temperature \(T\) is
\[\begin{equation}
U = \frac{N\hbar\omega}{e^{\frac{\hbar\omega}{kT}}-1}
\end{equation}\]
This is the Planck result: it is derived again in Chapter 4 by a powerful method that does not require us to find the multiplicity function.

- David notes
- In this chapter we are doing things the
**hard**way. The "powerful" method coming up is actually the easy way, which is how you will always solve problems like this, once you have been taught it!

# Week 3: Boltzmann distribution and Helmholtz

This week we will be deriving the Boltzmann ratio and the Helmholtz free energy, continuing the microcanonical approach we started last week. Last week we saw that when two systems were considered together in a microcanonical picture, the energy of each system taken individually is *not* fixed. This provides our stepping stone to go from a **microcanonical** picture where all possible microstates have the same energy (and equal probability) to a **canonical** picture where all energies are possible and the probability of a given microstate being observed depends on the energy of that state.

where \(S(E)\) is the Boltzmann expression for the entropy of a microcanonical ensemble. To definitively connect this with temperature, we will again consider two systems in thermal equilibrium using a microcanonical ensemble, but this time we will make one of those two systems *huge.* In fact, it will be so huge that we can treat it using classical thermodynamics, i.e. we can conclude that the above equation applies, and we can assume that the temperature of this huge system is unaffected by the small change in energy that could happen due to differences in the *small* system.

*huge*. This means that we can treat \(g_B\) in a simple approximate manner. \[\begin{align} g_B(E_{AB}-E_A) &= e^{S_B(E_{AB}-E_A)/k_B} \\ &\approx e^{S_B(E_{AB})/k_B - \frac{E_A}{k_BT} + \cdots} \end{align}\] In the approximate step here, I used a power series expansion of the entropy around \(E_{AB}\), and also used the fact the the inverse temperature is the derivative of the entropy with respect to energy. Now provided the system \(B\) is

*very seriously huge*, we can omit the \(\cdots\) and consider the equation exact. Plugging this into the probability equation we have \[\begin{align} P_{A}(E_A) &= \frac{g_A(E_A) e^{S_B(E_{AB})/k_B - \frac{E_A}{k_BT}}}{ \sum_{E_A'}g_A(E_A') e^{S_B(E_{AB})/k_B - \frac{E_A'}{k_BT}} } \\ &= \frac{g_A(E_A) e^{- \frac{E_A}{k_BT}}}{ \sum_{E_A'}g_A(E_A') e^{- \frac{E_A'}{k_BT}} } \end{align}\] Now this looks a bit different than the probabilities we saw previously (two weeks ago), and that is because this is the probability that we see energy \(E_A\),

*not*the probability for a given microstate, and thus it has the factors of \(g_A\), and it sums over energies rather than microstates. We can easily rectify this, which will result in \[\begin{align} P_\mu^A &= \frac{e^{- \frac{E_\mu^A}{k_BT}}}{Z} \\ Z &= \sum_\mu e^{- \frac{E_\mu^A}{k_BT}} \end{align}\]

This is all there is to show the Boltzmann probability distribution from the microcanonical picture: Big system with little system, treat big system thermodynamically, count microstates.

## Internal energy

Now that we have the set of probabilities, there are a few things we can solve for directly, namely any quantities that are directly defined from probabilities. Most specifically, the internal energy \[\begin{align} U &= \sum_\mu P_\mu E_\mu \\ &= \sum_\mu E_\mu \frac{e^{-\beta E_\mu}}{Z} \\ &= \frac1Z \sum_\mu E_\mu e^{-\beta E_\mu} \end{align}\] Now doing yet another summation will often feel tedious. There are a couple of ways to make this easier. The simplest is to examine the sum above and notice how very similar it is to the partition function itself. If you take a derivative of the partition function with respect to \(\beta\), you will find: \[\begin{align} \left(\frac{\partial Z}{\partial \beta}\right)_{V} &= \sum_\mu e^{-\beta E_\mu} (-E_\mu) \\ &= -UZ \\ U &= -\frac{1}{Z}\left(\frac{\partial Z}{\partial \beta}\right)_{V} \\ &= -\left(\frac{\partial \ln Z}{\partial \beta}\right)_{V} \end{align}\]- Big Warning
- In this class, I do not want you beginning
**any solution**(either homework or exam) with a formula for \(U\) in terms of \(Z\)! This step is not that hard, and you need to do it every time. What you need to remember is*definitions*, which in this case is how \(U\) comes from probability.*The reasoning here is that I've all too often seen students who years after taking thermal physics can***only**remember that there is**some**expression for \(U\) in terms of \(Z\). It is easier**and**more correct to remember that \(U\) is a weighted average of the energy.

## Pressure

How do we compute pressure? So far, everything we have done has kept the volume fixed. Pressure tells us how the energy changes when we change the volume, i.e. how much work is done. From Energy and Entropy, we know that \[\begin{align} dU &= TdS - pdV \\ p &= -\left(\frac{\partial U}{\partial V}\right)_S \end{align}\]So how do we find the pressure? We need to find the change in internal energy when we change the volume *at fixed entropy.*

- Small white boards
- How do we keep the entropy fixed when changing the volume?
- Answer
- Experimentally, we would avoid allowing any heating by insulating the system. Theoretically, this is less easy. When we consider the Gibbs entropy, if we could keep all the probabilities fixed while expanding, we would also fix the entropy! In quantum mechanics, we can show that such a process is possible using time-dependent perturbation theory. Under certain conditions, if you perturb a system sufficiently slowly, it will remain in the "same" eigenstate it was in originally. Although the eignestate changes, and its energy changes, they do so continuously.

## Helmholtz free energy

We saw a hint above that \(U\) somehow relates to \(\ln Z\), which hinted that \(\ln Z\) might be something special. Let's put this into thermodynamics language.^{1}\[\begin{align} U &= -\left(\frac{\partial \ln Z}{\partial \beta}\right)_{V} \\ d\ln Z &= -Ud\beta + \left(\frac{\partial \ln Z}{\partial V}\right)_{\beta} dV \end{align}\] Now we're going to try a switch to a \(dU\) rather than a \(d\beta\), since we know something about \(dU\). \[\begin{align} d(\beta U) &= Ud\beta + \beta dU \\ d\ln Z &= -\left(d(\beta U) - \beta dU\right) + \left(\frac{\partial \ln Z}{\partial V}\right)_{\beta} dV \\ &= \beta dU -d(\beta U) + \left(\frac{\partial \ln Z}{\partial V}\right)_{\beta} dV \\ \beta dU &= d\left(\ln Z + \beta U\right) - \left(\frac{\partial \ln Z}{\partial V}\right)_{\beta} dV \\ dU &= Td\left(k_B\ln Z + U/T\right) - kT\left(\frac{\partial \ln Z}{\partial V}\right)_{T} dV \end{align}\] Comparing this result with the thermodynamic identity tells us that \[\begin{align} S &= k_B\ln Z + U/T \\ F &\equiv U-TS \\ &= U - T\left(k_B\ln Z + U/T\right) \\ &= U - k_BT\ln Z + U \\ &= - k_BT\ln Z \end{align}\]

That was a bit of a differentials slog, but got us the same result without assuming the Gibbs entropy. It did, however, demonstrate a not-quite-contradiction, in that the expression we found for the entropy is not mathematically equal to the Boltmann entropy. It approaches the same thing for large systems, although I won't prove that now.

- Small groups
- Consider a system with \(g\) eigenstates, each with energy \(E_0\). What is the free energy?
- Answer
- We begin by writing down the partition function
\[\begin{align}
Z &= \sum_\mu e^{-\beta E_\mu} \\
&= g e^{-\beta E_0}
\end{align}\]
Now we just need a log and we're done.
\[\begin{align}
F &= -kT\ln Z \\
&= -kT \ln\left(g e^{-\beta E_0}\right)
\\
&= -kT \left(\ln g + \ln e^{-\beta E_0}\right)
\\
&= E_0 - Tk\ln g
\end{align}\]
This is just what we would have concluded about the free energy if we had used the Boltzmann expression for the entropy in this microcanonical ensemble.

Waving our hands, we can understand \(F=-kT\ln Z\) in two ways:

- If there are more accessible microstates, \(Z\) is bigger, which means \(S\) is bigger and \(F\) must be more negative.
- If we only consider the most probable energies, to find the energy from \(Z\), we need the negative logarithm, and a \(kT\) to cancel out the \(\beta\).

## Using the free energy

Why the big deal with the free energy? One way to put it is that it is relatively easy to compute. The other is that once you have an analytic expression for the free energy, you can solve for pretty much anything else you want.

Recall: \[\begin{align} F &\equiv U-TS \\ dF &= dU - SdT - TdS \\ &= -SdT - pdV \\ -S &= \left(\frac{\partial F}{\partial T}\right)_V \\ -p &= \left(\frac{\partial F}{\partial V}\right)_T \end{align}\]Thus by taking partial derivatives of \(F\) we can find \(S\) and \(p\) as well as \(U\) with a little arithmetic. You have all seen the Helmholtz free energy before so this shouldn't be much of a surprise. Practically, the Helmholtz free energy is *why* finding an analytic expression for the partition function is so valuable.

Note that this could also have come from a manipulation of the previous derivative of the internal energy. However, the "heat" reasoning allows us to recognize that the heat capacity at constant pressure will have the same form when expressed as an entropy derivative. This expression is also convenient when we compute the entropy from the Helmholtz free energy, because we already know the entropy as a function of \(T\).

## Ideal gas with just one atom

Let us work on the free energy of a particle in a 3D box.

- Small groups
- Work out (or write down) the energy eigenstates for a particle confined to a cubical volume with side length \(L\). You may either use periodic boundary conditions or an infinite square well. When you have done so, write down an expression for the partition function.
- Answer
- The energy is just the kinetic energy, given by \[\begin{align} T &= \frac{\hbar^2 |\vec k|^2}{2m} \end{align}\] The allowed values of \(k\) are determined by the boundary conditions. If we choose periodic boundary conditions, then \[\begin{align} k_x &= n_x \frac{2\pi}{L} & n_x &= \text{any integer} \end{align}\] and similarly for \(k_y\) and \(k_z\), which gives us \[\begin{align} E_{n_xn_yn_z} &= \frac{2\pi^2\hbar^2}{mL^2}\left(n_x^2+n_y^2+n_z^2\right) \end{align}\] where \(n_x\), \(n_y\), and \(n_z\) take any integer values. If we chose the infinite square well boundary conditions instead, our integers would be positive values only, and the prefactor would differ by a factor of four.

The last bit here basically looks a lot like separation of variables. Our energy separates into a sum of \(x\), \(y\) and \(z\) portions (which is why we can use separation of variables for the quantum problem), but that also causes things to separate (into a product) when we compute the partition function.

This final sum here is now something we would like to approximate. If our box is reasonably big (and our temperature is not *too* low), we can assume that \(\frac{4\pi^2\hbar^2}{k_BTmL^2} \ll 1\), which is the classical limit. In this limit, the "thing in the exponential" hardly changes when we change \(n\) by 1, so we can reasonably replace this summation with an integral.

- Note
- You might have thought to use a power series expansion (which is a good instinct!) but in this case that won't work, because \(n\) gets arbitrarily large.

This looks like (and *is*) a very simple formula, but you need to keep in mind that \(n_Q\) depends on temperature, so it's not quite as simple as it looks. Now that we have the Helmholtz free energy, we can solve for the entropy, pressure, and internal energy pretty quickly.

- Small groups
- Solve for the entropy, pressure, and internal energy. \[\begin{align} S &= -\left(\frac{\partial F}{\partial T}\right)_V \\ &= k\ln \left(Vn_Q\right) +\frac{kT}{Vn_Q}V\frac{dn_Q}{dT} \\ &= k\ln \left(Vn_Q\right) +\frac{kT}{n_Q}\frac32 \frac{n_Q}{T} \\ &= k\ln \left(Vn_Q\right) +\frac32k_B \end{align}\] You could find \(U\) by going back to the weighted average definition and using the derivative trick from the partition function, but with the free energy and entropy it is just algebra. \[\begin{align} U &= F + TS \\ &= -kT\ln \left(Vn_Q\right) + kT\ln \left(Vn_Q\right) +\frac32k_BT \\ &= \frac32k_BT \end{align}\] The pressure derivative gives a particularly simple result. \[\begin{align} p &= -\left(\frac{\partial F}{\partial V}\right)_T \\ &= -\frac{kT}{V} \end{align}\]

## Ideal gas with multiple atoms

Extending from a single atom to several requires just a bit more subtlety. Naively, you could just argue that because we understand extensive and intensive quantities, we should be able to go from a single atom to \(N\) atoms by simply scaling all extensive quantities. That is almost completely correct (if done correctly).

The entropy has an extra term (the "entropy of mixing"), which also shows up in the free energy. Note that while we may think of this "extra term" as an abstract counting thing, *it is physically observable*, provided we do the right kind of experiment (which turns out to need to involve changing \(N\), so we won't discuss it in detail until we talk about changing \(N\) later).

There are a few different ways we could imagine putting \(N\) non-interacting atoms together. I will discuss a few here, starting from simplest, and moving up to the most complex.

- Different atoms, same box
- One option is to consider a single box with volume \(V\) that holds \(N\) different atoms, each of a different kind, but all with the same mass. In this case, each microstate of the system will consist of a microstate for each atom. Quantum mechanically, the wave function for the entire state with \(N\) atoms will separate and will be a product of states \[\begin{align} \Psi_\mu(\vec r_1, \vec r_2, \cdots, \vec r_N) &= \prod_{i=1}^{N}\phi_{n_{xi},n_{yi},n_{zi}}(\vec r_i) \end{align}\] and the energy will just be a sum of different energies. The result of this will be that the partition function of the entire system will just be the product of the partition functions of all the separate non-interacting systems (which happen to all be equal). This is mathematically equivalent to what already happened with the three \(x\), \(y\) and \(z\) portions of the partition function. \[\begin{align} Z_N &= Z_1^N \\ F_N &= N F_1 \end{align}\] This results in simply scaling all of our extensive quantities by \(N\) except the volume, which didn't increase when we added more atoms.
- Identical atoms, but different boxes
- We can also consider saying all atoms are truly identical, but each atom is confined into a different box, each with identical (presumably small) size. In this case, the same reasoning as we used above applies, but now we also scale the total volume up by \(N\). This is a more natural application of the idea of extensivity. \[\begin{align} Z_N &= Z_1^N \\ F_N &= N F_1 \\ V &= N V_1 \end{align}\] This is an example of taking the idea of extensivity to an extreme: we keep saying that a system with half as much volume and half as many atoms is "half as much" until there is only one atom left. You would be right to be skeptical that putting one atom per box hasn't resulted is an error.
- Identical atoms, same box
This is the picture for a real ideal gas. All of our atoms are the same, or perhaps some fraction are a different isotope, but who cares about that? Since they are all in the same box, we will want to write the many-atom wavefunction as a product of single-atom wavefunctions (sometimes called orbitals). However, now we have a bit of a challenge. Since there is no difference between the different atoms, there is no difference between atom 1 having the state \((n_x,n_y,n_z) = 1,2,3\) while atom 2 has the state \((n_x,n_y,n_z) = 3,2,1\) versus atom 2 having the first state, while atom 1 has the second state.

This is a little complicated to explain, and it'll be simpler if we just label each single-particle eigenstate (or orbital) with a single label for simplicity. If we think about \(N\) atoms, we can define an eigenstate according to how many atoms are in state 0, how many are in state 1, etc. This is a combination kind of problem, which we have encountered before. It simplifies if we assume that the odds of having two atoms in exactly the same state is negligible, in which case we will find that we are counting each microstate \(N!\) times. \[\begin{align} Z_N &= \frac1{N!}Z_1^N \\ F_N &= N F_1 + k_BT \ln N! \\ &\approx N F_1 + Nk_BT(\ln N - 1) \end{align}\]We could go on, and the text does so, but we've got a whole chapter on the ideal gas, so I'll leave this for you to play with.

## Homework for week 3 (PDF)

*For each problem, please let me know how long the problem took, and what resources you used to solve it!*

**Free energy of a two state system**(K&K 3.1, modified)- Find an expression for the free energy as a function of \(T\) of a system with two states, one at energy 0 and one at energy \(\varepsilon\).
- From the free energy, find expressions for the internal energy \(U\) and entropy \(S\) of the system.
- Plot the entropy versus \(T\). Explain its asymptotic behavior as the temperature becomes high.
- Plot the \(S(T)\) versus \(U(T)\). Explain the maximum value of the energy \(U\).

**Magnetic susceptibility**(K&K 3.2)- Use the partition function to find an exact expression for the magentization \(M\) and the susceptibility \(\chi\equiv\left(\frac{\partial M}{\partial B}\right)_T\) as a function of temperature and magnetic field for the model system of magnetic moments in a magnetic field. The result for the magnetization is \(M=nm\tanh\left(\frac{mB}{kT}\right)\), as derived in (46) by another method. Here \(n\) is the particle concentration. The result is plotted in the book.
- Find the free energy and epress the result as a function only of \(T\) and the parameter \(x\equiv \frac{M}{nm}\).
- Show that the susceptibility is \(\chi=\frac{nm^2}{kT}\) in the limit \(mB\ll kT\).

**Free energy of a harmonic oscillator**(K&K 3.3) A one-dimensional harmonic oscillator has an infinite series of equally spaced energy states, with \(\varepsilon_s = s\hbar\omega\), where \(s\) is a positive integer or zero, and \(\omega\) is the classical frequency of the oscillator. We have chosen the zero of energy at the state \(s=0\)**[which Kittel can get away with here, but is not actually the zero of energy!]**.- Show that for a harmonic oscillator the free energy is \[\begin{equation} F = k_BT\log\left(1 - e^{-\frac{\hbar\omega}{k_BT}}\right) \end{equation}\] Note that at high temperatures such that \(k_BT\gg\hbar\omega\) we may expand the argument of the logarithm to obtain \(F\approx k_BT\log\left(\frac{\hbar\omega}{kT}\right)\).
- From the free energy above, show that the entropy is
\[\begin{equation}
\frac{S}{k_B} =
\frac{\frac{\hbar\omega}{kT}}{e^{\frac{\hbar\omega}{kT}}-1}
- \log\left(1-e^{-\frac{\hbar\omega}{kT}}\right)
\end{equation}\]
This entropy is shown in the nearby figure, as well as the heat capacity.

**Energy fluctuations**(K&K 3.4) Consider a system of fixed volume in thermal contact with a resevoir. Show that the mean square fluctuations in the energy of the system is \[\begin{equation} \left<\left(\varepsilon-\langle\varepsilon\rangle\right)^2\right> = k_BT^2\left(\frac{\partial U}{\partial T}\right)_{V} \end{equation}\] Here \(U\) is the conventional symbol for \(\langle\varepsilon\rangle\).*Hint:*Use the partition function \(Z\) to relate \(\left(\frac{\partial U}{\partial T}\right)_V\) to the mean square fluctuation. Also, multiply out the term \((\cdots)^2\).*Note:*The temperature \(T\) of a system is a quantity that by definition does not fluctuate in value when the system is in thermal contact with a resevoir. Any other attitude would be inconsistent with our definition of the temperature of a system. The energy of such a system may fluctuate, but the temperature does not. Some workers do not adhere to a rigorous defintion of temperature. Thus Landau and Lifshitz give the result \[\begin{align} \left<(\Delta T)^2\right> = \frac{k_BT^2}{C_V}, \end{align}\]but this should be viewed as just another form of what you have proven in this problem, with \(\Delta T\) set equal to \(\Delta U/C_V\). We know that \(\Delta U = C_V\Delta T\)

*(for small values of \(\Delta T\))*, whence these two equations become equal.**Quantum concentration**(K&K 3.8) Consider one particle confined to a cube of side \(L\); the concentration in effect is \(n=L^{-3}\). Find the kinetic energy of the particle when in the ground state. There will be a value of the concentration for which this zero-point quantum kinetic energy is equal to the temperature \(kT\). (At this concentration the occupancy of the lowest orbital is of the order of unity; the lowest orbital always has a higher occupancy than any other orbital.) Show that the concentration \(n_0\) thus defined is equal to the quantum concentration \(n_Q\) defined by (63): \[\begin{equation} n_Q \equiv \left(\frac{MkT}{2\pi\hbar^2}\right)^{\frac32} \end{equation}\]within a factor of the order of unity.

**One-dimensional gas**(K&K 3.11) Consider an ideal gas of \(N\) particles, each of mass \(M\), confined to a one-dimensional line of length \(L\). Find the entropy at temperature \(T\). The particles have spin zero.

# Week 4: Thermal radiation and Planck distribution

This week we will be tackling things that reduce to a bunch of simple harmonic oscillators. Any system that classically reduces to a set of normal modes each with its own frequency falls in this category. We will start with just an ordinary simple harmonic oscillator, and will move on to look at radiation (photons) and sound in solids (phonons).

## Harmonic oscillator

You will recall that the energy eigenvalues of a single simple harmonic oscillator are given by \[\begin{align} E_n &= (n+\tfrac12)\hbar\omega \end{align}\]- Note
- The text uses \(s\) rather than \(n\) for the quantum number, but that is annoying, and on the blackboard my \(s\) looks too much like my \(S\), so I'll stick with \(n\). The text also omits the zero-point energy. It does make the math simpler, but I think it's worth seeing how the zero-point energy goes away to start with.

We can see now that the ground state energy just ends up as a constant that we add to the free energy, which is what you probably would have guessed. Kittel was able to omit this constant simply by redefining the zero of energy.

- Small groups
- Solve for the high temperature limit of the free energy.
- Answer
- At high temperatures, \(\beta\hbar\omega \ll 1\), which means \[\begin{align} e^{-\beta\hbar\omega} &= 1 - \beta\hbar\omega + \frac12(\beta\hbar\omega)^2+\cdots \\ \ln(1-e^{-\beta\hbar\omega}) &= \ln\left(\beta\hbar\omega - \tfrac12(\beta\hbar\omega)^2+\cdots\right) \\ F &\approx \tfrac12\hbar\omega + kT\ln\left(\frac{\hbar\omega}{kT}\right) \end{align}\] So far this doesn't tell us much, but from it we can quickly tell the high temperature limits of the entropy and internal energy: \[\begin{align} S &\approx -k\ln\left(\frac{\hbar\omega}{kT}\right) - kT\frac{kT}{\hbar\omega}\left(-\frac{\hbar\omega}{kT^2}\right) \\ &= k\left(\ln\left(\frac{kT}{\hbar\omega}\right)+1\right) \end{align}\] The entropy increases as we increase temperature, as it always must. The manner in which \(S\) increases logarithmically with temperature tells us that the number of accessible microstates must be proportional to \(\frac{kT}{\hbar\omega}\).

### Planck distribution

Finally, we can find the internal energy and the average quantum number (or number of "phonons"). The latter is known as the**Planck distribution**. \[\begin{align} U &= F + TS \\ &= \frac12\hbar\omega + T \frac{e^{-\beta\hbar\omega}}{1 - e^{-\beta\hbar\omega}}\frac{\hbar\omega}{T} \\ &= \left(\frac12 + \frac{e^{-\beta\hbar\omega}}{1 - e^{-\beta\hbar\omega}}\right)\hbar\omega \\ U &= \left(\langle n\rangle + \tfrac12\right)\hbar\omega \\ \langle n\rangle &= \frac{e^{-\beta\hbar\omega}}{1 - e^{-\beta\hbar\omega}} \\ &= \frac{1}{e^{\beta\hbar\omega}-1} \end{align}\]

So far, all we've done is a straightforward application of the canonical formalism from last week: we computed a partition function, took a log, and from that found the entropy and internal energy.

- Small groups
- Solve for the high-temperature and low-temperature limits of the internal energy and/or the average number of quanta \(\langle n\rangle\).
- High temperature answer
- First we consider \(\frac{kT}{\hbar\omega}\gg 1\) or \(\beta\hbar\omega\ll 1\). In this case, the exponential is going to be very close to one, and we can use a power series approximation for it. \[\begin{align} \langle n\rangle &= \frac{1}{e^{\beta\hbar\omega}-1} \\ &\approx \frac{1}{\left(1 + \beta\hbar\omega + \tfrac12(\beta\hbar\omega)^2 +\cdots\right) -1} \\ &= \frac{kT}{\hbar\omega} \frac1{1 + \tfrac12\beta\hbar\omega + \cdots} \\ &= \frac{kT}{\hbar\omega} \left(1 - \tfrac12\beta\hbar\omega + \cdots\right) \\ &\approx \frac{kT}{\hbar\omega} - \frac12 \end{align}\] The first term is our equipartition term: \(\frac12kT\) each for the kinetic and potential energy. The second term is our next-order correction, which you need not necessarily include. There would be a next term which would be proportional to \(1/T\), but we have omitted.
- Low temperature answer
- At low temperature \(\beta\hbar\omega\gg 1\), and we would rather look the other representation: \[\begin{align} \langle n\rangle &= \frac{1}{e^{\beta\hbar\omega}-1} \\ &= \frac{e^{-\beta\hbar\omega}}{1 - e^{-\beta\hbar\omega}} \end{align}\] because now the exponentials are small (rather than large), which means we can expand the denominator as a power series. \[\begin{align} \langle n\rangle &= e^{-\beta\hbar\omega}\left(1 + e^{-\beta\hbar\omega} + \cdots\right) \\ &\approx e^{-\beta\hbar\omega} + e^{-2\beta\hbar\omega} \end{align}\] Once again, I kept one more term than is absolutely needed. Clearly at low temperature we have a very low number of quanta, which should be no shock. I hope you all expected that the system would be in the ground state at very low temperature.

## Summing over microstates

I realized that we haven't spent much time talking about how to sum over microstates. Once you "get it," summing over microstates is very easy. Unfortunately, this makes it less obvious that this requires teaching, and I have a tendency to skim over this summation.

A nice example of this was the second homework, which involved the paramagnet again. You needed to find the partition function for \(N\) dipoles. After spending a week working with multiplicities, it would be very natural to take the \[\begin{align} Z \equiv \sum_\mu e^{-\beta E_\mu} \end{align}\] and think of the \(\mu\) as having something to do with spin excess, and to think that this sum should involve multiplicities. You*can*write a solution here using multiplicities and summing over all possible energies, but that is the hard way. The easy way only looks easy once you know how to do it. The easy way involves literally summing over every possible sequence of spins. \[\begin{align} Z &= \sum_{s_1=\pm1}\sum_{s_2=\pm1}\cdots\sum_{s_N=\pm1}e^{-\beta E(s_1,s_2,\cdots,s_N} \end{align}\] This may look messy, but things simplify when we consider the actual energy (unless we try to simplify

*that*by expressing it in terms of \(N_\uparrow\) or the spin excess). \[\begin{align} E(s_1,s_2,\cdots,s_N) &= -s_1mB - s_2mB - \cdots - s_NmB \end{align}\] Now this may look pretty nasty, but it's actually beautiful, because each \(s_i\) has a separate term that is added together, which means that it separates! I'll use fewer words for a bit... \[\begin{align} Z &= \sum_{s_1=\pm1}\sum_{s_2=\pm1}\cdots\sum_{s_N=\pm1} e^{\beta (s_1mB + s_2mB + \cdots + s_NmB)} \\ &= \sum_{s_1=\pm1}\sum_{s_2=\pm1}\cdots\sum_{s_N=\pm1} e^{\beta s_1mB}e^{\beta s_2mB}\cdots \\ &= \sum_{s_1=\pm1}e^{\beta s_1mB}\sum_{s_2=\pm1}e^{\beta s_2mB}\cdots \sum_{s_N=\pm1}e^{\beta s_NmB} \\ &= \left(\sum_{s_1=\pm1}e^{\beta s_1mB}\right)\cdots \left(\sum_{s_N=\pm1}e^{\beta s_NmB}\right) \\ &= \left(\sum_{s=\pm1}e^{\beta s mB}\right)\cdots \left(\sum_{s=\pm1}e^{\beta smB}\right) \\ &= \left(\sum_{s=\pm1}e^{\beta s mB}\right)^N \end{align}\]

The important steps above were

- Writing the sum over states as a nested sum over every quantum number of the system.
- Breaking the exponential into a product, which we can do because the energy is a sum of terms each of which involve just one quantum number.
- Doing each sum separately, and finding the result as the product of all those sums.

Note that the final result here is a free energy that is just \(N\) times the free energy for a system consisting of a single spin. And thus we could alternatively do our computation for a system with a single spin, and then multiply everything that is extensive by \(N\). The latter is a valid shortcut, but you should know why it gives a correct answer, and when (as when we have identical particles) you could run into trouble.

## Black body radiation

Researchers in 1858-1860 realized that materials emitted light in strict proportion to their ability to absorb it, and hence a perfectly black body would be emit the most radiation when heated. Planck and others realized that we should be able to use thermal physics to predict the spectrum of black body radation. A key idea was to recognize that the light itself should be in thermal equilibrium.

One example of a "black body" is a small hole in a large box. Any light that goes into the hole will bounce around so many times before coming out of the hole, that it will all be absorbed. This leads to the idea of studying the radiation in a closed box, which should match that of a black body, when it is in thermal equilibrium.

### Eigenstates of an empty box

So what are the properties of an empty box? Let's assume metal walls, and not worry too much about details of the boundary conditions, which shouldn't make much difference provided the box is pretty big. The reasoning is basically the same as for a particle in a 3D box: the waves must fit in the box. As for the particle in a box, we can choose either periodic boundary conditions or put nodes at the boundaries. I generally prefer periodic (which gives both positive and negative \(\vec k\)), rather than dealing with sine waves (which are superpositions of the above). A beautiful thing about periodic boundary conditions is that your set of \(\vec k\) vectors is independent of the Hamiltonian, so this looks very much like the single atom in a box we did last week. \[\begin{align} k_x &= n_x \frac{2\pi}{L} & n_x &= \text{any integer} \end{align}\] and similarly for \(k_y\) and \(k_z\), which gives us \[\begin{align} \omega(\vec k) &= c|\vec k| \\ \omega_{n_xn_yn_z} &= \frac{2\pi c}{L}\sqrt{n_x^2+n_y^2+n_z^2} \end{align}\]where now we need to be extra-careful to rememer that \(n_x\) is *not* a number of photons, even though \(n\) *is* a number of photons. Fortunately, we will soon be done with our \(n_x\), once we finish summing.

At this point we have pretty much solved for the free energy of a vacuum at temperature \(T\). We know it should scale as \(T^4\), and that it should scale with volume. The latter should have been obvious, since it's the only way that the free energy could be extensive. You might worry about the definite integral, but **it is just a dimensionless number!** Yes, it matters if we want to know precisely how much radiation to expect from a black body, but we could solve this integral numerically, or we could have just done an experimental measurement to see what this number is. Wolfram Alpha tells us that this number is -2.165. You could tell it should be negative because the thing in the \(\ln\) is always less than one, meaning the \(\ln\) is always negative. You might be weirded out that the free energy density is negative, but this just means it is dominated by entropy, since the entropy term is always negative.

- Extra fun
Can any of you find an elegant solution to the above definite integral? If so, please share it with me, and I'll share it with the class.

Comparing with the textbook, it seems that \[\begin{equation} \int_0^\infty \ln\left(1-e^{-\xi}\right)\xi^2d\xi = \frac{\pi^4}{45} \end{equation}\]which has the same numerical value that Wolfam Alpha gives. I don't see the trick to solve this integral, though. Interestingly, Kittel takes another route to the solution, which gives a different integral, which he finds in a table of integrals.

So the internal energy scales the same as the free energy, but is positive, as we would expect.

### Sefan-Boltzmann law of radiation

To find the radiation power, we need do a couple of things. One is to multiply the energy per volume by the speed of light, which would tell us the energy flux through a hole if all the energy were passing straight through that hole. However, there is an additional geometrical term we will need to find the actual magnitude of the power, since the radiation is travelling equally in all directions. This will give us another dimensionless factor.

If we define the velocity as \(c\hat k\) where \(c\) is the speed of light and \(\hat k\) is its direction, the power flux (or intensity) in the \(\hat z\) direction will be given by the energy density times the average value of the*positive*\(\hat z\) component of the velocity. When \(v_z<0\), the light doesn't come out the hole at all. This average can be written as \[\begin{align} I &= \frac{U}{V}\frac{\int_0^{2\pi}\int_0^{\frac{\pi}{2}}v_z\sin\theta d\theta d\phi}{4\pi} \\ &= \frac{U}{V}\frac{\int_0^{2\pi}\int_0^{\frac{\pi}{2}}c\cos\theta\sin\theta d\theta d\phi}{4\pi} \\ &= \frac{U}{V}\frac{c}2\int_0^{1}\xi d\xi \\ &= \frac{U}{V}\frac{c}{4} \\ &= -6\pi \frac{(kT)^4}{h^3c^2} \int_0^\infty \ln\left(1-e^{-\xi}\right)\xi^2d\xi \end{align}\] This is the famous Stefan-Boltzmann law of radiation. Since the constants are all mostly a nuisance, they are combined into the Stefan-Boltzmann constant: \[\begin{align} I &\equiv \text{power radiated per area of surface} \\ &= \sigma_B T^4 \\ \sigma_B &= -6\pi \frac{k_B^4}{h^3c^2} \int_0^\infty \ln\left(1-e^{-\xi}\right)\xi^2d\xi \end{align}\]

- Side note
- Why is this \(T^4\) law important for incandescent light bulbs? The resistivity of a metal increases with temperature. In a light bulb, if you have a bit of wire that is a bit hotter than the rest, its resistivity will be higher, and that will cause it to have more Joule heating, and get hotter. If nothing else came into play, we'd have a feedback loop, and the hot bit would just keep getting hotter, and having higher resistivity, until it vaporized. Boom. Fortunately, the power of light radiated from that hot bit of wire will increase faster than its resistivity goes up (because \(T^4\) is serious!), preventing the death spiral, and saving the day!

### Planck radiation law

Having found the total power radiated, a fair question is how much of that power is at each possible frequency. This defines the black body spectrum. Each mode has an occupancy \(\langle n\rangle\) that is the same as that of the harmonic oscillator from Monday. But the power radiated also depends on how many modes there are at a given frequency. This may be more clear if we solve for the internal energy in a different way:

\[\begin{align} U &= \sum_j^{\text{modes}} \langle n_j\rangle \hbar\omega_j \\ &= \sum_j^{\text{modes}} \frac{\hbar\omega_j}{e^{\beta\hbar\omega_j}-1} \\ &\approx \iiint \frac{\frac{hc}{L}\sqrt{n_x^2+n_y^+n_z^2}}{e^{\beta\frac{hc}{L}\sqrt{n_x^2+n_y^+n_z^2}}-1}dn_xdn_ydn_z \\ &= \int_0^{\infty}\frac{\frac{hc}{L}n}{e^{\beta\frac{hc}{L}n}-1}4\pi n^2dn \end{align}\] Now we can transform the integral from \(n\) to \(\omega\) via \(\omega_n = c 2\pi n/L\). \[\begin{align} U &= \left(\frac{L}{c 2\pi}\right)^3 \int_0^{\infty}\frac{\hbar\omega}{e^{\beta\hbar\omega}-1}4\pi \omega^2d\omega \\ &= \frac{V}{c^3 (2\pi)^3} \int_0^{\infty}\frac{\hbar\omega}{e^{\beta\hbar\omega}-1}4\pi \omega^2d\omega \end{align}\] At this point we can identify the internal energy \[\begin{align} \frac{dU}{d\omega} &= \frac{V\omega^2}{c^3 2\pi^2} \frac{\hbar\omega}{e^{\beta\hbar\omega}-1} \end{align}\]which is proportional to the spectral density of power, which is proportional to \(\omega^3\) at low frequency, and dies off exponentially at high frequency.

### Kirchoff law

### Surface temperature

## Phonons in solids

Much of the same physics that we have considered here applies also to phonons in solids. For smallish \(\vec k\), the frequency of a phonon is proportional to \(|\vec k|\), with the speed of sound as the proportionality constant. We won't have time for this in class.

### Debye theory

The key thing Debye realized was that unlike light, the phonon \(\vec k\) has a maximum value.

## Homework for week 4 (PDF)

**\(\bigotimes\) Number of thermal photons**(K&K 4.1) Show that the number of photons \(\sum\langle s_n\rangle\) in equilibrium at temperature \(T\) in a cavity of volume \(V\) is \[\begin{equation} N=2.404\pi^{-2}\left(\frac{kT}{\hbar c}\right)^3 \end{equation}\]From (23) the entropy is \(S=k_B\frac{4\pi V}{45}\left(\frac{kT}{\hbar c}\right)^3\), whence \(S/N \approx 3.602\). It is believed that the total number of photons in the universe is \(10^8\) times larger than the total number of nucleons (protons, neutrons). Because both entropies are of the order of the respective number of particles (see Eq. 3.76), the photons provide the dominant contribution to the entropy of the universe, although the particles dominate the total energy. We believe the entropy of the photons is essentially constant, so that the entropy of the universe is approximately constant with time.

*David notes: If the universe is governed by quantum mechanics, then its entropy is exactly constant with time. However, the entropy of the universe is not a measurable quantity (even in gendanken experiments), and not terribly useful to think about.***Surface temperature of the sun**(K&K 4.2) The value of the total radiant energy flux density at the Earth from the Sun normal to the incident rays is called the**solar constant**of the Earth. The observed value integrated over all emission wavelengths and referred to the mean Earth-Sun distance is: \[\begin{equation} \text{solar constant} = 0.136 \text{J}\text{s}^{-1}\text{cm}^{-2} \end{equation}\]- Show that the total rate of energy generation of the Sun is \(4\times 10^{26} \text{Js}^{-1}\).
- From this result and the Sefan-Boltzmann constant \(\sigma_B=5.67\times10^{-12} \text{Js}^{-1}\text{cm}^{-2}\text{K}^{-4}\), show that the effective temperature of the surface of the Sun treated as a black body is \(T\approx 6000\text{K}\). Take the distance of the Earth from the Sun as \(1.5\times10^{13}\text{cm}\) and the radius of the Sun as \(7\times10^{10}\text{cm}\).

**Age of the sun**(K&K 4.4) Suppose \(4\times 10^{26}\text{Js}^{-1}\) is the total rate at which the Sun radiates energy at the present time.- Find the total energy of the Sun available for radiation, on the rough assumption that the energy source is the conversion of hydrogen (atomic weight 1.0078) to helium (atomic weight 4.0026) and that the reaction stops when 10 percent of the original hydrogen has been converted to helium. Use the Einstein relation \(E = (\Delta M)c^2\).
- Use (a) to estimate the expectancy of the Sun. It is believed that the age of the universe is about \(10\times 10^9\) years.

**Surface temperature of the earth**(K&K 4.5) Calculate the temperature of the surface of the Earth on the assumption that as a black body in thermal equilibrium it reradiates as much thermal radiation as it receives from the Sun. Assume also that the surface of the Earth is a constant temperature over the day-night cycle. Use \(T_{\odot}=5800\text{K}\); \(R_{\odot}=7\times 10^{10}\text{cm}\); and the Earth-Sun distance of \(1.5\times 10^{13}\text{cm}\).**\(\bigotimes\) Pressure of thermal radiation**(modified from K&K 4.6) We discussed in class that \[\begin{align} p &= -\left(\frac{\partial F}{\partial V}\right)_T \end{align}\] Use this relationship to show that- \[\begin{align} p &= -\sum_j \langle n_j\rangle\hbar \left(\frac{d\omega_j}{dV}\right), \end{align}\] where \(\langle n_j\rangle\) is the number of photons in the mode \(j\);
- Solve for the relationship between pressure and internal energy.

**Heat shields**(K&K 4.8) A black (nonreflective) plane at high temperature \(T_h\) is parallel to a cold black plane at temperature \(T_c\). The net energy flux density in vacuum between the two planes is \(J_U=\sigma_B\left(T_h^4-T_c^4\right)\), where \(\sigma_B\) is the Stefan-Boltzmann constant used in (26). A third black plane is inserted between the other two and is allowed to come to a steady state temperature \(T_m\). Find \(T_m\) in terms of \(T_h\) and \(T_c\), and show that the net energy flux density is cut in half because of the presence of this plane. This is the principle of the heat shield and is widely used to reduce radiant heat transfer.*Comment:*The result for \(N\) independent heat shields floating in temperature between the planes \(T_u\) and \(T_l\) is that the net energy flux density is \(J_U=\sigma_B\frac{T_h^4-T_c^4}{N+1}\).

# Week 5: Chemical potential and Gibbs distribution

This week be looking at scenarios where the number of particles in a system changes. We could technically always manage to solve problems without doing such a system, but allowing \(N\) to change is often a lot easier, just as letting the energy change made things easier. In both case, we enable ourselves to consider a smaller system, which tends to be both conceptually and mathematically simpler.

### The atmosphere

Let's talk about the atmosphere for a moment. Each atmosphere has a potential energy. We can solve this problem using the canonical ensemble as we have learned. We will consider just one atom, but now with gravitational potential energy as well as kinetic energy. This time around we'll do this classically rather than quantum mechanically. We can work out the probability of this atom having any particular momentum and position. \[\begin{align} P_1(\vec p, \vec r) &= \frac{e^{-\beta \left(\frac{p^2}{2m} + mgz\right)}}{ Z_1 } \\ &= \frac{e^{-\beta \frac{p^2}{2m} -\beta mgz}}{ Z_1 } \end{align}\]This tells us that the probability of this atom being at any height drops exponentially with height. If we extend this to many atoms, clearly the density must drop exponentially with height. Thiw week we'll be looking at easier approaches to explain this sort of phenomenon. You can see the obvious fact that that potential energy will affect density, and hence pressure. We will be generalizing the idea of potential energy into what is called chemical potential.

## Chemical potential

Imagine for a moment what happens if you allow just two systems to exchange particles as well as energy. Clearly they will exchange particles for a while, and then things will settle down. If we hold them at fixed temperature, their combined Helmholtz free energy will be maximized. This means that the derivative of the Helmholtz free energy with respect to \(N\) must be equal on both sides. This defines the chemical potential. \[\begin{align} \mu &= \left(\frac{\partial F}{\partial N}\right)_{T,V} \end{align}\] This expands our total differential of the free energy \[\begin{align} dF &= -SdT -pdV + \mu dN \end{align}\] which also expands our understanding of the thermodynamic identity \[\begin{align} dU &= TdS - pdV + \mu dN \end{align}\] which tells us that the chemical potential is also \[\begin{align} \mu &= \left(\frac{\partial U}{\partial N}\right)_{S,V} \end{align}\]The chemical potential expands our set of thermodynamic variables, and allows all sorts of nice excitement. Specifically, we now have *three* extensive variables that the internal energy depends on, as well as their derivatives, the temperature, pressure, and chemical potential.

- Note
- In general, there is one chemical potential for each kind of particle, thus the word "chemical" in chemical potential. Thus the "three" I discuss is actually a bit flexible.

### Internal and external

The chemical potential is in fact very much like potential energy. We can distinguish between **external chemical potential**, which is basically ordinary potential energy, and **internal chemical potential**, which is the chemical potential that we compute as a property of a material. We'll do a fair amount of computing of the internal chemical potential this week, but keep in mind that the *total* chemical potential is what becomes equal in systems that are in equilibrium. The total chemical potential at the top of the atmosphere, is equal to the chemical potential at the bottom. If it were not, then atoms would diffuse from one place to the other.

### Ideal gas chemical potential

Recall the Helmholtz free energy of an ideal gas is given by \[\begin{align} F &= NF_1 + k_BT \ln N! \\ &= -Nk_BT \ln\left(V\left(\frac{mk_BT}{2\pi\hbar^2}\right)^{\frac32}\right) + k_BT N(\ln N-1) \\ &= -Nk_BT \ln\left(Vn_Q\right) + k_BT N(\ln N-1) \\ &= NkT \ln\left(\frac{N}{V}\frac1{n_Q}\right) - NkT \end{align}\]To find the chemical potential, we just need to take a derivative.

- Small groups
- Find the chemical potential of the ideal gas.
- Answer
- \[\begin{align} \mu &= \left(\frac{\partial F}{\partial N}\right)_{V,T} \\ &= k_BT\ln\left(\frac{N}{V}\frac1{n_Q}\right) \\ &= k_BT\ln\left(\frac{n}{n_Q}\right) \end{align}\] where the number density \(n\) is given by \(n\equiv N/V\).

This might remind you of the Boltzmann relation. In fact, it's very closely related to the Boltzmann relation. We do want to keep in mind that the \(\mu\) above is the internal chemical potential.

The total chemical potential is given by the sum of the internal chemical potential and the external chemical potential, and that total is what is equalized between systems that are in diffusive contact. \[\begin{align} \mu_{tot} &= \mu_{int} + mgz \\ &= k_BT\ln\left(\frac{n}{n_Q}\right) + mgz \end{align}\] We can solve for the density now, as a function of position. \[\begin{align} k_BT\ln\left(\frac{n}{n_Q}\right) &= \mu_{tot}-mgz \\ n &= n_Q e^{-\beta (\mu_{tot}-mgz)} \end{align}\]This is just telling us the same result we already knew, which is that the density must drop exponentially with height.

### Interpreting the chemical potential

The chemical potential can be challenging to understand intuitively, for myself as well as for you. The ideal gas expression \[\begin{align} n &= n_Q e^{\beta\mu} \end{align}\]can help with this. This tells us that the density increases as we increase the chemical potential. Particles spontaneously flow from high chemical potential to low chemical potential, just like heat flows from high temperature to low. This fits with the idea that at high \(\mu\) the density is high, since I expect particles to naturally flow from a high density region to a low density region.

The distinction between internal and external chemical potential allows us to reason about systems like the atmosphere. Where the external chemical potential is high (at high altitude), the internal chemical potential must be lower, and there is lower density. This is because particles have *already* fled the high-\(\mu\) region to happier locations closer to the Earth.

## Gibbs factor and sum

Let's consider how we maximize entropy when we allow not just microstates with different energy, but also microstates with different*number of particles*. The problem is the same was we dealt with the first week. We want to maximize the entropy, but need to fix the total probability, the average energy

*and now*the average number. \[\begin{align} \langle N\rangle &= N =\sum_i P_i N_i \\ \langle E\rangle &= U = \sum_i P_i E_i \\ 1 &= \sum_i P_i \end{align}\] Now let's construct a lagrangian with three lagrange multipliers to maximize the entropy. \[\begin{multline} \mathcal{L} = -k\sum_i P_i \ln P_i + k\alpha\left(1 - \sum_i P_i\right)\\ + k\beta\left(U - \sum_i P_i E_i\right)\\ + k\gamma\left(N - \sum_i P_i N_i\right) \end{multline}\] Now we maximize this. \[\begin{align} 0 &= -\frac1{k}\frac{\partial \mathcal{L}}{\partial P_i} \\ &= \ln P_i + 1 + \alpha + \beta E_i + \gamma N_i \\ P_i &= e^{-1-\alpha - \beta E_i - \gamma N_i} \end{align}\] Great, now as before we'll want to apply the normalization constraint first. \[\begin{align} 1 &= \sum_i P_i \\ &= \sum_i e^{-1-\alpha - \beta E_i - \gamma N_i} \\ &= e^{-1-\alpha} \sum_i e^{-\beta E_i - \gamma N_i} \\ e^{-1-\alpha} &= \frac1{\sum_i e^{-\beta E_i - \gamma N_i}} \end{align}\] Thus we find that the probability of a given microstate is \[\begin{align} P_i &= \frac{-\beta E_i - \gamma N_i}{\mathcal{Z}} \\ \mathcal{Z} &\equiv \sum_i e^{-\beta E_i - \gamma N_i} \end{align}\] where we can identify the new quantity \(\mathcal{Z}\) as the grand partition function. We have already identified \(\beta\) as \(\frac1{kT}\), but what is this \(\gamma\)? It is a dimensionless quantity. Moreover, as we saw previously with \(\beta\), \(\gamma\) must be the derivative \(\frac1{k_B}\left(\frac{\partial S}{\partial N}\right)_{U,V}\), where the \(\frac1k\) appears because we used \(k\gamma\) as our Lagrange multiplier. Now this is a slightly eccentric partial derivative, but not too insane. We can relate this derivative to thermodynamic quantities using the expanded thermodynamic identity with chemical potential, which we will algebraically manipulate: \[\begin{align} dU &= TdS - pdV + \mu dN \\ dS &= \frac1T dU + \frac{p}T dV - \frac\mu{T} dN \end{align}\] Examining this total differential, we can see that \[\begin{align} \frac\mu{T} &= \left(\frac{\partial S}{\partial N}\right)_{U,V} \end{align}\] Very quickly, I'm going to repeat your first ever homework problem in this class. \[\begin{align} S &= -k\sum_i P_i\ln P_i \\ &= -k \sum_i P_i \ln\left(\frac{e^{-\beta E_i-\gamma N_i}}{\mathcal{Z}}\right) \\ &= -k\sum_i P_i(-\beta E_i - \gamma N_i - \ln\mathcal{Z}) \\ &= k\beta U + k\gamma N + k\ln\mathcal{Z} \end{align}\] Now we can zap this with \(d\) to find its derivatives: \[\begin{align} dS &= k\beta dU + kUd\beta + k\gamma dN + kNd\gamma + k\frac{d\mathcal{Z}}{\mathcal{Z}} \end{align}\] Now we just need to find \(d\mathcal{Z}\)... \[\begin{align} d\mathcal{Z} &= \frac{\partial\mathcal{Z}}{\partial\beta}d\beta + \frac{\partial\mathcal{Z}}{\partial\gamma}d\gamma \\ &= -U\mathcal{Z}d\beta -N\mathcal{Z}d\gamma \end{align}\] Putting \(dS\) together gives \[\begin{align} dS &= k\beta dU + k\gamma dN \end{align}\] Thus, we conclude that \[\begin{align} k\gamma &= -\frac{\mu}{T} \\ \gamma &= -\beta\mu \end{align}\]

### Actual Gibbs sum (or grand sum)

Putting this interpretation for \(\gamma\) into our probabilities we find the Gibbs factor and**Gibbs sum**(or

**grand sum**or

**grand partition function**) to be: \[\begin{align} P_j &= \frac{-\beta \left(E_j - \mu N_j\right)}{\mathcal{Z}} \\ \mathcal{Z} &\equiv \sum_i e^{-\beta(E_i - \mu N_i)} \end{align}\] where you must keep in mind that the sums are over all microstates (including states with different \(N\)). We can go back to our expressions for internal energy and number \[\begin{align} U &= \sum_i P_i E_i \\ &= \frac1{\mathcal{Z}}\sum_i E_i e^{-\beta (E_i -\mu N_i)} \\ N &= \sum_i P_i N_i \\ &= \frac1{\mathcal{Z}}\sum_i N_i e^{-\beta (E_i - \mu N_i)} \end{align}\]

We can now use the derivative trick to relate \(U\) and \(N\) to the Gibbs sum \(\mathcal{Z}\), should we so desire.

- Small groups
- Work out the partial derivative tricks to compute \(U\) and \(N\) from the grand sum.
- Answer
- Let's start by exploring the derivative with respect to \(\beta\), which worked so nicely with the partition function. \[\begin{align} \frac1{\mathcal{Z}} \frac{\partial \mathcal{Z}}{\partial \beta} &= -\frac1{\mathcal{Z}}\sum_i (E_i-\mu N_i) e^{-\beta(E_i - \mu N_i)} \\ &= -U + \mu N \end{align}\] Now let's examine a derivative with respect to \(\mu\). \[\begin{align} \frac1{\mathcal{Z}} \frac{\partial \mathcal{Z}}{\partial \mu} &= \frac1{\mathcal{Z}}\sum_i (\beta N_i) e^{-\beta(E_i - \mu N_i)} \\ &= \beta N \end{align}\] Arranging these to find \(N\) and \(U\) is not hard.
- Small groups
- Show that \[\begin{align} \left(\frac{\partial N}{\partial\mu}\right)_{T,V} > 0 \end{align}\]
- Answer
- \[\begin{align} N &= \sum_i N_i P_i \\ &= kT \frac1{\mathcal{Z}} \left(\frac{\partial\mathcal{Z}}{\partial \mu}\right)_{\beta} \end{align}\] So the derivative we seek will be \[\begin{align} \left(\frac{\partial N}{\partial\mu}\right)_{T,V} &= kT \left(\frac{\partial^2\mathcal{Z}}{\partial \mu^2}\right)_{\beta} \\ &= \sum_i N_i \left(\frac{\partial P_i}{\partial \mu}\right)_{\beta} \\ &= \sum_i N_i \left(\beta N_i P_i - \frac{P_i}{\mathcal{Z}}\left(\frac{\partial\mathcal{Z}}{\partial \mu}\right)_{\beta}\right) \\ &=\sum_i N_i \left(\beta N_i P_i - \beta \langle N\rangle P_i \right) \end{align}\] We can simplify this the notation by expressing things in terms of averages, since we've got sums of \(P_i\) times something. \[\begin{align} &= \beta\left<N_i(N_i - \langle N\rangle)\right> \\ &= \beta\left(\left<N^2\right> - \langle N\rangle^2\right) \\ &= \beta\left<\left( N - \langle N\rangle\right)^2\right> \end{align}\] This is positive, because it is an average of something squared. The last step is a common step when examining variances of distributions, and relies on the fact that \(\left<N - \langle N\rangle\right>=0\).

### Euler integrals

There is a nice trick we can use to better understand the chemical potential, and how it relates to the Gibbs free energy. This involves reasoning about how internal energy changes when all the extensive variables are changed simultaneously, and connects with Euler's homogeneous function theorem. You can prove this mathematically (it's not excessively hard), but I'll hand-wave my way through it, which I think leads to better understanding anyhow.

Suppose we have a glass of water. We will define our "system" to be all the water within a particular cubic centimeter of water within the glass. If I change my system to consist of two cubic centimeters of water within the same glass, clearly \(T\), \(p\), and \(\mu\) will not change. In fact, I can scale the volume however I like in this way (up to the volume of the whole glass) without ever changing these intensive variables. What happens to \(U\) when we do this? Since it is extensive, clearly it must also scale with the volume. Since \[\begin{align} dU &= TdS - pdV + \mu dN \end{align}\] we could show that there is in fact only one function that scales in precisely this way. We could imagine integrating this differential starting with a very small volume up to a large one, scaling all extensive quantities in the same way. The result of that integral would be \[\begin{align} U &= TS -pV+\mu N \end{align}\] which is in fact true. It often is unhelpful, since we can't use this expression to find any useful partial derivatives, for instance, and once we have analytic expressions for all six of these properties, we're probably already done. But there is one cool trick we could do, which is to examine the Gibbs free energy: \[\begin{align} G &\equiv U -TS +pV \\ &= \mu N \end{align}\] which tells us that the chemical potential is just the Gibbs free energy per particle. If we have several chemical species, this expression just becomes \[\begin{align} G &= \sum_i \mu_i N_i \end{align}\]so each chemical potential is a *partial* Gibbs free energy per molecule.

- Side note
- There is another interesting thing we can do with the relationship that \[\begin{align} U &= TS-pV+\mu N \end{align}\] and that involves zapping it with \(d\). This tells us that \[\begin{align} dU & TdS + SdT - pdV - Vdp + \mu dN + Nd\mu \end{align}\] which looks downright weird, since it's got twice as many terms as we normally see. This tells us that the extra terms must add to zero: \[\begin{align} 0 &= SdT - Vdp + Nd\mu \end{align}\] This relationship tells us just how \(T\), \(p\) and \(\mu\) must change in order to keep our extensive quantities extensive and our intensive quantities intensive.

### Absolute activity

The total activity is defined as \[\begin{align} \lambda &= e^{\beta \mu} \end{align}\] The text discusses this a little, pointing out that you could write the Gibbs sum with a \(\lambda^N\) instead of an \(e^{\beta\mu N}\). This doesn't particularly excite me. But activity is somewhat interesting because it is very much like the concentration. Remember for an ideal gas \[\begin{align} n &= n_Qe^{\beta \mu} \\ &= n_Q \lambda \end{align}\]so you can think of activity as a kind of concentration (or number density) in weird units (keeping in mind that the weird units are temperature dependent). In fact, in chemistry classes, activity is often written in square brackets, e.g. as \([\text{H}_2\text{O}]\). In introductory classes this is often used as concentration, but technically it is activity.

The equation for chemical equilibrium is related to the change in Gibbs free energy for a reaction. Consider, for instance the chemical reaction \[\begin{align} 2\text{H}_2 + \text{O}_2 \rightarrow 2\text{H}_2\text{O} \end{align}\] The equilibrium constant for this reaction is given by \[\begin{align} K &= \frac{[\text{H}_2\text{O}]^2}{[\text{O}_2][\text{H}_2]^2} \\ &= \frac{\lambda_{\text{H}_2\text{O}}^2}{ \lambda_{\text{H}_2}^2\lambda_{\text{O}_2}^2} \\ &= \frac{ e^{\beta 2\mu_{\text{H}_2\text{O}}} }{ e^{\beta 2 \mu_{\text{H}_2}}e^{\beta \mu_{\text{O}_2}} } \\ &= e^{\beta \left(2\mu_{\text{H}_2\text{O}} - 2 \mu_{\text{H}_2} - \mu_{\text{O}_2}\right)} \\ &= e^{\beta \left(G_{\text{products}} - G_{\text{reactants}}\right)} \end{align}\]which tells us that the equilibrium constant is just determined by \(\Delta G\) for the reaction.

However, as is often the case, this relationship is backwards from what we expect. We expect a reaction to proceeed forward if the products have a lower Gibbs free energy than the reactants, and this is telling us the opposite. As usual, when we get a minus sign error like this, it is because I have failed to distinguish between "internal" and "external" chemical potential (and thus Gibbs free energy, and also activity).

In this case, looking at chemistry, the distinction we need is between the "chemical" Gibbs free energy, which we can think of as "external", and the "physical" Gibbs free energy (and chemical potential, and activity), which we can think of as "internal". The activity used in chemistry is the "internal" activity (in contrast to the "total" activity), which does not include in effect the Gibbs free energy of a single isolated molecule. The internal chemical potential thus only contains effects of concentration, etc.

- Why include this mistake?
- You might be wondering: why include in the notes this mistake? I failed to distinguish between internal and external chemical potential, but why not fix that before starting the problem? I thought about doing that, but decided that it would be more helpful for you to see how that thinking comes about. This was indeed a genuine error I made, and it took me some time to find the solution, and significant puzzlement and frustration. Seeing how a mistake is made and how it is resolved, I think can be effective in learning how to resolve your own mistakes.

*equilibrium*in equilibrium constant. This constant defines what is going on when the system is in chemical equilibrium. That means that no molecules are spontaneously doing the reaction in either direction. What defines a spontaneous change of molecule number? A difference in

*total*chemical potential! So this difference must be zero. Yay for vanishing terms we dislike! \[\begin{align} K &= e^{\beta(2 G_{\text{H}_2}^\circ + G_{\text{O}_2}^\circ -2G_{\text{H}_2\text{O}}^\circ)} \\ &= e^{-\beta(2G_{\text{H}_2\text{O}}^\circ-2 G_{\text{H}_2}^\circ - G_{\text{O}_2}^\circ)} \\ &= e^{-\beta(G_{\text{products}}^\circ- G_{\text{reactants}}^\circ)} \end{align}\]

So now we've got our sign right, so if the products have lower free energy than the reactants, we have a high rate constant (and lots of products).

- Take-home points
- I hope you found interesting this little side expedition into chemistry. All you need for this class is the definition of activity, and even that isn't terribly important---it's just a definition. I find fascinating where these fundamental chemistry relations come from, and also that the relationship between concentrations arises from an ideal gas approximation! Which is why it is only valid in the limit of low concentration, and why the solvent is typically omitted from the equilibrium constant, since its activity is essentially fixed.

## Homework for week 5 (PDF)

**Centrifuge**(K&K 5.1) A circular cylinder of radius \(R\) rotates about the long axis with angular velocity \(\omega\). The cylinder contains an ideal gas of atoms of mass \(M\) at temperature \(T\). Find an expression for the dependence of the concentration \(n(r)\) on the radial distance \(r\) from the axis, in terms of \(n(0)\)*on*the axis. Take \(\mu\) as for an ideal gas.**Potential energy of gas in gravitational field**(K&K 5.3) Consider a column of atoms each of mass \(M\) at temperature \(T\) in a uniform gravitational field \(g\). Find the thermal average potential energy per atom. The thermal average kinetic energy is independent of height. Find the total heat capacity per atom. The total heat capacity is the sum of contributions from the kinetic energy and from the potential energy. Take the zero of the gravitational energy at the bottom \(h=0\) of the column. Integrate from \(h=0\) to \(h=\infty\).*You may assume the gas is ideal.***Active transport**(K&K 5.4) The concentration of potassium \(\text{K}^+\) ions in the internal sap of a plant cell (for example, a fresh water alga) may exceed by a factor of \(10^4\) the concentration of \(\text{K}^+\) ions in the pond water in which the cell is growing. The chemical potential of the \(\text{K}^+\) ions is higher in the sap because their concentration \(n\) is higher there. Estimate the difference in chemical potential at \(300\text{K}\) and show that it is equivalent to a voltage of \(0.24\text{V}\) across the cell wall. Take \(\mu\) as for an ideal gas. Because the values of the chemical potential are different, the ions in the cell and in the pond are not in diffusive equilibrium. The plant cell membrane is highly impermeable to the passive leakage of ions through it. Important questions in cell physics include these: How is the high concentration of ions built up within the cell? How is metabolic energy applied to energize the active ion transport?- David adds
- You might wonder why it is even remotely plausible to consider the ions in solution as an ideal gas. The key idea here is that the ideal gas entropy incorporates the entropy due to position dependence, and thus due to concentration. Since concentration is what differs between the cell and the pond, the ideal gas entropy describes this pretty effectively. In contrast to the concentration dependence, the temperature-dependence of the ideal gas chemical potential will be almost entirely incorrect.

**Gibbs sum for a two level system**(Modified from K&K 5.6)- Consider a system that may be unoccupied with energy zero, or occupied by one particle in either of two states, one of energy zero and one of energy \(\varepsilon\). Find the Gibbs sum for this system is in terms of the activity \(\lambda\equiv e^{\beta\mu}\). Note that the system can hold a maximum of one particle.
- Solve for the thermal average occupancy of the system in terms of \(\lambda\).
- Show that the thermal average occupancy of the state at energy \(\varepsilon\) is \[\begin{align} \langle N(\varepsilon)\rangle = \frac{\lambda e^{-\frac{\varepsilon}{kT}}}{\mathcal{Z}} \end{align}\]
- Find an expression for the thermal average energy of the system.
- Allow the possibility that the orbitals at \(0\) and at \(\varepsilon\) may each be occupied each by one particle at the same time; Show that \[\begin{align} \mathcal{Z} &= 1 + \lambda + \lambda e^{-\frac{\varepsilon}{kT}} + \lambda^2 e^{-\frac{\varepsilon}{kT}} \\ &= (1+\lambda)\left(1+e^{-\frac{\varepsilon}{kT}}\right) \end{align}\] Because \(\mathcal{Z}\) can be factored as shown, we have in effect two independent systems.

**Carbon monoxide poisoning**(K&K 5.8) In carbon monoxide poisoning the CO replaces the O_{2}adsorbed on hemoglobin (\(\text{Hb}\)) molecules in the blood. To show the effect, consider a model for which each adsorption site on a heme may be vacant or may be occupied either with energy \(\varepsilon_A\) by one molecule O_{2}or with energy \(\varepsilon_B\) by one molecule CO. Let \(N\) fixed heme sites be in equilibrium with O_{2}and CO in the gas phases at concentrations such that the activities are \(\lambda(\text{O}_2) = 1\times 10^{-5}\) and \(\lambda(\text{CO}) = 1\times 10^{-7}\), all at body temperature \(37^\circ\text{C}\). Neglect any spin multiplicity factors.- First consider the system in the absence of CO. Evaluate \(\varepsilon_A\) such that 90 percent of the \(\text{Hb}\) sites are occupied by O
_{2}. Express the answer in eV per O_{2}. - Now admit the CO under the specified conditions. Fine \(\varepsilon_B\) such that only 10% of the Hb sites are occupied by O
_{2}.

- First consider the system in the absence of CO. Evaluate \(\varepsilon_A\) such that 90 percent of the \(\text{Hb}\) sites are occupied by O

# Week 6: Ideal gas

## Midterm on Monday

Topics are everything through week 4, including week 3 homework, which was due in week 4. Problems should be similar to homework problems, but designed to be completed in class. The exam will be closed notes. You should be able to remember the fundamental equations: \[\begin{align} dU &= TdS - pdV \\ F &= U - TS \\ dF &= -SdT - pdV \\ P_i &= \frac{e^{-\beta E_i}}{Z} \\ Z &= \sum_i e^{-\beta E_i} \\ U &= \sum_i E_i P_i \\ F &= -kT\ln Z \\ S &= -k\sum_i P_i\ln P_i \\ \end{align}\]If you need a property of a particular system (the ideal gas, the simple harmonic oscillator), it will be given to you. There is no need, for instance, to remember the Stefan-Boltzmann law or the Planck distribution.

## Quantum mechanics and orbitals

Kittel uses the term **orbital** to refer to an energy eigenstate (or wave function) of a one-particle system. How do things differ when we have more than one particle?

The simple product we wrote above doesn't have this symmetery, and thus while it is an eigenfunction of our eigenvalue equation, it cannot represent the state of a real system of identical particles. Fortunately, this is pretty easy to resolve: permuting the labels doesn't change the energy, so we have a largish degenerate subspace in which to work. We are simply required to take a linear combination of these product states which *does* have the necessary symmetry.

The above equation, while true, does not tell us what happens to the wave function when we do a permutation, only to its magnitude. As it turns out, there are two types of symmetry possible: bosons and fermions.

### Fermions

Fermions are particles with half-integer spin, such as electrons and protons. Fermions are antisymmetric when we exchange the labels of any two particles. \[\begin{align} \Psi(\vec r_1, \vec r_2, \vec r_3,\cdots) &= -\Psi(\vec r_2, \vec r_1, \vec r_3,\cdots) \end{align}\]This formula is Pauli's exclusion principle.

This isn't a quantum class, so I won't say much more, but we do need to connect with the orbitals picture. When we have non-interacting fermions, their energy eigenstates can be written using a Slater determinant, which is just a convenient way to write the proper antisymmetric linear combination of all possible product states with the same set of orbitals: \[\begin{multline} \Psi_{i_1i_2i_3\cdots}(\vec r_1, \vec r_2, \vec r_3,\cdots) =\\ \frac1{\sqrt{N!}} \left|\begin{array}{ccccc} \phi_{i_1}(\vec r_1) & \phi_{i_1}(\vec r_1) & \phi_{i_1}(\vec r_1) & \cdots\\ \phi_{i_2}(\vec r_1) & \phi_{i_2}(\vec r_1) & \phi_{i_2}(\vec r_1) & \cdots\\ \phi_{i_3}(\vec r_1) & \phi_{i_3}(\vec r_1) & \phi_{i_3}(\vec r_1) & \cdots\\ \vdots &\vdots &\vdots &\ddots & \end{array}\right| \end{multline}\]This relies on the properties of a determinant, which changes sign if you swap two rows or two columns. This means that if two of your orbitals are the same, the result will be zero, so the "occupancy" of any orbital is either 0 or 1. Note that the \(N!\) is required in order to ensure that the wave function is normalized provided the orbitals are orthonormal.

### Bosons

Bosons have integer spin, and differ from fermions in that their sign does not change when you interchange particles. \[\begin{align} \Psi(\vec r_1, \vec r_2, \vec r_3,\cdots) &= \Psi(\vec r_2, \vec r_1, \vec r_3,\cdots) \end{align}\]The wavefunction for noninteracting bosons looks very much like the Slater determinant above, only with a special version of the determinant that has all \(+\) signs. The bosons can have as many particles as they want in a given orbital. In the limiting case where all particles are in the same orbital, a single product of orbitals satisfies the required symmetry.

## Fermi-Dirac distribution

Let us now consider a set of non-interacting fermions. These fermions have a Hamiltonian with a set of single-particle energy eigenvalues given by \(\varepsilon_i\). How do we find the probability of any given many-body microstate? As always, the probability of any given microstate is given by the Boltzmann distribution, but given that are particles are non-interacting, we'd prefer to deal with just one at a time. As it turns out, dealing with one *particle* at a time is not really possible, but in a grand canonical ensemble we can deal with a single *orbital* at a time with much greater ease. We can think of each *orbital* as a separate system, and ask how many particles it has! Particles can now be exchanged between *orbitals* just like they were between systems last week.

- Small groups
- Find the energy and the average occupancy (\(\langle N\rangle\)) of the orbital
- Answer
- If we want to find \(\langle N\rangle\) of the system, we can do that in the usual way Finding is basically the same \[\begin{align} \langle N\rangle &= \sum_i N_iP_i \\ &= \frac{0 + e^{-\beta(\varepsilon_i-\mu)}}{\mathcal{Z}} \\ &= \frac{e^{-\beta(\varepsilon_i-\mu)}}{ 1 + e^{-\beta(\varepsilon_i - \mu)}} \\ &= \frac{1}{ 1 + e^{\beta(\varepsilon_i - \mu)}} \end{align}\] Finding the energy is basically the same, since the energy is proportional to the occupancy: \[\begin{align} \langle E\rangle &= \sum_i E_iP_i \\ &= \frac{0 + \varepsilon_i e^{-\beta(\varepsilon_i-\mu)}}{\mathcal{Z}} \\ &= \varepsilon_i \langle N\rangle \end{align}\]

Whenever you are looking at non-interacting fermions, \(f(\varepsilon)\) will be very helpful.

- Small groups
- Sketch the Fermi-Dirac function.

**Fermi level**. Kittel also defines the

**Fermi energy**\(\varepsilon_F\) as the Fermi

*level*when the temperature is zero, i.e. \[\begin{align} \varepsilon_F \equiv \mu(T=0) \end{align}\]

At zero temperature, all the orbitals with energy less than \(\varepsilon_F\) are occupied, while all the orbitals with higher energy are unoccupied.

- Actual electrons
You might (or might not) be wondering how we can talk about electrons as non-interacting particles. After all, they are charged particles, which naturally repel each other rather strongly. Indeed, a Slater determinant is a terrible approximation for an energy eigenstate for

*any*many-electron system. So why are we bothering talking about orbitals and the Fermi-Dirac distribution that relies on orbitals being an actual thing?I'm not going to thoroughly explain this, but rather just give a few hints about why what we're doing might be reasonable. The key idea is that what we are really interested in is the behavior of excited states of our many-body system. (The ground state is also very interesting, e.g. if you want to study vibrations or phonons, but not in terms of the thermal behavior of the electrons themselves.) Fortunately, even though the electrons really do interact with one another very strongly, it is possible to construct a picture of

**elementary excitations**that treats these excitations as not interacting with one another. In this kind of a picture, what we are talking about are called**quasiparticles**. These represent an excitation of the many-body state. And it turns out that in many cases (particularly for solids) we can represent a given excited state of the many-body system as a sum of the energy of a bunch of non-interacting**quasiparticles**. When this breaks down, we invent new names like**exciton**to represent an excitation in which more than one quasiparticle are interacting.

## Bose-Einstien distribution

The same ideas apply to bosons as to fermions: we can treat each orbital as a separate system in the grand canonical ensemble. In this case, however, the occupancy \(N\) can have any (non-negative) value.

- Small groups
- Solve for the Gibbs sum for an orbital with energy \(\varepsilon\), and solve for the \(\langle N\rangle\) for a single orbital occupied by bosons.
- Answer
- The Gibbs sum will be \[\begin{align} \mathcal{Z} &= \sum_{N=0}^{\infty} e^{-\beta(N\varepsilon-\mu N)} \\ &= \sum_{n=0}^{\infty} \left(e^{-\beta(\varepsilon-\mu)}\right)^N \\ &= \sum_{n=0}^{\infty} \left(e^{-\beta(\varepsilon-\mu)}\right)^N \end{align}\] This looks suspiciously like a simple harmonic oscillator. The same harmonic summation trick applies, and we see that \[\begin{align} \mathcal{Z} &= 1 + e^{-\beta(\varepsilon-\mu)} + \left(e^{-\beta(\varepsilon-\mu)}\right)^2 +\cdots \\ e^{-\beta(\varepsilon-\mu)}\mathcal{Z} &= e^{-\beta(\varepsilon-\mu)} + \left(e^{-\beta(\varepsilon-\mu)}\right)^2 +\cdots \end{align}\] Subtracting the two gives \[\begin{align} \left(1 - e^{-\beta(\varepsilon-\mu)}\right)\mathcal{Z} &= 1 \\ \mathcal{Z} &= \frac1{1 - e^{-\beta(\varepsilon-\mu)}} \end{align}\] Solving for the average occupancy \(\langle N\rangle\) is again more tedious than for a fermion: \[\begin{align} \langle N\rangle &= \sum_i N_i P_i \\ &= \frac1{\mathcal{Z}}\sum_{N=0}^\infty N e^{-\beta(\varepsilon-\mu)N} \\ &= \frac1{\mathcal{Z}}\frac{\partial \mathcal{Z}}{\partial \mu}\left(\frac{1}{\beta}\right) \\ &= -\frac{\bcancel{1 - e^{-\beta(\varepsilon-\mu)}}}{ \left(1 - e^{-\beta(\varepsilon-\mu)}\right)^{\bcancel{2}} } \left(-e^{-\beta(\varepsilon-\mu)}\right) \cancel{\beta}\left(\frac{1}{\cancel{\beta}}\right) \\ &= \frac{ e^{-\beta(\varepsilon-\mu)} }{ 1-e^{-\beta(\varepsilon-\mu)} } \\ f(\varepsilon) &= \frac{ 1 }{ e^{\beta(\varepsilon-\mu)}-1 } \end{align}\]

This turns out to be just the Planck distribution we aleady saw, only with a chemical potential as reference. Why does this bosonic system look like a simple harmonic oscillator? Since the particles are non-interacting, we have the same set of energy eigenvalues, which is to say an equally spaced series of states. This is conversely related to why we can describe solutions to the simple harmonic oscillator as bosonic phonons.

This expression, the Bose-Einstein distribution, tells us that at low temperatures, we could end up seeing a *lot* of particles in low energy states (if there are any eigenvalues below \(\mu\)), in contrast to the Fermi-Dirac distribution, which never sees more than one particle per state.

## Classical ideal gas

We are now prepared to talk about a gas in the**classical limit**. In the classical limit, there is no difference in behavior between fermions and bosons. This happens when the probability of finding a particle in a particular orbital is \(\ll 1\). And

*this*happens when \(\beta(\varepsilon-\mu)\gg 1\) for all orbitals, i.e. when \(\mu\) is very negative. When this is the case, both the Fermi-Dirac distribution and the Bose-Einstein distribution become identical. \[\begin{align} f_{FD}(\varepsilon) = \frac1{e^{\beta(\varepsilon-\mu)}+1} &\approx e^{-\beta(\varepsilon-\mu)} \\ f_{BE}(\varepsilon) = \frac1{e^{\beta(\varepsilon-\mu)}-1} &\approx e^{-\beta(\varepsilon-\mu)} \end{align}\]

In this limit (which is the low-density limit), the system will behave as a classical ideal gas.

A reasonable question is, "what is the chemical potential." We already handled this, but can now look at this answer in terms of orbitals and the classical distribution function. (Note: *classical distribution function* is a bit of a misnomer in this context, as it defines how many particles are in a given quantum mechanical orbital.)

- Small groups
- Solve for the entropy of the ideal gas (from this free energy).
- Answer
- \[\begin{align} -S &= \left(\frac{\partial F}{\partial T}\right)_{V,N} \\ &= Nk\left(\ln\left(\frac{n}{n_Q}\right) -1\right) - \frac{NkT}{n_Q}\frac{dn_Q}{dT} \\ &= Nk\left(\ln\left(\frac{n}{n_Q}\right) -1\right) - \frac{Nk\bcancel{T}}{\cancel{n_Q}}\frac32 \frac{\cancel{n_Q}}{\bcancel{T}} \\ -S &= Nk\left(\ln\left(\frac{n}{n_Q}\right) - \frac52\right) \\ S&= Nk\left(\ln\left(\frac{n_Q}{n}\right) + \frac52\right) \end{align}\]

This expression for the entropy is known as the **Sackur-Tetrode** equation.

- Small groups
- Solve for the pressure of the ideal gas (from the free energy)
- Answer
- \[\begin{align}
p &= -\left(\frac{\partial F}{\partial V}\right)_{T,N} \\
&= \frac{NkT}{V}
\end{align}\]
That was pretty easy, once we saw that \(n_Q\) was independent of volume. This expression is known as the
**ideal gas law**. - Small groups
- Solve for the internal energy of the ideal gas
- Answer
- \[\begin{align} U &= F+TS \\ &= \frac32 NkT \end{align}\] Also pretty familiar.
- Small groups
- Solve for the heat capacity at constant volume of the ideal gas
- Answer
- \[\begin{align} C_V &= \left(\frac{\partial U}{\partial T}\right)_{V,N} \\ &= T\left(\frac{\partial S}{\partial T}\right)_{V,N} \\ &= \frac32 Nk \end{align}\] This one is relatively easy.
- Small groups
- Solve for the heat capacity at constant pressure of the ideal gas
- Answer
- \[\begin{align} C_p &= T\left(\frac{\partial S}{\partial T}\right)_{p,N} \\ \end{align}\] This one requires one (small) step more. We have to convert the volume into a pressure in the free energy expression. \[\begin{align} C_p &= T\left(\frac{\partial Nk\left(\ln\left(\frac{n_Q}{n}\right) + \frac52\right)}{\partial T}\right)_{p,N} \\ &= NkT\left(\frac{\partial \left(\ln\left(\frac{n_Q}{n}\right) + \frac52\right)}{\partial T}\right)_{p,N} \\ &= NkT\left(\frac{\partial \ln\left(\frac{Vn_Q}{N}\right)}{\partial T}\right)_{p,N} \\ &= NkT\left(\frac{\partial \ln\left(\frac{NkT}{p}\frac{n_Q}{N}\right)}{\partial T}\right)_{p,N} \end{align}\] At this point we peek inside and see that \(n_Q \propto T^{\frac32}\) and can complete the derivative \[\begin{align} C_p &= \frac52 Nk \end{align}\]

This has been a series of practice computations involving the ideal gas. The results are useful for some of your homework, and the process of finding these properties is something you will need to know for the final exam. Ultimately, pretty much everything comes down to summing and integrating to find partition functions, and then taking derivatives (and occasional integrals) to find everything else.

## Homework for week 6 (PDF)

**Derivative of Fermi-Dirac function**(K&K 6.1) Show that \(-\frac{\partial f}{\partial \varepsilon}\) evaluated at the Fermi level \(\varepsilon =\mu\) has the value \(\frac{1}{4kT}\). Thus the lower the temperature, the steeper the slope of the Fermi-Dirac function.**Symmetry of filled and vacant orbitals**(K&K 6.2) Show that \[\begin{align} f(\mu+\delta) &= 1 - f(\mu-\delta) \end{align}\]Thus the probability that an orbital \(\delta\) above the Fermi level is occupied is equal to the probability an orbital \(\delta\) below the Fermi level is vacant. A vacant orbital is sometimes known as a

**hole**.**Distribution function for double occupancy statistics**(K&K 6.3) Let us imagine a new mechanics in which the allowed occupancies of an orbital are 0, 1, and 2. The values of the energy associated with these occupancies are assumed to be \(0\), \(\varepsilon\), and \(2\varepsilon\)$, respectively.- Derive an expression for the ensemble average occupancy \(\langle N\rangle\), when the system composed of this orbital is in thermal and diffusive contact with a resevoir at temperature \(T\) and chemical potential \(\mu\).
- Return now to the usual quantum mechanics, and derive an expression for the ensemble average occupancy of an energy level which is doubly degenerate; that is, two orbitals have the identical energy \(\varepsilon\). If both orbitals are occupied the toal energy is \(2\varepsilon\). How does this differ from part (a)?

**Entropy of mixing**(Modified from K&K 6.6) Suppose that a system of \(N\) atoms of type \(A\) is placed in diffusive contact with a system of \(N\) atoms of type \(B\) at the same temperature and volume.Show that after diffusive equilibrium is reached the total entropy is increased by \(2Nk\ln 2\). The entropy increase \(2Nk\ln 2\) is known as the entropy of mixing.

If the atoms are identical (\(A=B\)), show that there is no increase in entropy when diffusive contact is established. The difference has been called the Gibbs paradox.

Since the Helmholtz free energy is lower for the mixed \(AB\) than for the separated \(A\) and \(B\), it should be possible to extract work from the mixing process. Construct a process that could extract work as the two gasses are mixed at fixed temperature. You will probably need to use walls that are permeable to one gas but not the other.

- Note
- This course has not yet covered
*work*, but it was covered in Energy and Entropy, so you may need to stretch your memory to finish part (c).

**Ideal gas in two dimensions**(K&K 6.12)- Find the chemical potential of an ideal monatomic gas in two dimensions, with \(N\) atoms confined to a square of area \(A=L^2\). The spin is zero.
- Find an expression for the energy \(U\) of the gas.
- Find an expression for the entropy \(\sigma\). The temperature is \(kT\).

**Ideal gas calculations**(K&K 6.14) Consider one mole of an ideal monatomic gas at 300K and 1 atm. First, let the gas expand isothermally and reversibly to twice the initial volume; second, let this be followed by an isentropic expansion from twice to four times the original volume.- How much heat (in joules) is added to the gas in each of these two processes?
- What is the temperature at the end of the second process?
- Suppose the first process is replaced by an irreversible expansion into a vacuum, to a total volume twice the initial volume. What is the increase of entropy in the irreversible expansion, in J/K?

# Week 7: Fermi and Bose gases

This week we will look at Fermi and Bose gases. These consist of noninteracting fermions or bosons. There is no point studying these at high temperatures and/or low densities, since that is just where they are identical to the classical ideal gas, which we covered last week. So we'll be low-temperature all week. What happens at low temperatures, and where do we see these gasses in real life?

The Fermi gas is most widely seen in metals and semiconductors. In both cases, the electrons (or possibly holes) can be sufficiently dense that "low temperature" corresponds to room temperature or even far above. Now, you might wonder in what insane world it makes sense to think of the electrons in a metal as "noninteracting." If so, you could read my little note about "actual electrons" towards the end of the section on the Fermi-Dirac distribution. In any case, it *is* reasonable and useful to treat metals as a non-interacting Fermi gas. Room temperature is pretty low, as it turns out, from the perspective of the electrons in a metal, and it's not hard to get things colder than room temperature.

Bose gases at effectively low temperatures are less commonly found, and thus in some ways are more cool. Partly this is because there are fewer boson particles. You need to look at atoms with integer spin, such as \(^4\text{He}\). The "new" quantum thing that Bose gases do is to condense at low temperatures. This condensate is *similar* to a superfluid, but not the same thing. It is also *analogous* to superconductivity, but again, not the same thing. The first actual Bose-Einstein condensate wasn't formed until 1995, out of rubidium atoms at 170 nanokelvins. So "low temperature" in this case was actually pretty chilly.

## Density of (orbital) states

We have found ourselves often writing summations over all the orbitals, such as \[\begin{align} N &= \sum_{n_x} \sum_{n_y} \sum_{n_z} f(\varepsilon_{n_xn_yn_z}) \\ &= \iiint f(\varepsilon_{n_xn_yn_z}) dn_xdn_ydn_z \\ &= \int_0^{\infty} f(\varepsilon(n)) 4\pi n^2 dn \end{align}\]Then we make the integral dimensionless, etc. This can be tedious to do over and over again. In the classical limit we can often use a derivative trick to write an answer as a derivative of a sum we have already solved, but that that doesn't work at low temperatures (i.e. the quantum limit). There is another approach, which is to solve for the **density of states** and then use that. (Note that while it is called "density of states" it is more accurately described as a density of *orbitals*, since it refers to the solutions to the one-particle problem.)

The density of states is the number of orbitals per unit energy at a given energy. So basically it does two things for us. First, it turns the 3D integral into a 1D integral. Secondly, it converts from an "\(n\)" integral into an energy integral. This isn't as nice as a dimensionless integral, but we can still do that ourselves later.

We use a density of states by converting \[\begin{align} \sum_{n_x}\sum_{n_y}\sum_{n_z} F(\varepsilon_{n_xn_yn_z}) &= \int d\varepsilon F(\varepsilon) \mathcal{D}(\varepsilon) \end{align}\]where \(F\) is *any* function of the orbital energy \(\varepsilon\). You can see why it is convenient, particularly because the density of states is often itself a very simple function.

## Finding the density of states

Kittel gives a method for finding the density of states which involves first integrating to find the number of states under a given energy \(\varepsilon\), and then taking a derivative of that. This is a perfectly find approach, but I think a simpler method involves just using a Dirac \(\delta\)-function. \[\begin{align} \mathcal{D}(\varepsilon) &= \sum_i^{\text{all orbitals}} \delta(\varepsilon_i-\varepsilon) \end{align}\]where you do need to be certain to turn the summation correctly into an integral *before* making use of the \(\delta\)-function.

- Small groups
- Solve for the density of states of an electron gas (or of any other spin-\(\frac12\) gas, which will have the same expression. You need to know that
\[\begin{align}
\varepsilon_{n_xn_yn_z} &= \frac{\hbar^2}{2m}\frac{\pi^2}{L^2}
(n_x^2+n_y^2+n_z^2)
\end{align}\]
where \(n_x\) and the other range from \(1\) to \(\infty\). This corresponds to hard-wall boundary conditions, since we're putting a half-wavelength in the box. You should also keep in mind that each combination of \(n_x\), \(n_y\), and \(n_z\) will correspond to two orbitals, one for each possible spin state.

I should also perhaps warn you that when integrating \(\delta\)-functions you will always want to perform a change of variables such that the integration variable is present inside the \(\delta\)-function and is not multiplied by anything.

- Answer
- \[\begin{align}
\mathcal{D}(\varepsilon) &=
2
\sum_{n_x=1}^\infty
\sum_{n_y}
\sum_{n_z}
\delta\left(\frac{\hbar^2}{2m}\frac{\pi^2}{L^2}
(n_x^2+n_y^2+n_z^2)-\varepsilon\right)
\\
&=
2\iiint_0^\infty
\delta\left(\frac{\hbar^2}{2m}\frac{\pi^2}{L^2}
(n_x^2+n_y^2+n_z^2)-\varepsilon\right)dn_xdn_ydn_z
\\ &=
\frac28\iiint_{-\infty}^\infty
\delta\left(\frac{\hbar^2}{2m}\frac{\pi^2}{L^2}
(n_x^2+n_y^2+n_z^2)-\varepsilon\right)dn_xdn_ydn_z
\end{align}\]
At this point I have converted to an integral over all "space". Now we'll switch into spherical coordinates before doing a change of variables. Actually, it is useful (although I don't expect students to come up with this), to switch into \(k\)-space before going into an energy integral. \(\vec k \equiv \frac{\pi}{L}\vec n\)
\[\begin{align}
\mathcal{D}(\varepsilon) &=
2\left(\frac{L}{2\pi}\right)^3\iiint_{-\infty}^\infty
\delta\left(\frac{\hbar^2k^2}{2m}-\varepsilon\right)d^3k
\end{align}\]
I hope that \(\vec k\) as a vector feels more comfortable to you than a vector of quantum numbers \(\vec n\). In any case, we now want to do a change of variables into spherical coordinates
\[\begin{align}
\mathcal{D}(\varepsilon) &=
2\left(\frac{L}{2\pi}\right)^3\int_{0}^\infty
\delta\left(\frac{\hbar^2k^2}{2m}-\varepsilon\right)4\pi k^2dk
\end{align}\]
At this point I'd like to pause and point out that an integral over momenta will
*always*end up looking basically like this (except in some cases the \(\varepsilon(k)\) will be different), and this is an acceptable starting point for your solutions on homework*or*an exam. If we have fewer dimensions, we may have an area or line element rather than a volume derivative in \(k\) space, and we would have fewer factors of \(\frac{L}{2\pi}\). Now we can do a change of variables into an energy variable: \[\begin{align} \epsilon &= \frac{\hbar^2k^2}{2m} & d\epsilon &= \frac{\hbar^2k}{m} dk \\ k^2 &= \frac{2m}{\hbar^2}\epsilon & kdk &= \frac{m}{\hbar^2} d\epsilon \end{align}\] And now putting all these things into our integral we find \[\begin{align} \mathcal{D}(\varepsilon) &= \frac{V}{\pi^2}\int_{0}^\infty \delta\left(\epsilon-\varepsilon\right) \sqrt{\frac{2m}{\hbar^2}\epsilon}\frac{m}{\hbar^2} d\epsilon \\ &= \frac{V}{2\pi^2} \left(\frac{2m}{\hbar^2}\right)^{\frac32} \int_{0}^\infty \delta\left(\epsilon-\varepsilon\right) \epsilon^{\frac12} d\epsilon \end{align}\] And now our integral is in a form where we can finally make use of the delta function! If we had*not*transformed it in this way (as I suspect is a common error), we would get something with incorrect dimensions! \(\ddot\frown\) \[\begin{align} \mathcal{D}(\varepsilon) &= \frac{V}{2\pi^2} \left(\frac{2m}{\hbar^2}\right)^{\frac32} \varepsilon^{\frac12} \end{align}\] And that is the density of states for a non-relativistic particle in 3 dimensions. For your homework, you will get to solve for the properties of a highly relativistic particle, which has the same density of states as a photon (apart from a factor of two due to polarization, and any factor due to spin). - Common error
- A
*very*common error which I made myself when writing these notes is to forget the factor of two due to spin. Of course, if you have a spin \(\frac32\) fermion, it would be a factor of four. One advantage of using a density of states is that it already includes this factor, so you no longer need to remember it! \(\ddot\smile\)

## Using the density of states

Once we have the density of states, we can solve for various interesting properties of quantum (or classical) gasses. The easiest thing to do is a fermi gas at zero temperature, since the Fermi-Dirac function turns into a step function at that limit. We can start by solving for the Fermi energy of a fermi gas, which is equal to the chemical potential when the temperature is zero. We do this by solving for the number assuming we know \(\varepsilon_F\), and then backwards solving for \(\varepsilon_F\). I will do a couple of extra steps here to remind you how this relates to what we did last week. \[\begin{align} N &= \sum_i^{\text{all orbitals}} f(\varepsilon_i) \\ &= \sum_i^{\text{all orbitals}} \frac1{e^{\beta(\varepsilon_i-\mu)}-1} \\ &= \int_0^\infty \mathcal{D}(\varepsilon) \frac1{e^{\beta(\varepsilon-\mu)}-1}d\varepsilon \\ &= \int_0^{\varepsilon_F} \mathcal{D}(\varepsilon)d\varepsilon \end{align}\] In the last step, I made the assumption that \(T=0\), so I could turn the Fermi-Dirac function into a step function, which simply changes the bounds of the integral. It is all right to*start*with this assumption, when doing computations at zero temperature. Now I'll put in the density of states. \[\begin{align} N &= \int_0^{\varepsilon_F} \frac{V}{2\pi^2} \left(\frac{2m}{\hbar^2}\right)^{\frac32} \varepsilon^{\frac12}d\varepsilon \\ &= \frac{V}{2\pi^2} \left(\frac{2m}{\hbar^2}\right)^{\frac32} \int_0^{\varepsilon_F} \varepsilon^{\frac12}d\varepsilon \\ &= \frac{V}{2\pi^2} \left(\frac{2m}{\hbar^2}\right)^{\frac32} \frac23 \varepsilon_F^{\frac32} \end{align}\] Now we can just solve for the Fermi energy! \[\begin{align} \varepsilon_F &= \left(\frac{N}{V}3\pi^2\left(\frac{\hbar^2}{2m}\right)^{\frac32}\right)^{\frac23} \\ &= \frac{\hbar^2}{2m}\left(\frac{N}{V}3\pi^2\right)^{\frac23} \end{align}\] This is the energy of the highest occupied orbital in the gas, when the temperature is zero. As you will see, many of the properties of a metal (which is the Fermi gas that you use on an everyday basis) depend fundamentally on the Fermi energy. For this reason, we also like to define other properties of electrons at the Fermi energy: momentum, velocity (technically speed, but it is called Fermi velocity), and even "temperature". \[\begin{align} k_F &= \left(\frac{N}{V}3\pi^2\right)^{\frac13} \\ p_F &= \hbar k_F \\ &= \hbar\left(\frac{N}{V}3\pi^2\right)^{\frac13} \\ v_F &= \frac{p_F}{m} \\ &= \frac{\hbar}{m}\left(\frac{N}{V}3\pi^2\right)^{\frac13} \\ T_F &= \frac{\varepsilon_F}{k_B} \end{align}\] The text contains a table of properties of metals at the Fermi energy for a number of simple metals. I don't expect you to remember them, but it's worth having them down somewhere so you can check the reasonableness of an answer from time to time. Basically, they all come down to \[\begin{align} \varepsilon_F &\sim 4\text{eV} \quad \text{(with }\sim\times2\text{ variation)} \\ k_F &\sim 10^{8}\text{cm}^{-1} \\ v_F &\sim 10^{8}\text{cm s}^{-1} \end{align}\]

- Biographical sidenote
- My PhD advisor insisted that I memorize these numbers (and a few more) prior to my oral exam. He said that experimentalists think that theorists don't know anything about the real world, and hence it is important to be able to estimate things. Sure enough, on my exam I had to estimate the frequency of radiation that passes unabsorbed through at typical superconductor (which is in the microwave band).
- Units sidenote
- My advisor also insisted that I memorize these results in \(cgs\) units rather than SI (i.e. \(mks\)) units, since that is what any faculty would be comfortable with. You may have noticed that Kittel preferentially uses \(cgs\) units, although not exclusively. Berkeley (where Kittel taught) was one of the last hotbeds of \(cgs\) units, and as a result all of my physics courses used Gaussian units (which is synonymous with \(cgs\)).

There is nothing particularly deep here, but this is somewhat more compact, and often the factors of \(\varepsilon_F\) will end up canceling out.

- Small groups
- Solve for the internal energy at zero temperature of a Fermi gas.
- Answer
- We just need to do a different integral. \[\begin{align} U &= \int_0^{\varepsilon_F} \mathcal{D}(\varepsilon)\varepsilon d\varepsilon \\ &= \frac32 N \varepsilon_F^{-\frac32} \int_0^{\varepsilon_F} \varepsilon^{\frac12}\varepsilon d\varepsilon \\ &= \frac32 N \varepsilon_F^{-\frac32} \frac25\varepsilon_F^{\frac52} \\ &= \frac{3}{5} N\varepsilon_F \end{align}\] We generally find when looking at Fermi gasses that things with dimensions of energy end up proportional to the Fermi energy. The \(N\) we could also have predicted, in order to end up with an extensive internal energy.

## Fermi gas at finite temperature

The Fermi gas is more exciting (and more... thermal?) when the temperature is not precisely zero. Let's start with the heat capacity at low temperatures, which is one area where metals inherently differ from semiconductors and insulators.

We are looking at a metal with \(n\) electrons per unit volume, at temperature \(T\), where \(kT\ll \varepsilon_F\). We are looking to find out the heat capacity \(C_V\).

- Small whiteboards
- How would you approach this?
- Answers
- Remember that \[\begin{align} C_V &= \left(\frac{\partial U}{\partial T}\right)_{V,N} = T\left(\frac{\partial S}{\partial T}\right)_{V,N} \end{align}\] which means that we need either \(S\) or \(U\) in order to find the heat capacity at fixed volume. We could do either, but given what we know about the electron gas, \(U\) is easier to find.

Sometimes one or the other of these may be more convenient.

### Hand-waving version of heat capacity

We can begin with a hand-waving version of solving for the heat capacity. We look at the Fermi-Dirac function at both finite and zero temperature, and we can note that the red and blue shaded areas, representing the probability of orbitals being unoccupied below \(\varepsilon_F\) and the probability of excited orbitals above \(\varepsilon_F\) being occupied are equal (this was your homework).

To find the energy, of course, we need the Fermi-Dirac function *times* the density of states. You might think that the red and blue areas will now be unequal, since we are multiplying the blue region by a larger density of states than the red region. However, provided the number of electrons is fixed (as is usual), the chemical potential must shift such that the two areas are equal.

which tells us that the heat capacity vanishes at low temperatures, and is proportional to \(T\), which is a stark contrast to insulators, for which \(C_V\propto T^3\) as predicted by the Debye model.

### Heat capacity without so much waving

To find the heat capacity more carefully, we could set up this integral, noting that the Fermi-Dirac function is the only place where temperature dependence arises: \[\begin{align} C_V &= \left(\frac{\partial U}{\partial T}\right)_{N,V} \\ &= \int_0^\infty \varepsilon \mathcal{D}(\varepsilon)\frac{\partial f}{\partial T} d\varepsilon \\ &= \int_0^\infty \varepsilon \mathcal{D}(\varepsilon) \frac{(\varepsilon-\varepsilon_F)e^{\beta(\varepsilon-\varepsilon_F)}}{ \left(e^{\beta(\varepsilon-\varepsilon_F)}+1\right)^2} \frac1{kT^2} d\varepsilon \end{align}\] where in the last stage I assumed that the chemical potential would not be changing significantly over our (small) temperature range. An interesting question is what the shape of \(\frac{\partial f}{\partial T}\) is. The exponential on top causes it to drop exponentially at \(\varepsilon-\varepsilon_F\gg kT\), while the expoential on the bottom causes it to drop at low energies where \(\varepsilon_F-\varepsilon\gg kT\). This makes it sharply peaked, provided \(kT\ll \varepsilon_F\), which can justify evaluating the density of states at the Fermi energy. We can also for the same reason set the bounds on the integral to be all energies \[\begin{align} C_V &\approx \frac{\mathcal{D}(\varepsilon_F)}{kT^2} \int_{-\infty}^\infty \varepsilon \frac{(\varepsilon-\varepsilon_F)e^{\beta(\varepsilon-\varepsilon_F)}}{ \left(e^{\beta(\varepsilon-\varepsilon_F)}+1\right)^2} d\varepsilon \end{align}\] Now we have an integral that we would love to make dimensionless, but which has an annoying \(\varepsilon\) that does not have \(\varepsilon_F\) subtracted from it. Let's look at even and oddness. The ratio does not look either very even or very odd, but we can make it do so by multiplying by \(e^{-\beta(\varepsilon-\varepsilon_F)}\) top and bottom. \[\begin{align} C_V &= \frac{\mathcal{D}(\varepsilon_F)}{kT^2} \int_{-\infty}^\infty \varepsilon(\varepsilon-\varepsilon_F) \frac{1}{ \left(e^{\beta(\varepsilon-\varepsilon_F)}+1\right) \left(e^{-\beta(\varepsilon-\varepsilon_F)}+1\right)} d\varepsilon \\ &= \frac{\mathcal{D}(\varepsilon_F)}{kT^2} \int_{-\infty}^\infty \varepsilon(\varepsilon-\varepsilon_F) \frac{1}{ e^{\beta(\varepsilon-\varepsilon_F)} +e^{-\beta(\varepsilon-\varepsilon_F)}+2} d\varepsilon \end{align}\] Now we can do a change of variables \[\begin{align} \xi &= \beta(\varepsilon-\varepsilon_F) & d\xi &= \beta d\varepsilon \end{align}\] This makes our integral almost dimensionless: \[\begin{align} C_V &= \frac{\mathcal{D}(\varepsilon_F)}{kT^2} \int_{-\infty}^\infty \left(kT\xi + \cancelto{\text{odd}}{\varepsilon_F}\quad\quad\right) (kT\xi) \frac{1}{ e^\xi +e^{-\xi}+2} kT d\xi \\ &= \mathcal{D}(\varepsilon_F)k^2T \int_{-\infty}^\infty \frac{\xi^2}{ e^\xi +e^{-\xi}+2} d\xi \end{align}\]So here is our answer, expressed in terms of a dimensionless integral. Wolfram alpha tells me this integral is \(\frac{\pi^2}{3}\).

## Bose gas

\[\begin{align} f(\varepsilon) &= \frac1{e^{\beta(\varepsilon-\mu)}-1} \end{align}\] The divergence of the Bose-Einstein distribution means that \(\mu\) must be always less than the minimum orbital energy, i.e. \(\mu<0\). As before, the total number is given by \[\begin{align} N &= \int_0^\infty f(\varepsilon)\mathcal{D}(\varepsilon)d\varepsilon \\ &= \left(V \cdots\right)\int_0^\infty f(\varepsilon)\varepsilon^{\frac12}d\varepsilon \end{align}\]where in the second step I assumed a three-dimensional gas, and omitted the various constants in the density of states for brevity.

What happens when \(kT\) gets low enough that quantum mechanics matters, i.e. such that \(n_Q\approx n\)? Alternatively, we can ask ourselves what happens as \(N\) becomes large, such that \(\frac{N}{V} \ge n_Q\)? If we fix \(T\), we can increase \(N\) only by shifting \(\mu\) to the right, which increases \(f(\varepsilon)\) at every energy. *But* there is a limit! If we try to make \(N\) *too* big, we will find that even if we set \(\mu=0\), we don't get enough particles. What does that mean? Surely there cannot be a maximum value to \(N\)?!

*except for one*! The ground state doesn't show up, because \(\vec k=0\), so \(\varepsilon=0\) (or if you like non-periodic boundary conditions, when \(n_x=n_y=n_z=1\), and \(\varepsilon=\frac{\hbar^2}{2m}\left(\frac{\pi}{L}\right)^2\)). This state

*isn't*counted in the integral, and all the extra bosons end up in it. If you like, \(\mu\) doesn't become zero, but rather approaches the ground state energy. And as it does, the number of particles occupying the ground state diverges. We can find the number of particles in the ground state by subtracting the total number of particles from the number of particles in all the excited states: \[\begin{align} N_{\text{ground}} &= N - \int_0^\infty f(\varepsilon, \mu=0)\mathcal{D}(\varepsilon) d\varepsilon \end{align}\]

When \(N_{\text{ground}}>0\) according to this formula, we say that we have a Bose-Einstein condensate. The temperature at which this transition happens (for a fixed density) is the Bose-Einstein transition temperature. Your last homework this week is to solve for this transition temperature.

## Homework for week 7 (PDF)

**Energy of a relativistic Fermi gas**(Slightly modified from K&K 7.2) For electrons with an energy \(\varepsilon\gg mc^2\), where \(m\) is the mass of the electron, the energy is given by \(\varepsilon\approx pc\) where \(p\) is the momentum. For electrons in a cube of volume \(V=L^3\) the momentum takes the same values as for a non-relativistic particle in a box.- Show that in this extreme relativistic limit the Fermi energy of a gas of \(N\) electrons is given by \[\begin{align} \varepsilon_F &= \hbar\pi c\left(\frac{3n}{\pi}\right)^{\frac13} \end{align}\] where \(n\equiv \frac{N}{V}\) is the number density.
- Show that the total energy of the ground state of the gas is \[\begin{align} U_0 &= \frac34 N\varepsilon_F \end{align}\]

**Pressure and entropy of degenerate Fermi gas**(K&K 7.3)- Show that a Fermi electron gas in the ground state exerts a pressure \[\begin{align} p = \frac{\left(3\pi^2\right)^{\frac23}}{5} \frac{\hbar^2}{m}\left(\frac{N}{V}\right)^{\frac53} \end{align}\] In a uniform decrease of the volume of a cube every orbital has its energy raised: The energy of each orbital is proportional to \(\frac1{L^2}\) or to \(\frac1{V^{\frac23}}\).
- Find an expression for the entropy of a Fermi electron gas in the region \(kT\ll \varepsilon_F\). Notice that \(S\rightarrow 0\) as \(T\rightarrow 0\).

**Mass-radius relationship for white dwarfs**(Modified from K&K 7.6) Consider a white dwarf of mass \(M\) and radius \(R\). The dwarf consists of ionized hydrogen, thus a bunch of free electrons and protons, each of which are fermions. Let the electrons be degenerate but nonrelativistic; the protons are nondegenerate.- Show that the order of magnitude of the gravitational self-energy is \(-\frac{GM^2}{R}\), where \(G\) is the gravitational constant. (If the mass density is constant within the sphere of radius \(R\), the exact potential energy is \(-\frac53\frac{GM^2}{R}\)).
- Show that the order of magnitude of the kinetic energy of the electrons in the ground state is \[\begin{align} \frac{\hbar^2N^{\frac53}}{mR^2} \approx \frac{\hbar^2M^{\frac53}}{mM_H^{\frac53}R^2} \end{align}\] where \(m\) is the mass of an electron and \(M_H\) is the mas of a proton.
- Show that if the gravitational and kinetic energies are of the same order of magnitude (as required by the virial theorem of mechanics), \(M^{\frac13}R \approx 10^{20} \text{g}^{\frac13}\text{cm}\).
- If the mass is equal to that of the Sun (\(2\times 10^{33}g\)), what is the density of the white dwarf?
- It is believed that pulsars are stars composed of a cold degenerate gas of neutrons (i.e. neutron stars). Show that for a neutron star \(M^{\frac13}R \approx 10^{17}\text{g}^{\frac13}\text{cm}\). What is the value of the radius for a neutron star with a mass equal to that of the Sun? Express the result in \(\text{km}\).

**Fluctuations in a Fermi gas**(K&K 7.11) Show for a single orbital of a fermion system that \[\begin{align} \left<(\Delta N)^2\right> = \left<N\right>(1+\left<N\right>) \end{align}\]if \(\left<N\right>\) is the average number of fermions in that orbital. Notice that the fluctuation vanishes for orbitals with energies far enough from the chemical potential \(\mu\) so that \(\left<N\right>=1\) or \(\left<N\right>=0\).

**Einstein condensation temperature**(Roundy problem) Starting from the density of free particle orbitals per unit energy range \[\begin{align} \mathcal{D}(\varepsilon) = \frac{V}{4\pi^2}\left(\frac{2M}{\hbar^2}\right)^{\frac32}\varepsilon^{\frac12} \end{align}\] show that the lowest temperature at which the total number of atoms in excited states is equal to the total number of atoms is \[\begin{align} T_E &= \frac1{k_B} \frac{\hbar^2}{2M} \left( \frac{N}{V} \frac{4\pi^2}{\int_0^\infty\frac{\sqrt{\xi}}{e^\xi-1}d\xi} \right)^{\frac23} T_E &= \end{align}\]The infinite sum may be numerically evaluated to be 2.612. Note that the number derived by integrating over the density of states, since the density of states includes all the states

*except*the ground state.**Note:**This problem is solved in the text itself. I intend to discuss Bose-Einstein condensation in class, but will not derive this result.

# Week 8: Work, heat, and cycles

This week we will be zooming through chapters 8 and 9 of Kittel and Kroemer. Chapter 8 covers heat and work, which you learned about during *Energy and Entropy*. Chapter 9 covers the Gibbs free energy and chemical reactions, which we discussed briefly at the end of the week on chemical potential. Hopefully this will be a bit of review and catch-up time, before we move on to phase transitions.

## Heat and work

As we reviewd in week 1, heat and work for a quasistatic process are given by \[\begin{align} Q &= \int TdS \\ W &= -\int pdV \end{align}\] But we can often make use of the First Law in order to avoid computing both of these (if we know how to find the internal energy): \[\begin{align} \Delta U &= Q + W \end{align}\]### Carnot cycle

We have a monatomic ideal gas, and you can use any of its properties that we have worked out in class. We can begin with what you saw in Energy and Entropy \[\begin{align} pV &= NkT \\ U &= \frac32 NkT \end{align}\] and we can add to that the results from this class: \[\begin{align} S&= Nk\left(\ln\left(\frac{n_Q}{n}\right) + \frac52\right) \\ F &= NkT\left(\ln\left(\frac{n}{n_Q}\right) -1\right) \\ n &= n_Q e^{-\beta\mu} \\ n_Q &\equiv\left(\frac{mkT}{2\pi \hbar^2}\right)^{\frac32} \\ \end{align}\]Let us consider a simple cycle in which we start with the gas at temperature \(T_C\).

Adiabatically compress the gas until it reaches temperature \(T_H\).

Expand a gas to twice its original volume at fixed

*temperature*\(T_H\).Expand the gas at fixed

*entropy*until its temperature reaches \(T_C\).Finally go back to the original volume at

*fixed temperature*\(T_C\).

- Small groups
- Solve for the heat and work on each of these steps. In addition find the total work done.
- Answer
We can solve this problem most easily by working out the heat at each step.

- Since the process is adiabatic, \(Q_1=0\). To find the work, we just need to know \(\Delta U=\frac32 Nk\Delta T\). So the work must be \(W = \frac32 Nk\Delta (T_H-T_C)\).
- Now we are increasing the volume, which will change the entropy. Since the temperature is fixed, \(Q=T\Delta S\), and we can find \(\Delta S\) easily enough from the Sackur-Tetrode entropy: \(\Delta S = Nk\ln 2\). Since the internal energy doesn't change, the heat and work are opposite. \(Q = -W = NkT_H\ln 2\).
- Now we are again not changing the entropy, and thus not heating the system, so \(W =\Delta U\), and the work done is equal and opposite of the work done on step #1. \(W = \frac32 Nk\Delta (T_C-T_H)\).
- This will be like step 2, but now the temperature is different, and since we are compressing the work is positive while the heat is negative: \(Q = -W = NkT_C\ln\frac12 = -NkT_C\ln 2\).

### Efficiency of an engine

If we are interested in this as a heat engine, we have to ask what we put into it. This diagram shows where energy and entropy go. The engine itself (our ideal gas in this case) returns to its original state after one cycle, so it doesn't have any changes. However, we have a hot place (where the temperature is \(T_H\), which has lost energy due to heating our engine as it expanded in step 2), and a cool place at \(T_C\), which got heated up when we compressed our gas at step 4. In addition, over the entire cycle some work was done.

The energy we put in is all the energy needed to keep the hot side hot, which is the \(Q\) for step 2. \[\begin{align} Q_H &= NkT_H\ln 2 \end{align}\] The efficiency is the ratio of what we get out to what we put in, which gives us \[\begin{align} \varepsilon &= \frac{W}{Q_H} \\ &= \frac{\ln 2Nk (T_H-T_C)}{NkT_H\ln 2} \\ &= 1 - \frac{T_C}{T_H} \end{align}\]' and this is just the famous Carnot efficiency.

- Note
- I could have made this an easier problem if I had changed the statement to expand at fixed temperature until the entropy changed by a given \(\Delta S\). Then we would not have had to use the Sackur-Tetrode equation at all, and our result would have been true for
*any*material, not just an ideal gas!

We could also have run this whole cycle in reverse. That would look like the next figure. This is how a refridgerator works. If you had an ideal refridgerator and an ideal engine with equal capacity, you could operate them both between the inside and outside of a room to acheive nothing. The engine could precisely power the refridgerator such that no net heat is exchanged between the room and its environment.

Naturally, we cannot create an ideal Carnot engine or an ideal Carnot refridgerator, because in practice a truly reversible engine would never move. However, it is also very useful to know these fundamental limits, which can guide real heat engines (e.g. coal or nuclear power plants, some solar power plands) and refridgerators or air conditioners. Another use of this ideal picture is that of a heat pump, which is a refridgerator in which you cool the outside in order to heat your house (or anything else). A heat pump can thus be more efficient than an ordinary heater. Just looking at the diagram for a Carnot fridge, you can see that the heat in the *hot* location exceeds the work done, preciesly because it also cools down the cold place.

## Homework for week 8 (PDF)

**Heat pump**(K&K 8.1)- Show that for a reversible heat pump the energy required per unit of heat delivered inside the building is given by the Carnot efficiency: \[\begin{align} \frac{W}{Q_H} &= \eta_C = \frac{T_H-T_C}{T_H} \end{align}\] What happens if the heat pump is not reversible?
- Assume that the electricity consumed by a reversible heat pump must itself be generated by a Carnot engine operating between the even hotter temperature \(T_{HH}\) and the cold (outdoors) temperature \(T_C\). What is the ratio \(\frac{Q_{HH}}{Q_H}\) of the heat consumed at \(T_{HH}\) (i.e. fuel burned) to the heat delivered at \(T_H\) (in the house we want to heat)? Give numerical values for \(T_{HH}=600\text{K}\); \(T_{H}=300\text{K}\); \(T_{C}=270\text{K}\).
- Draw an energy-entropy flow diagram for the combination heat engine-heat pump, similar to Figures 8.1, 8.2 and 8.4 in the text (or the equivalent but sloppier) figures in the course notes. However, in this case we will involve no external work at all, only energy and entropy flows at three temperatures, since the work done is all generated from heat.

In our week on radiation, we saw that the Helmholtz free energy of a box of radiation at temperature \(T\) is \[\begin{align} F &= -8\pi \frac{V(kT)^4}{h^3c^3}\frac{\pi^4}{45} \end{align}\] From this we also found the internal energy and entropy \[\begin{align} U &= 24\pi \frac{(kT)^4}{h^3c^3}\frac{\pi^4}{45} V \\ S &= 32\pi kV\left(\frac{kT}{hc}\right)^3 \frac{\pi^4}{45} \end{align}\]**Photon Carnot engine**(Modified from K&K 8.3)Given these results, let us consider a Carnot engine that uses an empty metalic piston (i.e. a photon gas).

- Given \(T_H\) and \(T_C\), as well as \(V_1\) and \(V_2\) (the two volumes at \(T_H\)), determine \(V_3\) and \(V_4\) (the two volumes at \(T_C\)).
- What is the heat \(Q_H\) taken up and the work done by the gas during the first isothermal expansion? Are they equal to each other, as for the ideal gas?
- Does the work done on the two isentropic stages cancel each other, as for the ideal gas?
- Calculate the total work done by the gas during one cycle. Compare it with the heat taken up at \(T_H\) and show that the energy conversion efficiency is the Carnot efficiency.

**Light bulb in a refridgerator**(K&K 8.7) A 100W light bulb is left burning inside a Carnot refridgerator that draws 100W. Can the refridgerator cool below room temperature?

# Week 9: Phase transformations

We will be ending this class by looking at phase transformations, such as the transformation from liquid to solid, or from liquid to gas. The existence of phase transformations---which are ubiquitous in nature---requires interactions between particles, which up to now we have neglected. Hence, we will be reverting to a thermodynamics approach, since incorporating interactions into statistical mechanics is not so easy.

One of the key aspects for most phase transformations is **coexistence**. It is posssible to have both ice and liquid water in equilibrium with each other, coexisting happily. The existence of **co**existence in fact breaks some assumptions that we have made. For instance, starting way back in Energy and Entropy, we have assured you that you could describe the state of a system using practically any pair of state variables (or triple, now that we include \(N\)). However, if ice and water are coexisting, then there must be an ambiguity, because at that temperature and pressure the system could be either *ice* or *water*, which are different!

For your online edification (probably not much in class), I include here a phase diagram of water, which includes not only the liquid, vapor and solid phases, but also a dozen or so different crystal phases that you can reach at some combination of high pressure or low temperature.

A phase diagram of an ordinary pure material will have two interesting points, and three interesting lines. The two interesting points are the triple point (at which solid, liquid, and vapor can *all* coexist), and the critical point, at which the distinction between liquid and vapor vanishes. The three lines represent coexistence between solid and gas (or vapor), coexistence between liquid and gas, and coexistence between liquid and solid.

## Coexistence

To understand a phase transformation, we first need to understand the state of coexistence.

- Question
- If we view the liquid and solid here as two separate systems that are in equilibrium with each other, what can you tell me about those two systems?
- Answer
- They must be at the same temperature (since they can exchange energy), they must be at the same pressure (since they can exchange volume), and
*least obvious*they must be at the same chemical potential, since they can exchange molecules.

The first two properties define why we can draw the coexistence as a line on a pressure-temperature diagram, since when the two phases coexist they must have the same pressure and temperature. If we drew a volume-temperature diagram, the coexisting phases would not lie at the same point. The final property, that the chemical potentials must be identical, may seem obvious in retrospect. This also means that the Gibbs free energy per particle of the two phases must be equal (since this is equal to the chemical potential).

## Clausius-Clapeyron

When you look at the phase diagram in its usual pressure versus temperature representation, you can now think of the lines as representing the points where two chemical potentials are equal (e.g. the chemical potential of water and ice). A natural question would be whether you could predict the slopes of these curves? Or alternatively, does knowing the slopes of these curves tell you anything about the materials in question?

We can begin by considering two very close points on the liquid-vapor curve, separated by \(dp\) and \(dT\). We know that \[\begin{align} \mu_g(T,p) &= \mu_\ell(T,p) \\ \mu_g(T+dT, p+dp) &= \mu_\ell(T+dT, p+dp) \end{align}\] We can now expand the small difference in terms of differentials \[\begin{multline} \cancel{\mu_g(T,p)} + \left(\frac{\partial \mu_g}{\partial T}\right)_{p,N}dT + \left(\frac{\partial \mu_g}{\partial p}\right)_{T,N}dp \\ =\cancel{\mu_\ell(T,p)} + \left(\frac{\partial \mu_\ell}{\partial T}\right)_{p,N}dT + \left(\frac{\partial \mu_\ell}{\partial p}\right)_{T,N}dp \end{multline}\] We can now collect the two differentials and find their ratio. \[\begin{multline} \left(\left(\frac{\partial \mu_g}{\partial T}\right)_{p,N} - \left(\frac{\partial \mu_\ell}{\partial T}\right)_{p,N}\right)dT \\ = \left(\left(\frac{\partial \mu_\ell}{\partial p}\right)_{T,N} - \left(\frac{\partial \mu_g}{\partial p}\right)_{T,N}\right)dp \end{multline}\] Thus the derivative of the coexistence curve is given by \[\begin{align} \frac{dp}{dT} &= \frac{ \left(\frac{\partial \mu_g}{\partial T}\right)_{p,N} - \left(\frac{\partial \mu_\ell}{\partial T}\right)_{p,N} }{ \left(\frac{\partial \mu_\ell}{\partial p}\right)_{T,N} - \left(\frac{\partial \mu_g}{\partial p}\right)_{T,N} } \\ &= -\frac{ \left(\frac{\partial \mu_g}{\partial T}\right)_{p,N} - \left(\frac{\partial \mu_\ell}{\partial T}\right)_{p,N} }{ \left(\frac{\partial \mu_g}{\partial p}\right)_{T,N} - \left(\frac{\partial \mu_\ell}{\partial p}\right)_{T,N} } \end{align}\]- Small groups
- Find an expression for these derivatives to express this ratio in terms of thermal variables that are more comfortable. You will want to make use of the fact we derived a few weeks ago, which says that the chemical potential is the Gibbs free energy per particle, where \(G=U-TS+pV\).
- Answer
- \[\begin{align}
G &= U-TS+pV \\
&= \mu N\\
dG &= dU -TdS -SdT +pdV - Vdp \\
&= -SdT +Vdp + \mu dN \\
Nd\mu &= -SdT +Vdp + \mu dN \\
d\mu &= -\frac{S}{N}dT +\frac{V}{N}dp + \frac{\mu}{N}dN
\end{align}\]
From this differential we can see that
\[\begin{align}
-\frac{S}{N} &= \left(\frac{\partial \mu}{\partial T}\right)_{p,N}
\\
\frac{V}{N} &= \left(\frac{\partial \mu}{\partial p}\right)_{T,N}
\end{align}\]
Thus we can put these into the ratios above, and we will find thatthe \(N\)s will cancel, and the minus sign on the entropy will cancel the minus sign that was out front.
\[\begin{align}
\frac{dp}{dT} &= \frac{
\frac{S_g}{N_g} - \frac{S_\ell}{N_\ell}
}{
\frac{V_g}{N_g} - \frac{V_\ell}{N_\ell}
}
\end{align}\]
This looks like a bit of a nuisance having all these \(N\) values on the bottom. It looks cleaner if we just define \(s\equiv \frac{S}{N}\) as the specific entropy (or entropy per atom) and \(v\equiv{V}{N}\) as the specific volume (or volume per atom). Thus we have
\[\begin{align}
\frac{dp}{dT} &= \frac{
s_g - s_\ell
}{
v_g - v_\ell
}
\end{align}\]
This is the famous Clausius-Clapeyron equation, and is true for
*any*phase coexistence curve in the pressure-temperature phase diagram.

**latent heat**\(L\), which gives us that \[\begin{align} \frac{dp}{dT} &= \frac{L}{T\Delta V} \end{align}\]

This equation can be a bit tricky to use right, since you could get the direction of \(\Delta V\) wrong. The one with entropy and volume is easier, since as long as both changes are in the same direction (vapor minus liquid or vice versa) it is still correct.

From Clausius-Clapeyron we can see that so long as the volume increases as the entropy also increases, the coexistence curve will have a positive slope.

- Question
- When would the slope ever be negative? It requires a high-entropy phase that also has lower volume!
- Answer
- Ice and water! Water has higher entropy, but also has lower volume than ice (i.e. is more dense). This is backwards from most other materials, and causes the melting curve to slope up and to the left for ice.

## van der Waals

When we talk about phase transformations, we require some sort of system in which there are interactions between particles, since that is what leads to a phase transformation. We can either do this from the bottom up, by constructing a system in which there are interactions and then solving for the properties of that system, or we could use a more empirical approach, in which we use an approximate set of equations of state (or a free energy) that behaves much like a real system.

The van der Waals fluid is sort of in between these two approaches. I will describe how we would "derive" the van der Waals free energy in a slightly hand-waving manner, and then we will use it as an effectively empirical system that we can use to explore how a phase transition might happen. The van der Waals fluid in essence is a couple of corrections to the ideal gas law, which together add enough interactions to give a plausible description of a liquid-vapor phase transition.

- Small white boards
- What kind of interactions might exist in a real gas that are ignored when we treat it as an ideal gas?
- Answer
- Repulsion and attraction! \(\ddot\smile\) Atoms will have a very high energy if they sit on top of another atom, but atoms that are at an appropriate distance will feel an attractive interaction.

In fluids, attraction and repulsion tend to be treated very differently. Repulsion *tends* to primarily decrease entropy rather than increasing energy, because the atoms can simply avoid being on top of each other. In contrast, attraction often has little effect on entropy (except when there is a phase transformation), but can decrease the energy. It has little effect on entropy because the attraction is often very weak, so it doesn't (much) affect where the atoms are, but does affect the energy, provided the atoms are close enough.

### Building up the free energy: repulsion

Let's start by looking at the ideal gas free energy: \[\begin{align} F_{\text{ideal}} &= -NkT\left(\ln\left(\frac{n_QV}{N}\right) + 1\right) \end{align}\] This free energy depends on both volume and temperature (also \(N\), but let's keep that fixed). The temperature dependence is out front and in \(n_Q\). The volume dependence is entirely in the logarithm. When we add the repulsive interaction, we can wave our hands a bit and argue that the effect of repulsion is to keep atoms from sitting too close to one another, and*that*results in each atom having less volume it could be placed in. The volume available for a given atom will be the total volume \(V\), minus the volume occupied by all the other atoms, which we can call \(Nb\) where \(N\) is the number of atoms, and \(b\) is the excluded volume per atom. You might argue (correctly) that the excluded volume should be \((N-1)b\), but we will be working in the limit of \(N\gg1\) and can ignore that fine distinction. Making this substitution gives us \[\begin{align} F_{\text{with repulsion}} &= -NkT\left(\ln\left(\frac{n_Q(V-Nb)}{N}\right) + 1\right) \end{align}\]

This free energy is going to be *higher* than the ideal gas free energy, because we are making the logarithm lesser, but there is a minus sign out front. That is good, because we would hardly expect including repulsion to lower the free energy.

In your homework you will (incidentally) show that this free energy gives an internal energy that is identical to the ideal gas free energy, which bears out what I said earlier about repulsion affecting the entropy rather than the energy.

### Adding attraction: mean field theory

When we want to add in attraction to the free energy, the approach we will use is called **mean field theory**. I prefer to talk about it as first-order **thermodynamic perturbation theory**. (Actually, mean field theory is often more accurately described as a poor approximation to first-order perturbation theory, as it is common in mean-field theory to ignore any correlations in the reference fluid.) You know perturbation theory from quantum mechanics, but the fundamental ideas can be applied to any theory, including statistical mechanics.

The fundamental idea of perturbation theory is to break your Hamiltonian into two terms: one that you are able to solve, and a second term that is small. In this case, in order to derive (or motivate?) the van der Waals equation, our reference would be the system with repulsion only, and the perturbation would be the attraction between our atoms. We want to solve this purely classically, since we don't know how to solve the energy eigenvalue equation with interactions between particles included.

Classically, we would begin by writing down energy, and then we would work out the partition function by summing over all possible microstates in the canonical ensemble. A logarithm would then tell us the free energy. The energy will be \[\begin{align} E &= \sum_i^{\text{all atoms}} \frac{p_i^2}{2m} + \frac12\sum_{ij}^{\text{atom pairs}}U(|\vec r_i-\vec r_j|) \end{align}\] where \(U(r)\) is an attractive**pair potential**, which is to say, a potential energy of interaction between each pair of atoms. The first term is the kinetic energy (and is the same for the ideal gas), while the second term is a potential energy (and is zero for the ideal gas). The partition function is then \[\begin{align} Z &= \frac1{N!} \int\!\!d^3r_1\int\!\!d^3r_2\cdots\int\!\!d^3r_N \notag\\&\quad \int\!\!d^3p_1\int\!\!d^3p_2\cdots\int\!\!d^3p_N e^{-\beta\left(\sum \frac{p_i^2}{2m} + \frac12\sum U(|\vec r_i-\vec r_j|)\right)} \\ &= \frac1{N!} \int\!\!d^3p_1\int\!\!d^3p_2\cdots\int\!\!d^3p_N e^{-\beta\left(\sum \frac{p_i^2}{2m}\right)} \notag\\&\quad \int\!\!d^3r_1\int\!\!d^3r_2\cdots\int\!\!d^3r_N e^{-\beta\left(\frac12\sum U(|\vec r_i-\vec r_j|)\right)} \end{align}\] At this point I will go ahead and split this partition function into two factors, an ideal gas partition function plus a correction factor that depends on the potential energy of interaction. \[\begin{align} Z &= \frac{V^N}{N!} \int\!\!d^3p_1\int\!\!d^3p_2\cdots\int\!\!d^3p_N e^{-\beta\left(\sum \frac{p_i^2}{2m}\right)} \notag\\&\quad \frac1{V^N}\int\!\!d^3r_1\int\!\!d^3r_2\cdots\int\!\!d^3r_N e^{-\beta\left(\frac12\sum U(|\vec r_i-\vec r_j|)\right)} \\ &= Z_{\text{ideal}} \frac1{V^N}\int\!\!d^3r_1\cdots\int\!\!d^3r_N e^{-\beta\left(\frac12\sum U(|\vec r_i-\vec r_j|)\right)} \\ &= Z_{\text{ideal}}Z_{\text{configurational}} \end{align}\] Now we can express the free energy! \[\begin{align} F &= -kT\ln Z \\ &=-kT\ln(Z_{\text{ideal}}Z_{\text{configurational}}) \\ &= F_{\text{ideal}} -kT\ln Z_{\text{configurational}} \end{align}\] So we just need to approximate this

**excess**free energy (beyond the ideal gas free energy). Let's get to the approximation bit. \[\begin{align} Z_{\text{config}} &= \int\!\!\frac{d^3r_1}{V}\cdots\int\!\!\frac{d^3r_N}{V} e^{-\beta\left(\frac12\sum U(|\vec r_i-\vec r_j|)\right)} \\ &\approx \int\!\!\frac{d^3r_1}{V}\cdots\int\!\!\frac{d^3r_N}{V} \left(1-\sum_{ij}\frac{\beta}2 U(r_{ij})\right) \end{align}\] At this point I have used a power series approximation on the exponentials, under the assumption that our attraction is sufficiently small. Now we can write this sum in a simpler manner, taking account of the symmetry between the different particles. \[\begin{align} Z_{\text{config}} &= 1 - \frac{\beta}2\sum_{ij}\int\!\!\frac{d^3r_1}{V}\cdots\int\!\!\frac{d^3r_N}{V} U(r_{ij}) \\ &= 1 - \frac{\beta N^2}2\int\!\!\frac{d^3r_1}{V}\int\!\!\frac{d^3r_2}{V} U(r_{12}) \\ &= 1 - \frac{\beta N^2}2\int\!\!\frac{d^3r}{V}U(r) \end{align}\] At this stage, I've gotten things way simpler. Note also, that I did something wrong. I assumed that the potential was always small, but the repulsive part of the potential is

*not*small. But we'll ignore that for now. Including it properly would be doing this right, but instead we'll use the approach that lead's to the van der Waals equation of state. To continue... \[\begin{align} F_{\text{excess}} &= -kT\ln Z_{\text{conf}} \\ &= -kT\ln\left(1 - \frac{\beta N^2}2\int\!\!\frac{d^3r}{V}U(r)\right) \\ &\approx kT\frac{\beta N^2}2\int\!\!\frac{d^3r}{V}U(r) \\ &= \frac{N^2}2\int\!\!\frac{d^3r}{V}U(r) \\ &\equiv -\frac{N^2}{V} a \end{align}\] where I've defined \(a \equiv -\frac12\int\!\!d^3r U(r)\). The minus sign here is to make \(a\) a positive quantity, given that \(U(r)<0\). Putting this together with the ideal gas free energy modified to include a simple repulsion term, we have the van der Waals free energy: \[\begin{align} F_{\text{vdW}} &= -NkT\left(\ln\left(\frac{n_Q(V-Nb)}{N}\right) + 1\right) - \frac{N^2}{V}a \end{align}\]

### van der Waals equation of state

- Small groups
- Solve for the van der Waals pressure, as a function of \(N\), \(V\), and \(T\) (and of course, also \(a\) and \(b\)).
- Answer
- \[\begin{align} p &= -\left(\frac{\partial F}{\partial V}\right)_{T,N} \\ &= \frac{NkT}{V-Nb} - \frac{N^2}{V^2}a \end{align}\]

as you can see it is only slightly modified from the ideal gas law, provided \(a\ll p\) and \(Nb\ll V\).

## van der Waals and liquid-vapor phase transition

Let's start by looking at the pressure as a function of volume according to the van der Waals equation: \[\begin{align} p &= \frac{NkT}{V-Nb} - \frac{N^2}{V^2}a \\ &= \frac{kT}{\frac{V}{N}-b} - \frac{N^2}{V^2}a \end{align}\]Clearly the pressure will diverge as the volume is decreased towards \(Nb\), which puts a lower bound on the volume. This reflects the fact that each atom takes \(b\) volume, so you can't compress the fluid smaller than that. At larger volumes, the pressure will definitely be positive and decreasing, since the attractive term dies off faster than the first term. However, if \(a\) is sufficiently large (or \(T\) is sufficiently small), we may find that the second term dominates when the volume is not too large.

We can also rewrite this pressure to express it in terms of the number density \(n\equiv \frac{N}{V}\), which I find a little more intuitive than imagining the volume changing: \[\begin{align} p &= \frac{kT}{\frac1n-b} - n^2 a \\ &= kT\frac{n}{1-nb} - n^2 a \end{align}\]So this tells us that as we increase the density from zero, the pressure will begin by increasing linearly. It will end by approaching infinity as the density approaches \(\frac1b\). In between, the attractive term may or may not cause the pressure to do something interesting.

This equation is kind of nice, but it's still pretty confusing because it has three different constants (other than \(n\)) in it. We can reduce that further by rewriting it in terms of the packing fraction \(\eta\equiv nb\), which is the fraction of the volume that is filled with atoms. \[\begin{align} p &= \frac{kT}{b}\frac{\eta}{1-\eta} - \frac{a}{b^2}\eta^2 \end{align}\]We now see that there are just two "constants" to deal with, \(\frac{kT}{b}\), and \(\frac{a}{b^2}\) each of which have dimensions of pressure. The former, of course, depends on temperature, and the ratio between them (i.e. \(\frac{kTb}{a}\)) will fully determine the shape of our pressure curve (in terms of density).

Clearly *something* interesting is happening at low temperatures. This is a phase transition. But how do we find out what the density (or equivalently, volume) of the liquid and solid are? You already know that the pressure, temperature and chemical potential must all be equal when two phases are in coexistence. From this plot we can identify triples of densities where the temperature and pressure are both identical. Which corresponds to the actual phase transition?

- Question
- How might you determine from this van der Waals equation of state or free energy where the phase transformation happens?
- Answer
- As before, we need to have identical pressure, temperature
*and*chemical potential. So we need to check which of these equal pressure states have the same chemical potential.

### Common tangent

Most approaches require us to work with the Helmholtz free energy rather than the pressure equation. If we plot the Helmholtz free energy versus volume (with number fixed) the pressure is the negative slope. We also need to ensure that the chemical potential (or Gibbs free energy) is identical at the two points.

\[\begin{align} G &= F + pV \\ &= F + \left(\frac{\partial F}{\partial V}\right)_{N,T}V \end{align}\]So for two points to have the same Gibbs free energy (at pressure \(p\)), their Helmholtz free energy (at fixed temperature) must pass through a line with slope equal to the pressure. If those two points also have that pressure as their slope, then they have both equal slope and equal chemical potential, and are our two coexisting states. This is the **common tangent** construction.

The common tangent construction is very commonly used when looking at multiple crystal structures, when you don't even know which ones are stable in the first place.

- Note
- The common tangent construction also works when we plot \(F\) versus \(n\) or \(N\).

### Gibbs free energy

Another approach to solve for coexistence points is to plot the Gibbs free energy versus pressure, each of which can be computed easily from the Helmholtz free energy. When we plot the Gibbs free energy versus pressure, we find that there is a crossing and a little loop. This loop corresponds to metastable and unstable states, and the crossing point is where the two phases (liquid and vapor, in our case) coexist.

As we increase the temperature, we will find that this little loop becomes smaller, as the liquid and vapor densities get closer and closer. The critical point is where it disappears.

- Why does \(G\) look like this?
- We had a good question about what the "points" represent in the Gibbs free energy curve. We can understand this a bit better by thinking a bit about the differential of \(G\): \[\begin{align} dG &= -SdT + Vdp \end{align}\] This tells us that the slope of the \(G\) versus \(p\) curve (at fixed temperature) is just the volume of the system. Since the volume can vary continuously (at least in the Helmholtz free energy we constructed), this slope must continuously change as we follow the path. That explains why we have pointy points, since the slope must be the same on both sides of the curve. The points thus represent the states where the pressure has an extremum, as we change the volume. In between those two extrema is the range where increasing volume causes the pressure to increase. These states are mechanically unstable, and thus cannot be observed.

## Examples of phase transitions

I'd like to spend just a bit of time talking about the wide variety of different phase transitions that can and do happen, before we discuss how these transitions can be understood in a reasonably unified way through Landau theory.

#### Liquid-vapor

The liquid-vapor transition is what we just discussed. The only fundamental difference between liquid and vapor is the density of the fluid.

#### Melting/freezing

Melting and freezing is similar to the liquid-vapor transition, with the difference however, that there cannot be a critical point, since we cannot go from solid to liquid without a phase transition.

#### Sublimation

Sublimation is very much like melting. Its major difference happens because of the difference between a gas and a liquid, which means that there is no temperature low enough that there will not be a gas in equilibirum with a solid at low pressure.

#### Solid/solid

Solid-solid phase transitions are interesting in that different solid phases have different crystal symmetries which make it both possible and reasonable to compute (and possibly even observe) properties for different phases at the same density and pressure.

#### Ferromagnetism

A ferromagnetic material (such as iron or nickel) will spontaneously magnetize itself, although the magnetized regions do break into domains. When the material is heated above a given temperature (called the Curie temperature) it is no longer ferromagnetic, but instead behaves as an ordinary paramagnetic material. This is therefore a phase transitions.

#### Ferroelectrics

A ferroelectric material is a material that has a spontaneous electric dipole polarization at low temperatures. It behaves very much like an electrical analogue of a ferromagnetic material.

#### Antiferromagnetism

An antiferromagnetic material (such as nickel oxide) will have different atoms with oppositely polarized spin. This is less easy to observe by elementary school children than ferromagnetism, but is also a distinct phase, with a phase transition in which the spins become disordered.

#### Superconductivity

A superconductor at low temperatures has zero electrical resistivity. At higher temperature it is (for ordinary superconductors) an ordinary metal. Lead is a classic example of a superconductor, and has a transition temperature of \(7.19\text{K}\). You see high-\(T_c\) superconductors in demos more frequently, which have transition temperatures up to \(134\text{K}\), but are more complicated in terms of their cause and phase diagram.

#### Superfluidity

A superfluid (and helium 4 is the classic example) has zero viscosity at low temperatures. For helium this transition temperature is \(2.17\text{K}\).

#### Bose-Einstein condensation

The transition to having a macroscopic occupation in the ground state in a gas of bosons is another phase transition.

#### Mixing of binary systems

In binary systems (e.g. salt and water, or an alloy of nickel and iron) there are many of the same phase transitions (e.g. liquid/gas/solid), but now we have an additional parameter which is the fraction of each component in the phase. Kittel and Kroemer have a whole chapter on this kind of phase transition.

## Landau theory

There are so many kinds of phase transitions, you might wonder whether they are all different, or if we can understand them in the same (or a similar) way. Landau came up with an approach that allows us to view the whole wide variety of phase transitions in a unified manner.

The key idea is to identify an **order parameter** \(\xi\), which allows us to distinguish the two phases. This order parameter ideally should also be something that has interactions we can control through some sort of an external field. Examples of order parameters:

- Liquid-vapor
- volume or density
- Ferromagnetism
- magnetization
- Ferroelectrics
- electric polarization density
- Superconductivity or superfluidity
- quantum mechanical amplitude (including phase)
- Binary mixtures
- fraction of components

So far this hasn't given us much. Landau theory becomes powerful is when we expand the free energy as a power series in the order parameter (and later as a power series in temperature).

### A continuous phase transition

To make things concrete, let us assume an order parameter with inversion symmetry, such as magnetization or electrical polarization. This means that \(F_L\) must be an even function of \(\xi\), so we can write that \[\begin{align} F_L(\xi,T) &= g_0(T) + \frac12g_2(T)\xi^2 + \frac14 g_4(T)\xi^4 + \cdots \end{align}\] The entire temperature dependence is now hidden in the coefficients of the power series. A simple example where we could have a phase transition, would be if the sign of \(g_2\) changed at some temperature \(T_0\). In this case, we could do a power series expansion of our coefficients around \(T_0\), and we would have something like: \[\begin{align} F_L(\xi,T) &= g_0(T) + \frac12\alpha(T-T_0)\xi^2 + \frac14g_4(T_0)\xi^4 \end{align}\] where I am ignoring the temperature dependence of \(g_4\), under the assumption that it doesn't do anything too fancy near \(T_0\). I'm leaving \(g_0(T)\) alone, because it causes no trouble, and will be useful later. I'm also going to assume that \(\alpha\) and \(g_4(T_0)\) are positive. Now we can solve for the order parameter that minimizes the free energy by setting its derivative to zero. \[\begin{align} \left(\frac{\partial F_L}{\partial \xi}\right)_T &= 0\\ &= \alpha(T-T_0)\xi + g_4(T_0)\xi^3 \end{align}\] This has two solutions: \[\begin{align} \xi &= 0 & \xi^2 &= (T_0-T)\frac{\alpha}{g_4(T_0)} \end{align}\] If \(T>T_0\) there is only one (real) solution, which is that the order parameter is zero. Thus when \(T>T_0\), we can see that \[\begin{align} F(T) &= g_0(T) \end{align}\]exactly, since \(\xi=0\) causes all the other terms in the Landau free energy to vanish.

In contrast, when \(T<T_0\), there are two solutions that are minima (\(\pm \sqrt{(T_0-T)\alpha/g_4(T_0)}\)), and one maximum at \(\xi=0\). In this case the order parameter continuously (but not smoothly) goes to zero. This tells us that the free energy at low temperatures will be given by \[\begin{align} F(T) &= g_0(T) - \frac{\alpha^2}{4g_4(T_0)}(T-T_0)^2 \end{align}\]- Small groups
- Solve for the entropy of this system when the temperature is near \(T_0\).
- Answer
- We can find the entropy from the free energy by considering its total differential
\[\begin{align}
dF &= -SdT -pdV
\end{align}\]
which tells us that
\[\begin{align}
-S &= \left(\frac{\partial F}{\partial T}\right)_{V}
\end{align}\]
Let's start by finding the entropy for \(T<T_0\):
\[\begin{align}
S_< &= -\frac{dg_0}{dT} -\frac{\alpha^2}{2g_4(T_0)}(T_0-T)
\end{align}\]
When the temperature is high, this is easier:
\[\begin{align}
S_< &= -\frac{dg_0}{dT}
\end{align}\]
This tells us that the low-temperature has an extra-low entropy relative to what it would have had without the phase transition. However, the entropy is continuous, which means that there is no latent heat associated with this phase transition, which is called a
**continuous phase transition**. An older name for this kind of phase transition (used in the text) is a**second order phase transition**. Currently "**continuous**" is prefered for describing phase transitions with no latent heat, because they are not always actually*second order*as is this example.

Examples of continuous phase transitions include ferromagnets and superconductors.

### An abrupt phase transition

To get an**abrupt phase transition**with a nonzero latent heat (as for melting or boiling), we need to consider a scenario where \(g_4<0\) and \(g_6>0\). This gives us two competing local minima at different values for the order parameter. (Note that an abrupt phase transition is also known as a

**first order phase transition**.) \[\begin{align} F_L &= g_0(T) + \frac12\alpha(T-T_0)\xi^2 -\frac14|g_4(T)|\xi^4 + \frac16 g_6\xi^6+\cdots \end{align}\]

- Small groups if we have time
- Find the solutions for the order parameter, and in particular find a criterion for the phase transition to happen.
- Answer
- We want to find minima of our free energy...
\[\begin{align}
\frac{\partial F_L}{\partial \xi} &= 0 \\
&= \alpha(T-T_0)\xi - |g_4(T)|\xi^3 + g_6\xi^5
\end{align}\]
One solution is \(\xi=0\). Otherwise,
\[\begin{align}
0 &= \alpha(T-T_0) - |g_4(T)|\xi^2 + g_6\xi^4
\end{align}\]
which is just a quadratic. It has solutions when
\[\begin{align}
\xi^2 &= \frac{|g_4(T)| \pm \sqrt{g_4(T)^2 -4g_6\alpha(T-T_0)}}{2g_6}
\end{align}\]
Note that this has four solutions. Two have \(\xi<0\), and show up because our free energy is even. One of the other solutions is a local maximum, and the final solution is a local minimum. For this to have a real solution, we would need for the thing in the square root to be positive, which means
\[\begin{align}
g_4(T)^2 \ge 4g_6\alpha(T-T_0)
\end{align}\]
It would be tempting to take this as an equality when we are at the phase transition. However, that is just the point at which there is a
*local minimum*, but we are looking for a global minimum (other than \(\xi=0\)). This global minimum will require that \[\begin{align} F_L(\xi>0) < F_L(\xi=0) \end{align}\] which leads us to conclude that \[\begin{align} \frac12\alpha(T-T_0)\xi^2 -\frac14|g_4(T)|\xi^4 + \frac16 g_6\xi^6 &< 0 \end{align}\] We can plug in the criterion for an extremum in the free energy at nonzero \(\xi\) to find: \[\begin{align} \tfrac12\left(|g_4(T)|\xi^2-g_6\xi^4\right)\xi^2 -\tfrac14|g_4(T)|\xi^4 + \tfrac16 g_6\xi^6 &< 0 \\ \tfrac14|g_4(T)|\xi^4 - \tfrac13 g_6\xi^6 &< 0 \\ \frac14|g_4(T)| - \frac13 g_6\xi^2 &< 0 \end{align}\] At this point we would want to make use of the solution for \(\xi^2\) above that used the quadratic equation. We would then have eliminated \(\xi\) from the equation, and could solve for a relationship between \(|g_4(T)|\), \(g_6\), and \(\alpha(T-T_0)\).

## Homework for week 9 (PDF)

**Vapor pressure equation**(David) Consider a phase transformation between either solid or liquid and gas. Assume that the volume of the gas is*way*bigger than that of the liquid or solid, such that \(\Delta V \approx V_g\). Furthermore, assume that the ideal gas law applies to the gas phase.**Note: this problem is solved in the textbook, in the section on the Clausius-Clapeyron equation.**- Solve for \(\frac{dp}{dT}\) in terms of the pressure of the vapor and the latent heat \(L\) and the temperature.
- Assume further that the latent heat is roughly independent of temperature. Integrate to find the vapor pressure itself as a function of temperature (and of course, the latent heat).

Note that this is a rather coarse approximation, since the latent heat of water varies by about 10% between \(0^\circ\text{C}\) and \(100^\circ\text{C}\). Still, you will see a pretty cool result, that is roughly accurate (and good enough for the problems below).

**Entropy, energy, and enthalpy of van der Waals gas**(K&K 9.1) In this entire problem, keep results to first order in the van der Waals correction terms \(a\) and $b.- Show that the entropy of the van der Waals gas is \[\begin{align} S &= Nk\left\{\ln\left(\frac{n_Q(V-Nb)}{N}\right)+\frac52\right\} \end{align}\]
- Show that the energy is \[\begin{align} U &= \frac32 NkT - \frac{N^2a}{V} \end{align}\]
- Show that the enthalpy \(H\equiv U+pV\) is \[\begin{align} H(T,V) &= \frac52NkT + \frac{N^2bkT}{V} - 2\frac{N^2a}{V} \\ H(T,p) &= \frac52NkT + Nbp - \frac{2Nap}{kT} \end{align}\]

**Calculation of \(\frac{dT}{dp}\) for water**(K&K 9.2) Calculate based on the Clausius-Clapeyron equation the value of \(\frac{dT}{dp}\) near \(p=1\text{atm}\) for the liquid-vapor equilibrium of water. The heat of vaporization at \(100^\circ\text{C}\) is \(2260\text{J g}^{-1}\). Express the result in kelvin/atm.**Heat of vaporization of ice**(Modified K&K 9.3) The pressure of water vapor over ice is 518 Pa at \(-2^\circ\text{C}\). The vapor pressure of water at its triple point is 611 Pa, at 0.01\(^\circ\text{C}\) (see Wikipedia water data page). Estimate in \(\text{J mol}^{-1}\) the heat of vaporization of ice just under freezing. How does this compare with the heat of vaporization of water?

# Review

Topics are everything that has been covered on homework. Problems should be similar to homework problems, but short enough to be completed during the exam. The exam will be closed notes. You should be able to remember the fundamental equations.

## Equations to remember

Most of the equations I expect you to remember date back from Energy and Entropy, with a few exceptions.

- Thermodynamic identity
- The thermodynamic identity, including the chemical potential: \[\begin{align} dU &= TdS - pdV + \mu dN \end{align}\] You should be able from this to extract relationships such as \(\mu = \left(\frac{\partial U}{\partial N}\right)_{S,V}\).
- Thermodynamic potentials
- You need to know the Helmholtz and Gibbs free energies. \[\begin{align} F &= U - TS \\ G &= U - TS +pV \\ dF &= -SdT - pdV + \mu dN \\ G &= U - TS +pV \\ dG &= -SdT + Vdp + \mu dN \end{align}\] You don't need to remember their differentials, but you do need to be able to find them quickly and use them, e.g. to find out how \(\mu\) relates to \(F\) as a derivative. I'll point out that by remembering how to find the differentials, you also don't need to remember the sign of \(U-TS\), since you can figure it out from the thermodynamic identity by making the \(TdS\) term cancel.
- Heat and work
- You should remember the expressions for differential heat and work \[\begin{align} dQ &= TdS \\ dW &= -pdV \end{align}\] and you should be able to use these expressions fluently, including integrating to find total heat or work, or solving for entropy given heat: \[\begin{align} dS &= \frac{dQ}{T} \end{align}\]
- Efficiency
- You should know that efficiency is defined as "what you get out" divided by "what you put in", and that for a heat engine this comes down to \[\begin{align} \epsilon &= \frac{W_{\text{net}}}{Q_H} \end{align}\]
- Entropy
- You should remember the Gibbs expression for entropy in terms of probability. \[\begin{align} S &= -k\sum_i P_i\ln P_i \end{align}\]
- Boltzmann probability
- You should be comfortable with the Boltzmann probability, able to predict properties of systems using them. \[\begin{align} P_i &= \frac{e^{-\beta E_i}}{Z} \\ Z &= \sum_i e^{-\beta E_i} \\ F &= -kT\ln Z \end{align}\]
- Derivative trick
- You
*may need*to remember the derivative trick for turning a summation into a derivative of another summation in order to complete a problem. More particularly, I want you**not to use**an expression for \(U\) in terms of \(Z\) that comes from the derivative trick, without writing down the three lines of math (or so) required to show that it is true. - Thermal averages
- You should remember that the internal energy is given by a weighted average: \[\begin{align} U &= \sum_i E_i P_i \end{align}\] And similarly for other variables, such as \(N\) in the grand canonical ensemble.
- Chemical potential
- You should remember that the chemical potential is the Gibbs free energy per particle. \[\begin{align} \mu &= \frac{G}{N} \end{align}\] You should also be able to make a distinction between internal and external chemical potential to solve problems such as finding the density as a function of altitude (or in a centrifuge), if I give you the expression for the chemical potential of an ideal gas (or other fluid).
- Gibbs factor and sum
- You should be comfortable with the Gibbs sum and finding probabilities in the grand canonical ensemble. \[\begin{align} P_i &= \frac{e^{-\beta (E_i-\mu N_i)}}{Z} \\ \mathcal{Z} &= \sum_i e^{-\beta (E_i-\mu N_i)} \end{align}\] Incidentally, in class we didn't cover the grand potential (or grand free energy), but that is what you get if you try to find a free energy using the Gibbs sum like the partition function.
- Fermi-Dirac, Bose-Einstein, and Planck distributions
- You should remember these distributions \[\begin{align} f_{FD}(\varepsilon) &= \frac1{e^{\beta(\varepsilon-\mu)}+1} \\ f_{BE}(\varepsilon) &= \frac1{e^{\beta(\varepsilon-\mu)}-1} \end{align}\] and should be able to use them to make predictions for properties of non-interacting systems of fermions and bosons. This also requires remembering how to reason about orbitals as essentially independent systems within the grand canonical ensemble. You should remember that the Planck distribution for photons (or phonons) is the same as the Bose-Einstein distribution, but with \(\mu=0\). This comes about because photons and phonons are bosons, but are a special kind of boson that has no conservation of particle number.
- Density of states
- You should remember how to use a density of states together with the above distributions to find properties of a system of noninteracting fermions or bosons \[\begin{align} \left<X(\varepsilon)\right> &= \int \mathcal{D}(\varepsilon)f(\varepsilon)X(\varepsilon) d\varepsilon \end{align}\] As special cases of this, you should be able to find \(N\) (or given \(N\) find \(\mu\)) or the internal energy. We had a few homeworks where you found entropy from the density of states, but I think that was a bit too challenging/confusing to put on the final exam.
- Conditions for coexistence
- You should remember that when two phases are in coexistence, their temperatures, pressures, and chemical potentials must be identical, and you should be able to make use of this.

## Equations not to remember

If you need a property of a particular system (the ideal gas, the simple harmonic oscillator), it will be given to you. There is no need, for instance, to remember the Stefan-Boltzmann law or the Planck distribution.

- Heat capacity
- I do not expect you to remember the definition of heat capacity (although you probably will remember it). \[\begin{align} C_V &= T\left(\frac{\partial S}{\partial T}\right)_{V,N} \\ &= \left(\frac{\partial U}{\partial T}\right)_{V,N} \\ C_p &= T\left(\frac{\partial S}{\partial T}\right)_{p,N} \end{align}\] I do expect you to be able to make use of these equations when given. Similarly, you should be able to show that the two expressions for \(C_V\) are equal, using the thermodynamic identity.
- Enthalpy
- If I give you the expression for enthalpy (\(U+pV\)) you should be able to work with it, but since we didn't touch it in class, I don't expect you to remember what it is.
- Any property of an ideal gas
- I don't expect you to remember any property of an ideal gas, including its pressure (i.e. ideal gas law), free energy, entropy, internal energy, or chemical potential. You should be comfortable with these expressions, however, and if I provide them should be able to make use of them.
- Stefan-Boltzmann equation
- You should be able to make use of the expression that \[\begin{align} I &= \sigma_B T^4 \end{align}\] where \(I\) is the power radiated per area of surface, but need not remember this.
- Clausius-Clapeyron equation
- You should be able to make use of \[\begin{align} \frac{dp}{dT} &= \frac{s_g-s_\ell}{v_g-v_\ell} \end{align}\] but I don't expect you to remember this. You should also be able to convert between this expression and the one involving latent heat using your knowledge of heat and entropy.
- Carnot efficiency
- You need not remember the Carnot efficiency \[\begin{align} \epsilon &= 1 - \frac{T_C}{T_H} \end{align}\] but you should remember what an efficiency is, and should be able to pretty quickly solve for the net work and high-temperature heat for a Carnot engine by looking at it in \(T\)/\(S\) space. (Or similarly for a Carnot refridgerator.)
- Density of states for particular systems
- You need not remember any expression for the density of states e.g. for a gas. But given such an expression, you should be able to make use of it.
- Fermi energy
- You need not remember any particular expression for the Fermi energy of a particular system, but should be able to make use of an expression for the Fermi energy of a system.

# Solutions

Here are the solutions for all the homework problems. Although these solutions are available even before homework is due, I recommend that you do your best solve the homework problems without checking the solutions. I would encourage you to go so far as to not check the solutions until after you have *turned in* your homework. This will enable you to practice determining if your answer is correct without knowing *what* the correct answer is. This is what you will have to do after you have graduated (or on the exam)!

In any case, please include for each homework problem that you solve an explanation of what resources you made use of, whether it be help from other students, these solutions, or some other resource. Please explain in each case how you used the resource. e.g. did you look at the solutions to confirm that your answer was correct, or did you look at the solutions to see how to start the problem? Your grade on the homework will not be diminished, even if you essentially copied the solution.

I would also appreciate it if you let me know where you got stuck on a given problem. I may address your difficulty in class, or I may choose to change the homework problem for next year.

**Please note that verbatim copying of any solution (whether it be these, or a homework from another student) is plagiarism, and is not permitted. If you wish to copy a solution, please use it as a guide for how to do the steps, but perform each step on your own, and ideally add some words of your own explaining what you are doing in each step.**

## Solution for week 1

To begin, as the question prompts, we will stick the probabilities into our expressions for \(U\) and \(S\). If you knew how everything was going to work out, you could**Energy, Entropy, and Probabilities***only*stick them into the \(\ln P_i\), but I'll act as though I haven't solved this \(N\gg1\) times before. \[\begin{align} U &= \sum_i E_i \frac{e^{-\beta E_i}}{Z} \\ S &= -k_B\sum_i \frac{e^{-\beta E_i}}{Z} \ln\left(\frac{e^{-\beta E_i}}{Z}\right) \end{align}\] At this point, we can see that there is a chance to simplify the \(\ln\). \[\begin{align} S &= -k_B\sum_i \frac{e^{-\beta E_i}}{Z} \left(\ln\left(e^{-\beta E_i}\right) - \ln Z\right) \\ &= -k_B\sum_i \frac{e^{-\beta E_i}}{Z} \left(-\beta E_i - \ln Z\right) \\ &= k_B\sum_i \frac{e^{-\beta E_i}}{Z} \left(\beta E_i + \ln Z\right) \\ &= k_B\sum_i \frac{e^{-\beta E_i}}{Z}\beta E_i + k_B\sum_i \frac{e^{-\beta E_i}}{Z} \ln Z \\ &= k_B \beta \cancelto{U}{\sum_i \frac{e^{-\beta E_i}}{Z} E_i} + k_B \ln Z \cancelto{\sum_i P_i =1}{\sum_i \frac{e^{-\beta E_i}}{Z}} \\ S &= k_B \beta U + k_B \ln Z \\ U &= \frac{S}{k_B\beta} - \frac1{\beta} \ln Z \label{eq:U} \end{align}\]I'll note that I would normally not show so many steps above in my own work, but am being extra thorough in this solution.

We are now at the point where we can start thinking thermo, and make use of the thermodynamic identity. To do that, let us "zap with d" to see what \(dU\) is in terms of \(dS\) and \(d\beta\), etc. \[\begin{align} dU &= TdS - p\cancelto{0}{dV } \\ &= \frac{dS}{k_B\beta} - \frac{S}{k_B\beta^2}d\beta + \frac{\ln Z}{\beta^2}d\beta -\frac1{\beta Z}dZ \end{align}\]So far, this may not look promising to you, but perseverence pays off!

- Note
- I threw out the \(dV\) because our statistical formalism only includes states with a given volume. Including the volume dependence is not complicated, but it requires us to take derivatives of \(E_i\) with respect to volume, which is a nuisance we can live without for now.

So we have just proven what you all knew about the relationship between \(\beta\) and \(T\). This is valuable, because it establishes the connection between the theoretical Lagrange multiplier and the temperature defined in thermodynamics.

The text uses a different (microcanonical) approach to establishing the connection between the statistical approach and the temperature that we define in thermodynamics.

**Gibbs entropy is extensive**- To begin, we remember the relationship between probabilities given in the problem: \[\begin{align} P_{ij}^{AB} &= P_i^AP_j^B \end{align}\] This means that the probability of finding system \(A\) in state \(i\) while system \(B\) is in state \(j\) is just the product of the separate probabilities. Now the entropy is \[\begin{align} S_{AB} &= \sum_\alpha^{\text{all states}} P_\alpha \ln P_\alpha \\ &= \sum_i^{\text{states of $A$}}\sum_j^{\text{states of $B$}} P_i^AP_j^B \ln\left(P_i^AP_j^B\right) \\ &= \sum_i^{\text{states of $A$}}\sum_j^{\text{states of $B$}} P_i^AP_j^B \left(\ln P_i^A + \ln P_j^B\right) \\ &= \sum_i\sum_j P_i^AP_j^B\ln P_i^A + \sum_i\sum_j P_i^AP_j^B \ln P_j^B \\ &= \sum_i P_i^A \ln P_i^A\sum_j P_j^B + \sum_i P_i^A\sum_j P_j^B \ln P_j^B \\ &= \cancelto{S_A}{\left(\sum_i P_i^A \ln P_i^A\right)}\cancelto{1}{\left(\sum_j P_j^B\right)} + \cancelto{1}{\left(\sum_i P_i^A\right)}\cancelto{S_B}{\left(\sum_j P_j^B \ln P_j^B\right)} \\ &= S_A+S_B \end{align}\]
- At this stage, we can basically use just words to solve this. We consider the system of \(N\) identical subsystems as a combination of a single one and \(N-1\) subsystems, thus \(S_N = S_1 + S_{N-1}\) from what we showed above. Then we repeat \(N\) times, to show that \(S_N=NS_1\). There are other ways to show this, e.g. by repeatedly dividing the system (\(S_N=S_{N/2}+S_{N/2}\)).

**Boltzmann probabilities**At infinite temperature \(\beta=0\), which makes computing probabilities easy: they are all equal. Thus the probabilities are each \(1/3\).

- At very low temperatures \(\beta\epsilon\gg1\). Remember that the probabilities are given by
\[\begin{align}
P_i &= \frac{e^{-\beta E_i}}{Z} \\
Z &= e^{\beta\epsilon} + 1 + e^{-\beta\epsilon}
\end{align}\]
We can see that our "small quantity" for a power series should be \(e^{-\beta\epsilon}\), since that is the small thing in the partition function. We can start with the ground state, which we expect to be overwhelmingly occupied:
\[\begin{align}
P_{0} &= \frac{e^{\beta\epsilon}}{e^{\beta\epsilon} + 1 +
e^{-\beta\epsilon}}
\\
&= \frac{1}{1 + e^{-\beta\epsilon} +
e^{-2\beta\epsilon}}
\\
&\approx 1 - \left(e^{-\beta\epsilon} +
\cancel{e^{-2\beta\epsilon}}\right) + \left(\cancel{e^{-\beta\epsilon}} +
e^{-2\beta\epsilon}\right)^2 + \cdots
\end{align}\]
At the last step, we used a power series approximation for \(1/(1-z)\). We now need to gather terms so that we keep all terms to the same order. In this case the best option is to keep all terms up to \(e^{-2\beta\epsilon}\), since that way we will be able to account for the occupation of the highest energy state. Keeping these terms gives
\[\begin{align}
P_0 \approx 1 - e^{-\beta\epsilon} + \mathcal{O}\left(e^{-3\beta\epsilon}\right)
\end{align}\]
becaue the \(e^{-2\beta\epsilon}\) terms cancel each other out. Thus the ground state will be almost 100% occupied. When we look at the other two states we will get exponentially smaller probabilities:
\[\begin{align}
P_{1} &= \frac{1}{e^{\beta\epsilon} + 1 + e^{-\beta\epsilon}}
\\
&= e^{-\beta\epsilon}\frac{1}{1 + e^{-\beta\epsilon} +
e^{-2\beta\epsilon}}
\\
&= e^{-\beta\epsilon} P_0
\\
&\approx e^{-\beta\epsilon}\left(1 - e^{-\beta\epsilon}\right)
\\
&= e^{-\beta\epsilon} - e^{-2\beta\epsilon}
\end{align}\]
The middle state with zero energy is less occupied by precisely a factor of \(e^{-\beta\epsilon}\). We could have predicted this from the Boltzmann ratio.
\[\begin{align}
P_{2} &= \frac{e^{-\beta\epsilon}}{e^{\beta\epsilon} + 1 + e^{-\beta\epsilon}}
\\
&= e^{-\beta\epsilon}P_1
\\
&\approx e^{-2\beta\epsilon}
\end{align}\]
And the high energy state is hardly occupied at all, the same factor smaller than the previous state.

This solution kept all terms that were at least order \(e^{-2\beta\epsilon}\) for each probability, which resulted in a set of probabilities that add up to one. It would also have been reasonable to answer that \(P_0\approx 1\) and \(P_1\approx e^{-\beta\epsilon}\), and then discuss that actually the probability of being in the ground state is not precisely 1.

I could understand saying that \(P_2\approx 0\), but ideally you should give a nonzero answer for each probability when asked about very low temperatures, because none of them are exactly zero. If you have an experimant that measures \(P_2\) (perhaps state 2 has a distinctive property you can observe), then you will not find it to be zero at any temperature (unless you have poor resolution), and it is best to show how it scales.

If we allow the temperature to be negative, then higher energy states will be more probable than lower energy states. If the energy is

*small*and negative (which was not specified in the question), then the system will almost always be in the \(+\epsilon\) energy state.

Another behavior with negative temperatures for this system is that \(U>0\). For positive temperatures, the internal energy only approaches zero as the temperature gets very high. If the temperature becomes negative, the energy can exceed zero. For other systems, of course, this will not be the case, but this will be true for any system in which the energy states are symmetrically arranged around zero.

## Solution for week 2

**Entropy and Temperature**(K&K 2.1)- We begin by finding the entropy given the provided multiplicity.
\[\begin{align}
S(U,N) &= k_B\log g(U,N) \\
&= k_B \log \left(CU^{3N/2}\right) \\
&= k_B\left( \log C + \log \left(U^{3N/2}\right) \right) \\
&= k_B\log C + \frac32 Nk_B \log U \\
\end{align}\]
In the last two steps there, we made use of properties of \(\log\). If these are not obvious to you, you
*absolutely***must**take the time to review the properties of logarithms. They are absolutely critical to this course! \[\begin{align} \frac1{T} &= \left(\frac{\partial S}{\partial U}\right)_{V,N} \\ &= \frac32Nk_B\frac1{U} \\ U &= \frac32Nk_BT \end{align}\] Yay. - We just need to take one more derivative, since we already found \(\left(\frac{\partial S}{\partial U}\right)_{V,N}\) in part (a).
\[\begin{align}
\left(\frac{\partial^2S}{\partial U^2}\right)_{V,N} &=
-\frac32Nk_B\frac1{U^2} \\
&< 0,
\end{align}\]
where in the last step we only needed to assume that \(N>0\) (natural for the number of particles) and that the energy \(U\) is real (which it always must be). Thus ends the solution.

Because the second derivative of the entropy is

*always*negative, the first derivative is monotonic, which means that the temperature (which is positive) will always increase if you increase the energy of the system and vice versa.

- We begin by finding the entropy given the provided multiplicity.
\[\begin{align}
S(U,N) &= k_B\log g(U,N) \\
&= k_B \log \left(CU^{3N/2}\right) \\
&= k_B\left( \log C + \log \left(U^{3N/2}\right) \right) \\
&= k_B\log C + \frac32 Nk_B \log U \\
\end{align}\]
In the last two steps there, we made use of properties of \(\log\). If these are not obvious to you, you
**Paramagnetism**(K&K 2.2)Okay, here we can understand the fractional magnetization if we think \(Nm\) as being the maximum possible magnetization (all spins are pointing the same way). The quantity \(s\) is defined as the total value of the spin. Because each spin has a value of \(\pm\frac12\), twice \(s\) per particle also tells us the fractional magnetization.

To convert from \(S(s)\) to \(S(U)\) we need to relate the energy to the excess spin \(s\). This relies on the energy expression \[\begin{equation} U = -B2sm \end{equation}\] which uses the equations given. At this point, it is a simple substitution of \(s=-\frac{U}{2mB}\): \[\begin{align} S(U) &= S_0 - k_B\frac{2\left(-\frac{U}{2mB}\right)^2}{N} \\ &= S_0 - k_B\frac{U^2}{2m^2B^2N} \end{align}\] To determine \(1/kT\), we just need to take a derivative: \[\begin{align} \frac1{T} &= \left(\frac{\partial S}{\partial U}\right)_V \\ &= -k_B\frac{U}{m^2B^2N} \\ \frac1{k_BT} &= -\frac{U}{m^2B^2N} \end{align}\]At this point we have finished the problem, with just a bit of algebra. It is helpful at this stage to do a bit of checking. The left hand side here is an inverse energy. On the right hand side, \(mB\) is an energy, so we have an energy over an energy squared, so all is good. \(N\), of course, is dimensionless. However, it is also extensive, as is \(U\). This is good, because the left hand side is intensive, so the right hand side should be also.

The equilibrium fractional magnetization is thus given by \[\begin{align} \frac{M}{Nm} &= -\frac{U}{NmB} \\ &= -\frac{1}{NmB}\left(-\frac{m^2B^2N}{kT}\right) \\ &= \frac{mB}{kT} \end{align}\]Thus the fractional magnetization is just equal to the ratio between \(mB\) (which is the energy of one spin in the magnetic field) to \(kT\) (which is a measure of the available energy).

- Of interest
This relationship is very different than the one we saw in the previous problem! Previously, we saw the temperature being proportional to the internal energy, and here we see it as inversely proportional, meaning that as the energy approaches zero the temperature becomes infinite.

We also previously had an energy that was positive. Here we have a negative sign, which suggests that the energy should be negative in order to maintain a positive temperature. This relates to the energy of a single spin always being either positive or negative, with equal and opposite options.

This problem illustrates a weird phenomenon: if the energy is positive, then we must conclude that the temperature is negative. Furthermore, the temperature discontinuously passes from \(\infty\) to \(-\infty\) as the energy passes through zero. There are different interpretations of these "negative temperature" states. You cannot reach them by heating a system (adding energy via heating), and they cannot be exist in equilibrium if the system has contact with any quantity of material that can have kinetic energy. So I consider these to be unphysical (or non-equilibrium) states. Since temperature is an equilibrium proprty, I would not say that a negative temperature is physically meaningful. That said, there is an analogy that can be made to

*population inversion*in a laser, which is a highly non-equilibrium system that is pretty interesting.

**Quantum harmonic oscillator**(K&K 2.3)- Given the multiplicity, we just need to take a logarithm, and simplify. \[\begin{align} S(N,n) &= k\log g(N,n) \\ &= k \log\left(\frac{(N+n-1)!}{n!(N-1)!}\right) \\ &= k\left(\log(N+n+1)! - \log n! - \log(N-1)!\right) \\ &\approx k\left((N+n+1)\log(N+n+1) - n\log n - (N-1)\log(N-1)\right) \\ &\approx k\left((N+n)\log(N+n) - n\log n - N\log N\right) \\ &= k\left(N\log\frac{N+n}{N} + n\log\frac{N+n}{n}\right) \\ &= k\left(N\log\left(1+n/N\right) + n\log\left(1+N/n\right)\right) \end{align}\] You need not simplify your answer this far, but it is good to get practice simplifying answers, particularly involving logarithms. In particular, it is usually helpful at this point in a computation to verify that the entropy is indeed extensive. Both \(N\) (the number of oscillators) and \(n\) (the sum of all the quantum numbers of all the oscillators) are extensive quantities. Thus \(n/N\) and \(N/n\) are intensive, which is good because otherwise we could not add them to \(1\). Each term is now clearly extensive, and the entropy behaves as we expect.
- Now we want to find \(U(T)\), which will require us to find \(S(U)\) (via simple substitution of \(n=U/\hbar\omega\)) and \(T\) from a derivative of that.
\[\begin{align}
S(U) &= Nk\log\left(1+\frac{U}{N\hbar\omega}\right) +
Nk\frac{U}{N\hbar\omega}\log\left(1+\frac{N\hbar\omega}{U}\right)
\end{align}\]
Now we just have a derivative to take, and then a mess of algebra to simplify.

\[\begin{align} \frac1{T} &= \left(\frac{\partial S}{\partial U}\right)_{N,V} \\ &= \frac{Nk}{1+\frac{U}{N\hbar\omega}}\frac{1}{N\hbar\omega} \\&\quad + Nk\frac{1}{N\hbar\omega}\log\left(1+\frac{N\hbar\omega}{U}\right) \\&\quad - Nk\frac{U}{N\hbar\omega}\frac{1}{1+\frac{N\hbar\omega}{U}}\frac{N\hbar\omega}{U^2} \end{align}\] And now to simplify... \[\begin{align} \frac{\hbar\omega}{kT} &= \frac{1}{1+\frac{U}{N\hbar\omega}} + \log\left(1+\frac{N\hbar\omega}{U}\right) - \frac{\frac{N\hbar\omega}{U}}{1+\frac{N\hbar\omega}{U}} \\ &= \frac{\frac{N\hbar\omega}{U}}{1+\frac{N\hbar\omega}{U}} + \log\left(1+\frac{N\hbar\omega}{U}\right) - \frac{\frac{N\hbar\omega}{U}}{1+\frac{N\hbar\omega}{U}} \\ &= \log\left(1+\frac{N\hbar\omega}{U}\right) \end{align}\]Well, didn't that simplify down nicely? The key was to multiply the first term by \(N\hbar\omega/U\) so that it shared a denominator with the last term (and ended up being equal and opposite).

Solving for \(U\) is not bad at all, now, we'll just take an exponential of both sides: \[\begin{align} e^{\frac{\hbar\omega}{kT}} &= 1 + \frac{N\hbar\omega}{U} \\ \frac{N\hbar\omega}{U} &= e^{\frac{\hbar\omega}{kT}} - 1 \\ U &= \frac{N\hbar\omega}{e^{\frac{\hbar\omega}{kT}} - 1} \end{align}\]- Note
- As I mentioned in the homework, this is the
*hard*way to solve this problem. That said, it wasn't actually particularly hard, you just need to be comfortable doing algebra with logarithms, and simplifying annoying ratios.

## Solution for week 3

**Free energy of a two state system**(K&K 3.1, modified)- The partition function of this two-state system is very simple: \[\begin{align} Z &= \sum_{s}^{\text{all states}} e^{-\beta E_s} \\ &= e^{0} + e^{-\beta\varepsilon} \\ &= 1 + e^{-\beta\varepsilon} \end{align}\] Now the free energy is just a log of this: \[\begin{align} F &= -kT\log Z \\ &= -kT\log\left(1 + e^{-\beta\varepsilon}\right) \\ &= -kT\log\left(1 + e^{-\frac{\varepsilon}{kT}}\right) \end{align}\] We can ask ourselves if this simplifies in any limits, and the easiest one is the low-temperature limit where \(e^{-\frac{\varepsilon}{kT}}\ll 1\). In this limit, the free energy is given by \[\begin{align} F &\approx -kT e^{-\frac{\varepsilon}{kT}} \end{align}\]
- From the free energy, find expressions for the internal energy \(U\) and entropy \(S\) of the system.
- Plot the entropy versus \(T\). Explain its asymptotic behavior as the temperature becomes high.
- Plot the \(S(T)\) versus \(U(T)\). Explain the maximum value of the energy \(U\).

**Magnetic susceptibility**(K&K 3.2)- Use the partition function to find an exact expression for the magentization \(M\) and the susceptibility \(\chi\equiv\left(\frac{\partial M}{\partial B}\right)_T\) as a function of temperature and magnetic field for the model system of magnetic moments in a magnetic field. The result for the magnetization is \(M=nm\tanh\left(\frac{mB}{kT}\right)\), as derived in (46) by another method. Here \(n\) is the particle concentration. The result is plotted in the book.
- Find the free energy and epress the result as a function only of \(T\) and the parameter \(x\equiv \frac{M}{nm}\).
- Show that the susceptibility is \(\chi=\frac{nm^2}{kT}\) in the limit \(mB\ll kT\).

**Free energy of a harmonic oscillator**(K&K 3.3) A one-dimensional harmonic oscillator has an infinite series of equally spaced energy states, with \(\varepsilon_s = s\hbar\omega\), where \(s\) is a positive integer or zero, and \(\omega\) is the classical frequency of the oscillator. We have chosen the zero of energy at the state \(s=0\)**[which Kittel can get away with here, but is not actually the zero of energy!]**.- Show that for a harmonic oscillator the free energy is \[\begin{equation} F = k_BT\log\left(1 - e^{-\frac{\hbar\omega}{k_BT}}\right) \end{equation}\] Note that at high temperatures such that \(k_BT\gg\hbar\omega\) we may expand the argument of the logarithm to obtain \(F\approx k_BT\log\left(\frac{\hbar\omega}{kT}\right)\).
- From the free energy above, show that the entropy is
\[\begin{equation}
S =
\frac{\frac{\hbar\omega}{kT}}{e^{\frac{\hbar\omega}{kT}}-1}
- \log\left(1-e^{-\frac{\hbar\omega}{kT}}\right)
\end{equation}\]
This entropy is shown in the book, along with the heat capacity.
**FIXME I could put those plots here, along with their captions...**

**Energy fluctuations**(K&K 3.4) Consider a system of fixed volume in thermal contact with a resevoir. Show that the mean square fluctuations in the energy of the system is \[\begin{equation} \left<(\varepsilon-\langle\varepsilon^2\rangle\right> = k_BT^2\left(\frac{\partial U}{\partial T}\right)_{V} \end{equation}\] Here \(U\) is the conventional symbol for \(\langle\varepsilon\rangle\).*Hint:*Use the partition function \(Z\) to relate \(\left(\frac{\partial U}{\partial T}\right)_V\) to the mean square fluctuation. Also, multiply out the term \((\cdots)^2\).*Note:*The temperature \(T\) of a system is a quantity that by definition does not fluctuate in value when the system is in thermal contact with a resevoir. Any other attitude would be inconsistent with our definition of the temperature of a system. The energy of such a system may fluctuate, but the temperature does not. Some workers do not adhere to a rigorous defintion of temperature. Thus Landau and Lifshitz give the result \[\begin{align} \left<(\Delta T)^2\right> = \frac{k_BT^2}{C_V}, \end{align}\]but this should be viewed as just another form of what you have proven in this problem, with \(\Delta T\) set equal to \(\Delta U/C_V\). We know that \(\Delta U = C_V\Delta T\)

*(for small values of \(\Delta T\))*, whence these two equations become equal.**Quantum concentration**(K&K 3.8) We need to start by finding the formula for the ground state energy of a particle in a box. It's all right if you just remember this, but it also isn't hard to figure out without doing any complicated math or boundary conditions. The particle needs to have a half-wavelength of \(L\) in each direction in order to fit in the box, thus \(\lambda = 2L\) for each direction. This means that that the wave vector is given by \(k_x = k_y = k_z = \pm\frac{2\pi}{2L}\). Of course, the particle isn't in a traveling wave, but rather in a superposition of the \(\pm\) versions of these traveling waves (i.e. a standing wave). The kinetic energy is given by \[\begin{align} KE &= \frac{p^2}{2M} \\ &= \frac{\hbar^2k^2}{2M} \\ &= \frac{\hbar^2\pi^2}{2ML^2} \end{align}\] Now as instructed we set the kinetic energy to \(kT\) and solve for the density, given by \(n=\frac1{L^3}\). \[\begin{align} kT &= \frac{\hbar^2\pi^2}{2ML^2} \\ &= \frac{\hbar^2\pi^2}{2Mn^{-2/3}} \\ n^{-\frac23} &= \frac{\hbar^2\pi^2}{2MkT} \\ n &= \left(\frac{2MkT}{\hbar^2\pi^2}\right)^\frac32 \end{align}\]As predicted, this difers from \(n_Q\) by a factor of \(\left(\frac{4}{\pi}\right)^\frac32\), which is of order unity. Its value is around \(1.4\).

Let's remind ourselves: this is the density at which quantum stuff becomes really important at a given temperature. In this problem, we showed that the density \(n_Q\) is basically the same as the density of a single particle that is confined enough that its kinetic energy is the same as the temperature.

To find the entropy at temperature \(T\) we need first to consider the energy eigenstates of this system. We could use either periodic boundary conditions or a particle-in-a-box potential to confine the particles. The kinetic energy of a plane wave is given by \[\begin{align} E_k &= \frac{\hbar^2k^2}{2m} \end{align}\] For a particle in a box, a half-integer number of wavelengths must fit in the box: \[\begin{align} L &= \frac{n\lambda}{2} \\ &= \frac12n\frac{2\pi}{k} \\ k_n &= \frac{\pi n}{L}. \end{align}\] Thus, the energy is given by \[\begin{align} E_n &= \frac{\hbar^2}{2m}\frac{\pi^2 n^2}{L^2} \\ &= \frac{\pi^2\hbar^2 n^2}{2mL^2} \end{align}\]**One-dimensional gas**(K&K 3.11) Consider an ideal gas of \(N\) particles, each of mass \(M\), confined to a one-dimensional line of length \(L\). Find the entropy at temperature \(T\). The particles have spin zero.No, you don't need to derive this, but in my opinion it is easier to derive than to remember. If I were not writing up solutions, I would have done several of the steps above in my head.

Now that we have our energy, we can start thinking about how to find the partition function for a single particle. We can get away with this because the particles are non-interacting, so the total energy is just a sum of the energies of each individual particle. \[\begin{align} Z_1 &= \sum_{n=1}^{\infty} e^{-\beta E_n} \\ &= \sum_{n=1}^{\infty} e^{-\beta \frac{\pi^2\hbar^2}{2mL^2} n^2} \end{align}\] This is the point where we typically step back and tell ourselves that \(k_BT \gg \frac{\pi^2\hbar^2}{2mL^2}\) (because the distance \(L\) is macroscopic, and we aren't looking at crazy-low temperatures), which means that we can turn the sum into an integral: \[\begin{align} Z_1 &\approx \int_{0}^{\infty} e^{-\beta \frac{\pi^2\hbar^2}{2mL^2} n^2} dn \end{align}\] The smart move here it to do a \(u\) substitution, to get all the ugly stuff out of our integral. \[\begin{align} u &= \sqrt{\frac{\beta}{2m}}\frac{\pi\hbar}{L} n & du &= \sqrt{\frac{\beta}{2m}}\frac{\pi\hbar}{L} dn \end{align}\] This gives us a simple gaussian integral: \[\begin{align} Z_1 &\approx \sqrt{2mkT}\frac{L}{\pi\hbar} \int_{0}^{\infty} e^{-u^2} du. \end{align}\]The value of the gaussian integral here doesn't have any particular physical impact, since it is just a dimensionless numerical constant. It does, of course, impact the numerical value.

- Gaussian integrals
- You are welcome to look up the value of integrals like this, or memorize the answer (I always just remember that it's got a \(\sqrt{\pi}\) in it, which doesn't help much). I'll show you here how to find the value of a gaussian integral, which is a nice trick to be aware of. \[\begin{align} I_G &\equiv \int_{0}^{\infty} e^{-u^2} du \\ &= \frac12 \int_{-\infty}^{\infty} e^{-u^2} du \\ (2I_G)^2 &= \left(\int_{-\infty}^{\infty} e^{-u^2} du\right)^2 \\ &= \left(\int_{-\infty}^{\infty} e^{-x^2} dx\right)\left(\int_{-\infty}^{\infty} e^{-y^2} dy\right) \\ &= \int_{-\infty}^{\infty}\int_{-\infty}^{\infty} e^{-\left(x^2+y^2\right)} dxdy \\ &= \int_{0}^{\infty}\int_{0}^{2\pi} e^{-r^2} r d\phi dr \\ &= 2\pi \int_{0}^{\infty} e^{-r^2} r dr \\ \xi &= r^2\quad\quad d\xi = 2rdr \\ (2I_G)^2 &= 2\pi \int_0^\infty e^{-\xi}\frac{d\xi}{2} \\ &= \pi \\ I_G &= \frac{\sqrt{\pi}}2 \end{align}\] The trick was simply to square the integral, and then move from Cartesian to polar coordinates. This only works because we are integrating to \(\infty\).

Here we are at a good point to check whether our answer makes sense. Firstly, we can check that \(F\) is indeed extensive. It is, since it is proportional to \(N\), and the only other extensive quantities in it are the \(L\) and \(N\) in the logarithm, and they form a ratio, which is therefore intensive. We can also check dimensions.

We know that \(\frac{\hbar^2k^2}{2m}\) is an energy, which means that \(\frac{\hbar^2}{m}\) has dimensions of energy times distance squared. The \(kT\) cancels the energy, and the square root turns the resulting one over distance squared into an inverse distance, which happily cancels with the \(L\), so the argument of our logarithm is dimensionless.

Now we will get to the answer pretty soon! Recall that: \[\begin{align} dF &= -SdT -pdV \end{align}\] (although the second term should have a \(dL\) for a 1D system) which means that \[\begin{align} -S &= \left(\frac{\partial F}{\partial T}\right)_{L,V,N} \\ S &= -\left(\frac{\partial F}{\partial T}\right)_{L,V,N} \\ &= Nk_B\left(\log \left(\sqrt{\frac{m kT}{2\pi \hbar^2}}\frac{L}{N}\right) + 1\right) + Nk_BT\frac{1}{2T} \\ &= Nk_B\left(\log \left(\sqrt{\frac{m kT}{2\pi \hbar^2}}\frac{L}{N}\right) + \frac32\right) \end{align}\]This is our final answer. It looks shockingly like the entropy of a 3D ideal gas, right down to the quantum length scale (which is no longer a quantum density), commonly called the "thermal de Broglie wavelength."

- Nasty logs
- In computing the derivative of a nasty logarithm (which I did in my head above), you can use the following shortcut, provided you remember the properties of logarithms:
\[\begin{align}
\log\left(\sqrt{\frac{m kT}{32\pi
\hbar^2}}\frac{L}{N}\right)
&= \log\left(\sqrt{\frac{m kT}{32\pi
\hbar^2}}\right) + \log\left(\frac{L}{N}\right)
\\
&= \frac12\log\left(\frac{m kT}{32\pi
\hbar^2}\right) + \log\left(\frac{L}{N}\right)
\\
&= \frac12\log\left(T\right) +
\frac12\log\left(\frac{m k}{32\pi\hbar^2}\right) + \log\left(\frac{L}{N}\right)
\end{align}\]
Now you can take a derivative of this, which is way easier than a derivative of the whole mess, and clearly must give you the same answer. There are other ways to do it, but I find this particularly simple, and it has the advantage that it's the same kind of manipulation you're doing all the time anyhow, just to simplify your results.

If you do this in your head (or on scratch paper), you can immediately discard any of the terms that will vanish when you take a derivative of them, which makes it much simpler than what I wrote down.

## Solution for week 4

For a simple harmonic oscillator, the number of quanta is given by \[\begin{align} \langle n\rangle &= \frac{e^{-\beta\hbar\omega}}{1 - e^{-\beta\hbar\omega}} \\ &= \frac{1}{e^{\beta\hbar\omega}-1} \end{align}\] And this is what we need to add up for all the modes. \[\begin{align} N_{ph} &= \sum_{n_x=-\infty}^\infty\sum_{n_y}\sum_{n_z} \frac{1}{e^{\beta\hbar\omega_{n_xn_yn_z}}-1} \\ &= \sum_{n_x=-\infty}^\infty\sum_{n_y}\sum_{n_z} \frac{1}{e^{\beta \frac{hc}{L}\sqrt{n_x^2+n_y^2+n_z^2}}-1} \end{align}\] As in class, we will turn our summation into an integral, assuming our volume is reasonably large (and our temperature is reasonably high) so \(\frac{hc}{kTL} \ll 1\). \[\begin{align} N_{ph} &\approx \iiint \frac{1}{e^{\beta \frac{hc}{L}\sqrt{n_x^2+n_y^2+n_z^2}}-1} dn_xdn_ydn_z \\ &= \int_0^\infty \frac{1}{e^{\beta \frac{hc}{L}n}-1}4\pi n^2 dn \end{align}\] We will do a \(\xi\) substitution: \(\xi = \frac{\beta hc}{L}n\) \[\begin{align} N_{ph} &= 4\pi\left(\frac{kTL}{hc}\right)^3 \int_0^\infty \frac1{e^\xi-1}\xi^2d\xi \\ \frac{N_{ph}}{V} &= 4\pi\left(\frac{kT}{hc}\right)^3 \int_0^\infty \frac1{e^\xi-1}\xi^2d\xi \\ &= \frac{1}{2\pi^2}\left(\frac{kT}{\hbar c}\right)^3 \int_0^\infty \frac1{e^\xi-1}\xi^2d\xi \end{align}\]**Number of thermal photons**We are looking to find the number of thermal photons in a cavity with volume \(V\). The key is that we already know how many photons are in each mode, we just have to add up the photons from every mode. It may sound tedious, but that is only because it is.Once again, we have a dimensionless integral that we can look up the value of, but which only scales our answer. Wolfram alpha says the value of this integral is about 2.4.

**Surface temperature of the sun****Power of the sun**Given the flux of power hitting the earth, we just need to find the fraction of the sun's power that hits a square centimeter on the earth. That is just the inverse of the area of a sphere with radius equal to the earth-sun distance. \[\begin{align} \text{power} &= \frac{4\pi R^2}{1 \text{cm}^2} 0.136 \text{J}\text{s}^{-1}\text{cm}^{-2} \\ &= \frac{4\pi \left(1.5\times10^{13}\text{cm}\right)^2}{1\text{cm}^2} 0.136 \text{J}\text{s}^{-1}\text{cm}^{-2} \\ &\approx 3.85\times 10^{26} \text{J}/\text{s} \end{align}\]**Temperature**The power radiated by the sun is given by the Stefan-Boltzmann constant times the area of the sun times \(T^4\). Thus \[\begin{align} T &= \frac{\text{power}}{4\pi R^2 \sigma_B} \end{align}\] FIXME look up the constant value and do math!

I'll note that this is a weird way to find the temperature of the sun. The easier approach is to use the frequency with maximum intensity, but of course that requires different information.

**Age of the sun**- The total energy available in the sun in this approximation is \[\begin{align} E &\approx 0.1(M_\text{H} - M_\text{He})c^2 \end{align}\] Where by \(M_\text{H}\) I mean the mass of the sun when it is all hydrogen (which I assum it begins as), and by \(M_\text{He}\) I mean the mass of the sun if it is all converted to helium. We could compute the mass of the sun using Newton's law of gravity, the distance of the earth from the sun, and the length of a year. Or we could look it up. Either way it comes out to \(\sim 2\times 10^{30}~\text{kg}\). Thus our answer is \[\begin{align} E &\approx 0.1\frac{4\times 1.0078 - 4.0026}{4\times 1.0078}\times 10^{30}~\text{kg} c^2 \\ &\approx 0.1\frac{4.0312 - 4.0026}{4.0312}\times 10^{30}~\text{kg} c^2 \\ &\approx 0.00071\times 2\times 10^{30}~\text{kg} c^2 \\ &\approx 1.4\times 10^{27}~\text{kg} c^2 \\ &\approx 1.3\times 10^{44}~\text{J} \end{align}\]
- To find the lifetime, we just divide the energy by the power, assuming it keeps radiating at the same rate. \[\begin{align} t_{\max} &\approx \frac{1.3\times 10^{44}\text{J}}{4\times 10^{26}\text{Js}^{-1}} \\ &\approx 3\times 10^{17}\text{s} \\ &\approx 5\times 10^{15}~\text{min} \\ &\approx 10^{10}~\text{years} \end{align}\] So according to this estimate, our sun is basically done. Keep in mind the 10% number used was unjustified. A quick web search suggests that people think the sun can continue "as is" for about another 5 billion years, so there is no need to cash out on your Earth real estate just yet.

**Surface temperature of the earth**This problem comes down to balancing the radiation absorbed by the earth with the radiation emitted by the earth. Interestingly, the answer won't change if we drop the assumption that the earth is a perfect black body, so long as its absorption is indepednent of frequency (which isn't true). The assumption that it remains constant temperature over day and night is also a bit weak, but fractionally the variation of temperature is actually relatively small.

The total energy radiated by the sun is \[\begin{align} P_{\odot} &= \sigma_B T_{\odot}^4 4\pi R_{\odot}^2 \end{align}\] Now, the fraction \(f\) of that power that is absorbed by the Earth is given by \[\begin{align} f &= \frac{\text{cross-sectional area of earth}}{\text{area of sphere with Earth's orbit}} \\ &= \frac{\pi R_E^2}{4\pi AU^2} \end{align}\] Okay, now we just need the energy radiated by the earth: \[\begin{align} P_E &= \sigma_B T_{E}^4 4\pi R_{E}^2 \end{align}\] Setting the energy absorbed by the earth to the energy radiated by the earth gives \[\begin{align} \frac{\pi R_E^2}{4\pi AU^2}\cancel{\sigma_B} T_{\odot}^4 \bcancel{4\pi} R_{\odot}^2 &= \cancel{\sigma_B} T_{E}^4 \bcancel{4\pi} R_{E}^2 \\ T_E^4 &= \frac{R_E^2}{4 AU^2} T_{\odot}^4\frac{R_{\odot}^2}{R_E^2} \\ &= \frac14 T_{\odot}^4\frac{R_{\odot}^2}{AU^2} \end{align}\] \[\begin{align} T_E &= \sqrt{\frac{R_{\odot}}{2 AU}}T_{\odot} \\ &= \sqrt{\frac{7\times 10^{10}\text{cm}}{3\times 10^{13}\text{cm}}}5800\text{K} \\ &\approx 280\text{K} \end{align}\]This is a bit cold, but when you consider the approxmations isn't a bad estimate of the Earth's temperature. This neglects the power from radioactivity, and also the greenhouse effect (which is a violation of the assumption that the absorption and emmission have the same proportion at all wavelengths).

**Pressure of thermal radiation**Okay, let's begin with the free energy from class: \[\begin{align} F &= 8\pi \frac{V(kT)^4}{h^3c^3} \int_0^\infty \ln\left(1-e^{-\xi}\right)\xi^2d\xi \end{align}\] Since this is proportional to volume, its derivative with respect to volume is really easy. \[\begin{align} p &= -8\pi \frac{(kT)^4}{h^3c^3} \int_0^\infty \ln\left(1-e^{-\xi}\right)\xi^2d\xi \end{align}\] Unfortunately, we've already done our summation over all the modes, so this didn't help us as much as we might have hoped for part (a). To get an expression in terms of the modes, we need to go back to the expression for free energy that had \(\sum_{n_x}\sum_{n_y}\sum_{n_z}\) and recognize that as a sum over modes. \[\begin{align} F &= kT\sum_j \ln\left(1 - e^{-\beta \hbar\omega_j}\right) \end{align}\] Now we can take our derivative and hope to get an expression involving photons in modes: \[\begin{align} p &= -\left(\frac{\partial F}{\partial V}\right)_T \\ &= -\cancel{kT}\sum_j \frac{- e^{-\beta \hbar\omega_j}}{1 - e^{-\beta \hbar\omega_j}} \left(-\cancel{\beta} \hbar\frac{d\omega_j}{dV}\right) \\ &= -\sum_j\frac{- e^{\beta \hbar\omega_j}}{1 - e^{-\beta \hbar\omega_j}} \hbar\frac{d\omega_j}{dV} \\ &= -\sum_j \langle n_j\rangle \hbar\frac{d\omega_j}{dV} \end{align}\]So yay. It worked out as we were told, which is also reasonably intuitive: the pressure is just the total pressure from all the photons.

Now we want to find the actual pressure, and relate it to the internal energy. We can do this two ways. One is to use the above expression for total pressure and compare with \(U\) from class. This is totally correct and fine. I'll use a different approach here, since it may be less obvious, and may give insight.

We'll take this expression we just found, and see how the mode frequencies change with volume. Recall from class that: \[\begin{align} \omega_{n_xn_yn_z} &= \frac{2\pi c}{L}\sqrt{n_x^2+n_y^2+n_z^2} \\ &= \frac{2\pi c}{\sqrt[3]{V}}\sqrt{n_x^2+n_y^2+n_z^2} \end{align}\] Thus we have that \[\begin{align} \frac{d\omega_{n_xn_yn_z}}{dV} &= -\frac13 \frac{\omega_{n_xn_yn_z}}{V} \end{align}\] Putting this into our pressure, we see that \[\begin{align} p &= -\sum_j \langle n_j\rangle \hbar\frac{d\omega_j}{dV} \\ &= -\sum_j \langle n_j\rangle\hbar \left(-\frac13 \frac{\omega_j}{V}\right) \\ &= \frac{1}{3V}\sum_j \langle n_j\rangle\hbar\omega_j \\ &= \frac{U}{3V} \end{align}\]which tells us that the pressure is one third of the internal energy per volume. You might want a dimension check: work (which is an energy) is \(dW = pdV\) which will remind you that pressure is energy per volume. If you have doubts, you could remind yourself that pressure is force per area, but force is energy per distance (going back to work from classical mechanics).

The factor of \(\frac13\) comes from the fact that we're in three dimensions, and the linear dispersion relation for light.

The middle plane is going to absorb the same rate of energy from the hot side that it gives to the cold side. The net transfer from hot to middle (per area) will be \[\begin{align} J_h &= \sigma_B(T_h^4 - T_m^4) \end{align}\] while the transfer from middle to cold will be \[\begin{align} J_c &= \sigma_B(T_m^4 - T_c^4) \end{align}\] Setting these equal tells us that \[\begin{align} T_h^4 - T_m^4 &= T_m^4 - T_c^4 \\ 2T_m^4 &= T_h^4 + T_c^4 \\ T_m &= \sqrt[4]{\frac{T_h^4 + T_c^4}{2}} \end{align}\] Now we can see that the power transfered per area is given by \[\begin{align} J_h &= \sigma_B(T_h^4 - T_m^4) \\ &= \sigma_B(T_h^4 - \frac{T_h^4 + T_c^4}{2}) \\ &= \sigma_B\frac{T_h^4 - T_c^4}{2} \end{align}\]**Heat shields**which is precisely \(\frac12\) of the power that would have been transfered without the heat shield.

## Solution for week 5

First we need the**Centrifuge**The key concept here is to recognize that when working with a rotating system such as a centrifuge, there is classically a centrifugal potential energy. This energy serves as the external chemical potential, and allows us to solve for the properties of the gas by setting the total chemical potential equal everywhere, and solving for the internal chemical potential, which we can relate to the concentration.**centrifugal potential**. You may remember this from Central Forces, but you can also solve for it if you remember how to derive the centripetal acceleration. This comes from the second derivative of the displacement of an object moving in a circle. \[\begin{align} \vec r(t) &= R\cos(\omega t)\hat x + R\sin(\omega t)\hat y \\ \frac{d^2\vec r}{dt^2} &= -\omega^2 \vec r \\ &= \frac1{m} \vec F \end{align}\]So the centrifugal force is \(m\omega^2\vec r\) (which is

Now that we have a potential energy, we can find the internal chemical potential from the total: \[\begin{align} \mu_{tot} &= \mu_{int} - \frac12 m\omega^2 r^2 \mu_{int} &= \mu_{tot} + \frac12 m\omega^2 r^2 \end{align}\] Finally, we need to use the expression for the chemical potential of an ideal gas. \[\begin{align} \mu_{int} &= k_BT\ln\left(\frac{n}{n_Q}\right) \end{align}\] or alternatively \[\begin{align} n &= n_Q e^{\beta \mu_{int}} \end{align}\] Now we can just plug in our \(\mu_{int}(r)\) to find \(n(r)\): \[\begin{align} n(r) &= n_Q e^{\beta (\mu_{tot} + \frac12 m\omega^2 r^2)} \end{align}\] We were asked to find the ratio between \(n(r)\) and \(n(0)\) in order to avoid having to solve for \(\mu_{tot}\) or to specify something banal like the total number of molecules. \[\begin{align} \frac{n(r)}{n(0)} &= \frac{n_Q e^{\beta (\mu_{tot} + \frac12 m\omega^2 r^2)}}{n_Q e^{\beta\mu_{tot}}} \\ &= e^{\beta \frac12 m\omega^2 r^2} \end{align}\]*outward*, opposite the centripetal force). The centrifugal work is the integral of the centrifugal force, which gives us a**centrifugal potential energy**that is \(V = -\frac12 m\omega^2 r^2\). The potential is negative because the force is outwards.As you would expect, the density is higher at larger radii, since the centrifugal force compresses atoms near the edge.

**Potential energy of gas in gravitational field**We can begin by writing down (from class notes) the expression for the (internal) chemical potential of an ideal gas. \[\begin{align} n &= n_Q e^{\beta \mu_{int}} \end{align}\] In this case the external potential is linear \[\begin{align} \mu_{ext} &= Mgh \end{align}\] The internal chemical potential is the total minus the external, telling us that \[\begin{align} n(h) &= n_Q e^{\beta (\mu_{tot} - Mgh)} \\ &= n(0)e^{-\beta Mgh} \end{align}\] We can find the average potential energy by finding the*total*potential energy and dividing by the number of atoms. \[\begin{align} \langle V\rangle &= \frac{\int Mgh n(h) dh}{\int n(h) dh} \\ &= Mg \frac{\int_0^\infty h e^{-\beta Mgh} dh}{\int_0^\infty e^{-\beta Mgh} dh} \\ &= \frac{Mg}{\beta Mg} \frac{\int_0^\infty \xi e^{-\xi} d\xi}{\int_0^\infty e^{-\xi} d\xi} \\ &= kT \frac{1!}{0!} \\ &= kT \end{align}\]So that is interesting, our potential energy per atom is just \(kT\), as if we had

*two*degrees of freedom according to equipartition (which we don't). In this case, the equipartition theorem doesn't apply, because the potential is not quadratic.- My favorite integral
- I'll just mention that I used here (twice!) my very favorite definite integral: \[\begin{align} \int_0^\infty u^ne^{-u}du &= n! \end{align}\] You can prove this using integration by parts a few times, if need be. But it's really handy to remember this. It comes up very often when working on the hydrogen atom, for instance. And yes, I learned this from an integral table.

**Active transport**The question here is to find \(\Delta \mu_{int}\) across the cell membrane. This must be equal and opposite to \(\Delta\mu_{ext}\), where the external chemical potential will be the electrostatic potential across the cell wall. We are given that \[\begin{align} n_{\text{inside}} &= 10^4 n_{\text{outside}} \\ \frac{n_{\text{inside}}}{n_{\text{outside}}} &= 10^4 \\ &= \frac{n_Q e^{\beta\mu_{int,\text{inside}}}}{ n_Q e^{\beta\mu_{int,\text{outside}}} } \\ &= e^{\beta\Delta\mu_{int}} \\ \Delta\mu_{int} &= kT\ln\left(10^4\right) \end{align}\] At this point it is convenient to know that at room temperature \(kT\approx \frac1{40}\text{eV}\). Of course, you could do this in any unit system you are comfortable with. \[\begin{align} \Delta\mu_{int} &= \frac1{40}\ln\left(10^4\right)\text{eV} \approx 0.23 \text{eV} \end{align}\]Getting the sign right is a different story. What we found was \(\mu_{int,\text{inside}} - \mu_{int,\text{outside}}\). The voltage we are considering would be the external chemical potential, which would swap the sign, suggesting the outside should be at a higher electrostatic potential than the inside. More accurately, the cells are actively pumping \(\text{K}^+\) into the cell.

- Geeky anecdote
- When I was an undergrad, I went through a phase in which I attempted to become familiar with everyday temperatures in electron volts. "It's a balmy 25.8 millielectron volts today, but in the library it's a chilly 24.9 millielectron volts."

**Gibbs sum for a two level system**Okay, we have three microstates, which I'll call \(0\), \(1\), and \(2\) \[\begin{align} N_0 &= 0 \\ N_1 &= N_2 = 1 \\ E_0 &= E_1 = 0 \\ E_2 &= \epsilon \end{align}\] Now we remind ourselves that the activity \(\lambda\) is defined by \[\begin{align} \lambda &\equiv e^{\beta\mu} \end{align}\]- The Gibbs sum is just \[\begin{align} \mathcal{Z} &= \sum_i e^{-\beta(E_i-\mu N_i)} \\ &= \sum_i e^{\beta(\mu N_i - E_i)} \\ &= \sum_i \lambda^{N_i}e^{-\beta E_i} \\ &= 1 + \lambda + \lambda e^{-\beta \epsilon} \end{align}\]
- The average occupancy of the system is given by \[\begin{align} \langle N\rangle &= \sum_i P_i N_i \\ &= \sum_i N_i \frac{\lambda^{N_i} e^{-\beta E_i}}{\mathcal{Z}} \\ &= \frac{\lambda + \lambda e^{-\beta \epsilon}}{1 + \lambda + \lambda e^{-\beta \epsilon}} \end{align}\]
- This is just the probability of the state being at energy \(\epsilon\), which is \[\begin{align} P_i &= \frac{e^{-\beta(E_i-\mu N_i)}}{\mathcal{Z}} \\ P_\epsilon &= \frac{\lambda e^{-\beta\epsilon}}{\mathcal{Z}} \end{align}\] The average number in this state is equal to the probability.
- The thermal average energy is even easier, since the energies are zero and \(\epsilon\), the average is just probability of energy \(\epsilon\) times \(\epsilon\). \[\begin{align} \langle E\rangle &= \frac{\lambda e^{-\beta\epsilon}}{\mathcal{Z}}\epsilon \end{align}\]
- Now we're adding one more microstate to the system, which is a microstate with \(E=\epsilon\) and \(N=2\). Our Gibbs sum will just have this one additional term in it. \[\begin{align} \mathcal{Z} &= \sum_i \lambda^{N_i}e^{-\beta E_i} \\ &= 1 + \lambda + \lambda e^{-\beta \epsilon} + \lambda^2 e^{-\beta \epsilon} \\ &= (1 + \lambda)(1 + \lambda e^{-\beta \epsilon}) \end{align}\] The separation now comes about because we can now separate the first orbital from the second, and the energy and number are both the sum of value for the first orbital plus the value for the second orbital.

**Carbon monoxide poisoning**The main idea here is that because the oxygen and carbon monoxide are in equilibrium with air, we can determine the activities (or equivalent chemical potential) of the molecules from the air.- We are looking for probabilities of occupancy, so as usual let's start with a Gibbs sum. Right now we only have oxygen, so \[\begin{align} \mathcal{Z} &= 1 + \lambda_{\text{O}_2}e^{-\beta\varepsilon_A} \\ P_{\text{O}_2} &= \frac{ \lambda_{\text{O}_2}e^{-\beta\varepsilon_A} }{ 1 + \lambda_{\text{O}_2}e^{-\beta\varepsilon_A} } \\ &= \frac{ 1 }{ 1 + e^{\beta\varepsilon_A}/\lambda_{\text{O}_2} } \end{align}\] We are working to solve for \(\varepsilon_A\) here... \[\begin{align} \frac{1}{P_{\text{O}_2}} &= 1 + e^{\beta\varepsilon_A}/\lambda_{\text{O}_2} \\ e^{\beta\varepsilon_A} &= \lambda_{\text{O}_2}\left(\frac{1}{P_{\text{O}_2}} - 1\right) \\ \varepsilon_A &= kT\ln\left(\lambda_{\text{O}_2}\left(\frac{1}{P_{\text{O}_2}} - 1\right)\right) \\ &= 26.7\text{meV}\ln\left(10^{-5}\left(\frac{1}{0.9}-1\right)\right) \\ &= 26.7\text{meV}\times -13.7 \\ &= -366\text{meV} \end{align}\] where I used \(k_B = 8.617\times 10^{-2}\text{meV K}^{-1}\) and body temperature is \(T=310.15\)K to find \(kT\) in \(\text{meV}\). This binding energy is quite high, more than a third of an \(\text{eV}\)! Covalent bonds tend to be a few \(\text{eV}\) in strength, but they don't reverse without significant effort, whereas it's really important for oxygen to spontaneously unbind from hemoglobin.
- When we add in carbon monoxide, our hemoglobin will have three possible states, so it will look a heck of a lot like our last homework problem. \[\begin{align} \mathcal{Z} &= 1 + \lambda_{\text{O}_2}e^{-\beta\varepsilon_A} + \lambda_{\text{CO}}e^{-\beta\varepsilon_B} \end{align}\] We are now asking how strongly carbon monxide has to bind in order to allow only 10% of the hemoglobin to be occupied by oxygen. So we are again going to be looking at the probability of oxygen occupying the hemoglobin \[\begin{align} P_{\text{O}_2} &= \frac{ \lambda_{\text{O}_2}e^{-\beta\varepsilon_A} }{ 1 + \lambda_{\text{O}_2}e^{-\beta\varepsilon_A} + \lambda_{\text{CO}}e^{-\beta\varepsilon_B} } \end{align}\] We are looking to isolate \(\varepsilon_B\) now, since we are told everything else. \[\begin{align} 1 + \lambda_{\text{O}_2}e^{-\beta\varepsilon_A} + \lambda_{\text{CO}}e^{-\beta\varepsilon_B} &= \frac{\lambda_{\text{O}_2}}{P_{\text{O}_2}}e^{-\beta\varepsilon_A} \end{align}\] And moving everything to one side gives \[\begin{align} \lambda_{\text{CO}}e^{-\beta\varepsilon_B} &= \lambda_{\text{O}_2}\left(\frac{1}{P_{\text{O}_2}}-1\right)e^{-\beta\varepsilon_A} -1 \\ e^{-\beta\varepsilon_B} &= \frac{\lambda_{\text{O}_2}}{\lambda_{\text{CO}}} \left(\frac{1}{P_{\text{O}_2}}-1\right)e^{-\beta\varepsilon_A} -\frac1{\lambda_{\text{CO}}} \end{align}\] and at long last \[\begin{align} \varepsilon_B &= -kT\ln\left( \frac{\lambda_{\text{O}_2}}{\lambda_{\text{CO}}} \left(\frac{1}{P_{\text{O}_2}}-1\right)e^{-\beta\varepsilon_A} -\frac1{\lambda_{\text{CO}}} \right) \\ &= -26.7\text{meV}\ln\left(10^2\times 9 e^{13.7} - 10^{7} \right) \\ &= -26.7\text{meV}\ln 7.9\times 10^8 \\ &= -26.7\text{meV}\times 20.5 \\ &= -547\text{meV} \end{align}\] So the carbon monoxide doesn't need to be much favored over oxygen energetically (in terms of ratio) in order to crowd out almost all the oxygen, even though there is way less carbon monoxide available. Of course, it is not ratios of energies that matter here, so much as energy differences, ant that is about \(7kT\), which is hardly a small difference.

## Solution for week 6

**Derivative of Fermi-Dirac function**This just comes down to math on the Fermi function. I'm going to use Newton's notation for the derivative (which I rarely use) because it makes it a bit easier to specify at which value we are evaluating the derivative: \[\begin{align} f(\varepsilon) &\equiv \frac1{1+e^{-\beta(\varepsilon-\mu)}} \\ f'(\varepsilon) &= -\frac1{\left(1+e^{-\beta(\varepsilon-\mu)}\right)^2} e^{-\beta(\varepsilon-\mu)} (-\beta) \\&= \frac1{kT}\frac{e^{-\beta(\varepsilon-\mu)}}{\left(1+e^{-\beta(\varepsilon-\mu)}\right)^2} \end{align}\] Now I will plug in to find \(f'(\mu)\): \[\begin{align} f'(\mu) &= \frac1{kT}\frac{e^{-\beta(\mu-\mu)}}{\left(1+e^{-\beta(\mu-\mu)}\right)^2} \\ &= \frac1{kT}\frac{1}{\left(1+1\right)^2} \\ &= \frac1{4kT} \end{align}\]**Symmetry of filled and vacant orbitals**We are interested in \(f(\mu\pm\delta)\), so I'll start by just handling both versions at the same time. \[\begin{align} f(\mu\pm\delta) &= \frac1{1+e^{-\beta((\mu\pm\delta)-\mu)}} \\ &= \frac1{1+e^{-\beta(\pm \delta)}} \\ &= \frac1{1+e^{\mp\beta\delta}} \end{align}\] So we can see that these two things look pretty similar, but they don't look like they should add to one. To show that, I'll add the two together and then use the old multiply-top-and-bottom trick. \[\begin{align} f(\mu-\delta) + f(\mu+\delta) &= \frac1{1+e^{\beta\delta}} + \frac1{1+e^{-\beta\delta}} \\ &= \frac1{1+e^{\beta\delta}} + \frac1{1+e^{-\beta\delta}}\frac{e^{\beta\delta}}{e^{\beta\delta}} \\ &= \frac1{1+e^{\beta\delta}} + \frac{e^{\beta\delta}}{e^{\beta\delta} + 1} \\ &= \frac{1+e^{\beta\delta}}{1+e^{\beta\delta}} \\ &= 1 \end{align}\]We could subtract to get the form that Kittel has, but I think it is more intuitive to think of the two values as adding to one. Thus if one is high, the other must be low.

**Distribution function for double occupancy statistics**- This is much like we did in class for the fermions. We will solve for the Gibbs sum, and then for \(\langle N\rangle\). \[\begin{align} \mathcal{Z} &= 1 + e^{-\beta(\varepsilon-\mu)} + e^{-\beta(2\varepsilon-2\mu)} \\ &= 1 + e^{-\beta(\varepsilon-\mu)} + e^{-2\beta(\varepsilon-\mu)} \end{align}\] The occupancy is given by \[\begin{align} \langle N\rangle &= \frac{ 0\times1 + 1\times e^{-\beta(\varepsilon-\mu)} + 2\times e^{-2\beta(\varepsilon-\mu)} }{ 1 + e^{-\beta(\varepsilon-\mu)} + 2 e^{-2\beta(\varepsilon-\mu)} } \\ &= \frac{ e^{-\beta(\varepsilon-\mu)} + 2 e^{-2\beta(\varepsilon-\mu)} }{ 1 + e^{-\beta(\varepsilon-\mu)} + e^{-2\beta(\varepsilon-\mu)} } \\ &= \frac{ 1 + 2 e^{-\beta(\varepsilon-\mu)} }{ e^{\beta(\varepsilon-\mu)} +1 + e^{-\beta(\varepsilon-\mu)} } \end{align}\]
- If we have two fermion energy levels with the same energy \(\varepsilon\), the total occupancy of the two will just be the sum of their individual occupancies. \[\begin{align} \langle N\rangle &= f(\varepsilon) + f(\varepsilon) \\ &= \frac2{1+e^{\beta(E-\mu)}} \end{align}\] It's kind of hard to say how it differs from (a), they are so dissimilar. The low energy (\(\beta(\varepsilon-\mu)\ll -1\)) behavior has a different exponential scaling. At high temperatures (or equivalently, \(\varepsilon=\mu\)) both systems have a total occupancy of 1. At high energies, once again the "double-occupancy statistics" occupation has the same exponential behavior, but half as many occupants. This is because at high energies the "double occupied" state becomes irrelevant relative tot he "single occupied" state. In the Fermi-Dirac statistics, since they are different orbitals, each orbital contributes the same amount to the occupancy.

**Entropy of mixing**- We are considering two sets of atoms with same temperature and volume. Initially they are separate, and in the end, they will be equally mixed (according to intuition: mixed gasses don't unmix, and everything is equal). So we can just use the Sackur-Tetrode entropy for the two scenarios. The key idea that is not obvious here is that we can compute the entropy of each gas separately and add them together
*even when they are mixed!*We will call the initial volume \(V_0\), and the initial entropy \(S_0\). I'll define each gas to have a distinct \(n_{Q}\), since they presumably have different masses. I'll just use \(N\) for the number of each gas type. \[\begin{align} \frac{S_0}{Nk} &= \ln\left(n_{QA}\frac{V_0}{N}\right) + \frac52+ \ln\left(n_{QB}\frac{V_0}{N}\right) + \frac52 \\ &= \ln\left(n_{QA}n_{QB}\right) + 2\ln\left(\frac{V_0}{N}\right) + 5 \end{align}\] We can rewrite this to look like a single ideal gas with the geometric mean of the two \(n_Q\)s, with twice the volume and number: \[\begin{align} \frac{S_0}{2Nk} &= \ln\left(\sqrt{n_{QA}n_{QB}}\frac{V_0}{N}\right) + \frac52 \end{align}\] So the total*initial*entropy would be just twice the individual entropy if the two gasses had the same mass. We now seek the*final, mixed*entropy \(S_f\). For this, each gas will have a volume of \(2V_0\). \[\begin{align} \frac{S_0}{Nk} &= \ln\left(n_{QA}\frac{2V_0}{N}\right) + \frac52+ \ln\left(n_{QB}\frac{2V_0}{N}\right) + \frac52 \\ &= \ln\left(n_{QA}n_{QB}\frac{(2V_0)^2}{N}\right) + 5 \\ &= 2\ln\left(\sqrt{n_{QA}n_{QB}}\frac{2V_0}{N}\right) + 5 \\ &= 2\ln\left(\sqrt{n_{QA}n_{QB}}\frac{V_0}{N}\right) + 5 + 2\ln 2 \\ \frac{S_0}{2Nk} &= \ln\left(\sqrt{n_{QA}n_{QB}}\frac{V_0}{N}\right) + \frac52 + \ln 2 \end{align}\] The challenging step here is to explain why we can just treat each gas individually when they are mixed. One reason is that the two gasses don't interact, so we have separation of variables. Moreover, since they are different kinds of particles, they don't occupy the same orbitals (or you could say the overall wavefunction is just a product of the two individual wave functions \(A\) and \(B\)).

Another argument we could make would be a thought experiment. Suppose we had two boxes, one of which was entirely permeable to atoms \(A\), but held \(B\) in, and the other of which was entirely permeable to \(B\) but held in \(A\). With these boxes,

*without doing any work*, we could separate the mixed gasses into unmixed gasses, each with the same volume of \(2V_0\). Thus the mixed gasses must have the same free energy as two unmixed gasses with twice the volume. By this reasoning, what we are seeing is not the entropy of*mixing*, but rather the entropy of*expansion*. (But it is called entropy of mixing, so that is what we call it.)- We are considering two sets of atoms with same temperature and volume. Initially they are separate, and in the end, they will be equally mixed (according to intuition: mixed gasses don't unmix, and everything is equal). So we can just use the Sackur-Tetrode entropy for the two scenarios. The key idea that is not obvious here is that we can compute the entropy of each gas separately and add them together

- Now we consider a different final entropy, when the particles are identical. From our thermodynamic perspective, this
*should*have the same entropy as the two unmixed (but identical) gasses, just by the extensivity reasoning we always use. But it's worth seeing that happen mathematically. Note that we now have one gas with volume \(2V_0\) and number \(2N\). \[\begin{align} \frac{S_{AA}}{2Nk} &= \ln\left(n_{Q}\frac{2V_0}{2N}\right) + \frac52 \\ &= 2\ln\left(n_{Q}\frac{V_0}{N}\right) + 5 \end{align}\]This is the same as \(S_0\), provided the two \(n_Q\)s are the same.

The "Gibbs paradox" here is just that if you view this scenario classically (with no wavefunctions), it is not obvious why the behavior of distinguishable and indistinguishable objects should differ. If I have a bunch of billiard balls, writing numbers on them shouldn't affect the pressure they exert on the walls of a container, for instance. The resulution to the

*classical*paradox is to note that as long as the numbers you draw on the balls does not impact their behavior in an experiment, you will predict the same outcome for your experiment whether or not you view the particles as indistinguishable. True, they have a different entropy, but without quantum mechanics (which makes explicit the difference between indistinguishable and distinguishable particles in terms of the wave function) there is no absolute definition of entropy, since there is no unique way to count microstates. I would extract work from the system using a special wall separating the two boxes, which is permeable to \(A\) but not \(B\), and another wall that has the inverse permeability. One of these walls will feel a pressure to the right, but not the left, and the other will have the inverse pressure difference. We can then slowly move the two permeable walls apart from one another, and the pressure difference will do work. If we insulate the box, the temperature of the gas will drop due to the First Law (i.e. energy conservation). If we don't insulate the boxes (and go sufficiently slowly), we will cool the room a tiny bit as energy flows into the box through heating.

**Ideal gas in two dimensions**- This requires us to use the eigenstates of the 2D box. We can go ahead and use non-periodic boundary conditions, which gives single-particle energy eigenvalues of \[\begin{align} \varepsilon_{n_xn_y} &= \frac{\hbar^2}{2m}\frac{\pi^2}{L^2}\left(n_x^2+n_y^2\right) \end{align}\] where \(n_x\) goes from \(1\) to \(\infty\), since we have to fit a half-integer number of wavelengths in the box with side length \(L\). We can assume this is a low-density system in the classical limit, since it is described as an ideal gas. Thus we can say that the occupancy of each orbital will be \[\begin{align} f(\varepsilon) &= e^{-\beta(\varepsilon-\mu)} \end{align}\] Thus we can add up to find \(N\): \[\begin{align} N &= \sum_{n_x=1}^\infty\sum_{n_y=1}^\infty e^{-\beta\left(\varepsilon_{n_xn_y}-\mu\right)} \\&= \sum_{n_x=1}^\infty\sum_{n_y=1}^\infty e^{-\beta\left(\frac{\hbar^2}{2m}\frac{\pi^2}{L^2}\left(n_x^2+n_y^2\right)-\mu\right)} \\ N e^{-\beta\mu} &=\sum_{n_x=1}^\infty\sum_{n_y=1}^\infty e^{-\frac{\beta\hbar^2}{2m}\frac{\pi^2}{L^2}\left(n_x^2+n_y^2\right)} \\ &\approx \int_{0}^\infty\!\!\!\int_{0}^\infty e^{-\frac{\beta\hbar^2}{2m}\frac{\pi^2}{L^2}\left(n_x^2+n_y^2\right)} dn_xdn_y \end{align}\] Now let's do a change of variables into a dimensionless argument, and let's also change the limits to go down to \(-\infty\) and divide by a factor of 2 (per integral). \[\begin{align} N e^{-\beta\mu} &= \frac14\int_{-\infty}^\infty\int_{-\infty}^\infty e^{-\frac{\beta\hbar^2}{2m}\frac{\pi^2}{L^2}\left(n_x^2+n_y^2\right)} dn_xdn_y \end{align}\] At this point we want to do a subsititution that turns our integral into a dimensionless one. It's a little weird defining \(x\) and \(y\) as dimensionless coordinates, but it's compact and will naturally transition us into polar. \[\begin{align} x &= \sqrt{\frac{\beta\hbar^2\pi^2}{2mL^2}}n_x & y &= \sqrt{\frac{\beta\hbar^2\pi^2}{2mL^2}}n_y \end{align}\] This gives us in cartesian coordinates \[\begin{align} N e^{-\beta\mu} &= \frac14\frac{2mL^2}{\beta\hbar^2\pi^2} \iint e^{-(x^2+y^2)}dxdy \\ &= \frac{mL^2}{2\pi^2\beta\hbar^2} \iint e^{-(x^2+y^2)}dxdy \end{align}\] Now we could go into polar coordinates, or we could use the fact that we each of these two integrals gives \(\sqrt{\pi}\). I'll use the latter approach. \[\begin{align} N e^{-\beta\mu} &= \frac{mL^2}{2\pi\beta\hbar^2} \end{align}\] Now we can go about solving for the chemical potential: \[\begin{align} -\beta\mu &= \ln\left(\frac{A}{N}\frac{m}{2\pi\beta\hbar^2}\right) \\ \mu &= -kT\ln\left(\frac{A}{N}\frac{m}{2\pi\beta\hbar^2}\right) \\ &= kT\ln\left(\frac{N}{A}\frac{2\pi\beta\hbar^2}{m}\right) \end{align}\]
- There are a few ways we could solve for the internal energy of the 2D ideal gas. The one most suggested by this chapter would be to add up the probability of each orbital being occupied times the energy of that orbital.
\[\begin{align}
U &= \sum_{n_x=1}^\infty\sum_{n_y=1}^\infty
\varepsilon_{n_xn_y}
e^{-\beta\left(\varepsilon_{n_xn_y}-\mu\right)}
\end{align}\]
At this point we could recognize that there is a derivative trick we can do, since this sum looks so very similar to the sum for \(N\) we had earlier. (Note, this problem is also very much solvable by just doing the integral, which isn't much harder than the previous portion). We can see that
\[\begin{align}
\left(\frac{\partial N}{\partial \beta}\right)_{\mu}
&=
\sum_{n_x=1}^\infty\sum_{n_y=1}^\infty
(\mu-\varepsilon_{n_xn_y})
e^{-\beta\left(\varepsilon_{n_xn_y}-\mu\right)}
\\
&= \mu N - U
\end{align}\]
And thus that
\[\begin{align}
U &=
\mu N - \left(\frac{\partial N}{\partial\beta}\right)_{\mu}
\end{align}\]
Now we can use our expression for \(N\) from before to compute \(U\).
\[\begin{align}
N &= \frac{mA}{2\pi\beta\hbar^2} e^{\beta\mu}
\\
\left(\frac{\partial N}{\partial\beta}\right)_{\mu}
&= -\frac{mA}{2\pi\beta^2\hbar^2} e^{\beta\mu}
+ \frac{A}{\pi}\frac{\beta\hbar^2}{2\pi m} e^{\beta\mu}\mu
\\
&= -NkT +N\mu
\end{align}\]
Thus the internal energy is
\[\begin{align}
U &= \mu N - N(\mu-kT) \\
&= NkT
\end{align}\]
This matches with the equipartition expectation, which would be \(\frac12kT\) per degree of freedom, which in this case is two degrees of freedom per atom.

- The entropy of this system we can just add up the entropy of each orbital. This uses a perspective where we recognize each orbital as a separate non-interacting system, with only two eigenstates either occupied or unoccupied. The probability of being occupied is \(e^{-\beta(\varepsilon-\mu)}\), so the probability of not being occupied is \(1\) minus that.
\[\begin{align}
S_{\text{orbital}} &= -k\sum_i^{\text{all microstates of
orbital}} P_i\ln P_i
\\
&=
-ke^{-\beta(\varepsilon-\mu)}\ln\left(e^{-\beta(\varepsilon-\mu)}\right)
\notag\\& \quad
-k\left(1-e^{-\beta(\varepsilon-\mu)}\right)
\ln\left(1-e^{-\beta(\varepsilon-\mu)}\right)
\\
&= \frac1T(\varepsilon-\mu)e^{-\beta(\varepsilon-\mu)}
\notag\\& \quad
-k\left(1-e^{-\beta(\varepsilon-\mu)}\right)
\ln\left(1-e^{-\beta(\varepsilon-\mu)}\right)
\end{align}\]
Here we can use that in the classical limit the occupancy of every orbital is small. Thus the exponential is small, and we can approximate the log.
\[\begin{align}
S_{\text{orbital}} &\approx
\frac{\varepsilon-\mu}{T}e^{-\beta(\varepsilon-\mu)}
\notag\\& \quad
-k\left(1-e^{-\beta(\varepsilon-\mu)}\right)
\left(-e^{-\beta(\varepsilon-\mu)}\right)
\\
&\approx
\frac{\varepsilon-\mu}{T}e^{-\beta(\varepsilon-\mu)}
+ ke^{-\beta(\varepsilon-\mu)}
\\
&= \left(k + \frac{\varepsilon-\mu}{T}\right)e^{-\beta(\varepsilon-\mu)}
\end{align}\]
In the second approximation, I dropped the term that was proportional to the occupancy squared, since it was much smaller than the other terms. Now to find the total entropy, we can add up the entropy of all the orbitals.
\[\begin{align}
S &=
\sum_{n_x=1}^\infty\sum_{n_y=1}^\infty
\left(k + \frac{\varepsilon_{n_xn_y}-\mu}{T}\right)
e^{-\beta\left(\varepsilon_{n_xn_y}-\mu\right)}
\\
&= Nk + \frac{U}{T} - N\frac{\mu}{T}
\\
&= 2Nk - N\frac{\mu}{T}
\\
&= 2Nk - Nk\ln\left(\frac{N}{A}\frac{2\pi\beta\hbar^2}{m}\right)
\\
&=
Nk\left(\ln\left(\frac{A}{N}\frac{mkT}{2\pi\hbar^2}\right)
+2
\right)
\end{align}\]
This looks vaguely like the Sackur-Tetrode equation, but an number-per-area density rather than a volume density, and a \(2\) where there would otherwise be a \(\frac52\).

- Note
- You can also solve for the entropy by finding the free energy as we did in class, and then taking its derivative. That is almost certainly an easier approach.

**Ideal gas calculations**- The easy one is the second process: \(Q_2=0\), since the process is adiabatic. The first process, we could either use the change in entropy, the change in free energy, or we could integrate the work. In the latter two cases, we would also invoke the First Law, to argue that the work done to the system must equal the change in internal energy plus the energy added to it by heating. Let's just go with the \(\Delta S\) approach.
\[\begin{align}
\bar dQ &= TdS \\
Q &= \int TdS \\
&= T\int dS \\
&= T\Delta S
\\
&= NkT\left(
\ln\left(\frac{n_Q}{n_f}\right) + \cancel{\frac52}
-\ln\left(\frac{n_Q}{n_i}\right) - \cancel{\frac52}
\right)
\\ &=
NkT\ln\left(\frac{n_i}{n_f}\right)
\\ &=
NkT\ln 2
\end{align}\]
where in the last step I used the fact the the final density was \(\frac12\) of the initial density.

- Finding the temperature at the end of the second process requires finding the state with four times the original volume that has the same entropy as twice the original volume. The text finds a relationship between \(p\) and \(V\) for an adiabatic expansion involving \(pV^\gamma\), but knowing that result is less useful than deriving that result. We have at least two ways to derive this relationship. One would be to use the ideal gas law combined with the internal energy \(\frac32NkT\) and to make use of energy conservation. Since we have recently derived the Sackur-Tetrode equation for the entropy of an ideal gas, we may as well use that.
\[\begin{align}
S &= Nk\left(\ln\left(\frac{n_Q}{n}\right)+\frac52\right)
\end{align}\]
We just need to set the two entropies to be equal before and after expansion, keeping in mind that \(N\) doesn't change either.
\[\begin{align}
Nk\left(\ln\left(\frac{n_{Qi}}{n_i}\right)+\frac52\right)
&=
Nk\left(\ln\left(\frac{n_{Qf}}{n_f}\right)+\frac52\right)
\\
\frac{n_{Qi}V_i}{N} &= \frac{n_{Qf}V_f}{N}
\\
n_{Qi}V_i &= n_{Qf}V_f
\\
T_i^{\frac32}V_i &= T_f^{\frac32}V_f
\\
T_f &= 2^{-\frac23}T_i
\\
&\approx 189\text{K}
\end{align}\]
I'll note that you could have skipped a few steps in solving this. But once again, you

*really*need to always keep in mind tha \(n_Q\) depends on temperature! - The increase of entropy of a system in an irreversible process is the same as for a reversible process with the same starting and ending conditions. In this case, an irreversible expansion into vacuum will do no work (since it moves nothing other than the gas itself), which means that it will not change the internal energy (unless energy is transfered by heating). Since for a monatomic ideal gas \(U=\frac32NkT\), keeping the internal energy fixed means the temperature also remains fixed, there won't be any heating and the temperature will certainly stay fixed. Thus we can work out the change in entropy using the Sackur-Tetrode equation again.
\[\begin{align}
S_f-S_i &= Nk\ln\left(\frac{n_Q}{n_f}\right)
- Nk\ln\left(\frac{n_Q}{n_i}\right)
\\
&=
Nk\ln\left(\frac{n_i}{n_f}\right)
\\
&=
Nk\ln 2
\end{align}\]
We could also have obtained this by integrating \(\Delta S = \int \frac{dQ}{T}\) for a reversible isothermal expansion, as I think you did in Energy and Entropy.

- The easy one is the second process: \(Q_2=0\), since the process is adiabatic. The first process, we could either use the change in entropy, the change in free energy, or we could integrate the work. In the latter two cases, we would also invoke the First Law, to argue that the work done to the system must equal the change in internal energy plus the energy added to it by heating. Let's just go with the \(\Delta S\) approach.
\[\begin{align}
\bar dQ &= TdS \\
Q &= \int TdS \\
&= T\int dS \\
&= T\Delta S
\\
&= NkT\left(
\ln\left(\frac{n_Q}{n_f}\right) + \cancel{\frac52}
-\ln\left(\frac{n_Q}{n_i}\right) - \cancel{\frac52}
\right)
\\ &=
NkT\ln\left(\frac{n_i}{n_f}\right)
\\ &=
NkT\ln 2
\end{align}\]

## Solution for week 7

**Energy of a relativistic Fermi gas**There are a couple of ways you could go through this problem. One would be to just integrate to find the Fermi energy, and then to integrate to find the internal energy. It's not bad done that way. The other way, which I'll demonstrate, is to first solve for the density of states, and then use*that*to find the Fermi energy and \(U\). \[\begin{align} \mathcal{D}(\varepsilon) &= 2\left(\frac{L}{2\pi}\right)^3 \iiint_{-\infty}^\infty \delta(\varepsilon(k) - \varepsilon)d^3k \\ &= 2\left(\frac{L}{2\pi}\right)^3 \int_0^\infty \delta(\hbar ck - \varepsilon)4\pi k^2dk \end{align}\] Note that the factors of two above are for the spin degeneracy. Now changing variables to an energy: \[\begin{align} \epsilon &= \hbar ck & d\epsilon &= \hbar cdk \end{align}\] And we get \[\begin{align} \mathcal{D}(\varepsilon) &= 8\pi\left(\frac{L}{2\pi}\right)^3 \left(\frac1{\hbar c}\right)^3 \int_0^\infty \delta(\epsilon-\varepsilon)\epsilon^2 d\epsilon \\ &= 8\pi\left(\frac{L}{2\pi\hbar c}\right)^3\varepsilon^2 \\ &= \frac{V}{\pi^2\hbar^3c^3}\varepsilon^2 \end{align}\]- Solving for the Fermi energy comes down to solving for \(N\).
\[\begin{align}
N &= \int_0^{\varepsilon_F}
\mathcal{D}(\varepsilon)d\varepsilon \\
&=
\frac{V}{\pi^2\hbar^3c^3}\int_0^{\varepsilon_F}\varepsilon^2d\varepsilon
\\ &=
\frac{V}{\pi^2\hbar^3c^3}\frac13 \varepsilon_F^3
\\
\varepsilon_F &= \left(\frac{N}{V}
3\pi^2\hbar^3c^3\right)^{\frac13}
\\ &=
\left(3\pi^2n\right)^{\frac13}\hbar c
\end{align}\]
just as the problem says. The dimensions are energy because \(n^{\frac13}\) is inverse length, which when multiplied by \(c\) gives inverse time. \(\hbar\) is energy times time, so we get an energy as we expect.

- The internal energy at zero temperature (which is the total energy of the ground state) just requires us to just integrate the density of states time energy.
\[\begin{align}
U &= \int_0^{\varepsilon_F}
\mathcal{D}(\varepsilon)\varepsilon d\varepsilon
\\
&= \int_0^{\varepsilon_F}
\frac{V}{\pi^2\hbar^3c^3}\varepsilon^3
\varepsilon d\varepsilon
\\
&=
\frac{V}{\pi^2\hbar^3c^3}
\frac14 \varepsilon_F^4
\\
&=
\cancelto{N}{\left(\frac{V}{\pi^2\hbar^3c^3}
\frac13 \varepsilon_F^3\right)}\frac34 \varepsilon_F
\\
&= \frac34 N\varepsilon_F
\end{align}\]
The trickiest step was looking back at our previous expression for \(N\) to substitute.

- Solving for the Fermi energy comes down to solving for \(N\).
\[\begin{align}
N &= \int_0^{\varepsilon_F}
\mathcal{D}(\varepsilon)d\varepsilon \\
&=
\frac{V}{\pi^2\hbar^3c^3}\int_0^{\varepsilon_F}\varepsilon^2d\varepsilon
\\ &=
\frac{V}{\pi^2\hbar^3c^3}\frac13 \varepsilon_F^3
\\
\varepsilon_F &= \left(\frac{N}{V}
3\pi^2\hbar^3c^3\right)^{\frac13}
\\ &=
\left(3\pi^2n\right)^{\frac13}\hbar c
\end{align}\]
**Pressure and entropy of a degenerate Fermi gas**- As we saw before (when working with the radiation pressure of a vacuum?) the pressure is given by the thermal average value of the derivative of the energy eigenvalues. \[\begin{align} p &= -\left(\frac{\partial U}{\partial V}\right)_{S,N} \\ &= \sum_i^{\text{all microstates}} P_i \left(-\frac{\partial E_i}{\partial V}\right) \end{align}\] The usual challenge here is that fixed temperature is not the same thing as fixed entropy. In this case, when \(T=0\), we know that the probabilities are all predetermined (via the Fermi-Dirac distribution), and we can just take a simple derivative of the energy we derived in class.. \[\begin{align} U &= \frac35 N \varepsilon_F \\ &= \frac35 N \frac{\hbar^2}{2m}\left(3\pi^2\frac{N}{V}\right)^{\frac23} \\ p &= -\left(\frac{\partial U}{\partial V}\right)_{S,N} \\ &= \frac35 N \frac{\hbar^2}{2m}\left(3\pi^2\frac{N}{V}\right)^{\frac23}\frac23 \frac1{V} \\ &= \frac25 \frac{N}{V} \varepsilon_F \\ &= \frac15 \frac{\hbar^2}{m}3^{\frac23}\pi^{\frac43} \left(\frac{N}{V}\right)^{\frac53} \end{align}\] This agrees with the expression given in the problem itself, so yay.
- The entropy is a Fermi gas, when \(kT \ll \varepsilon_F\). We can start with the general form of entropy:
\[\begin{align}
S &= -k\sum_i^{\text{all }\mu\text{states}} P_i\ln P_i
\end{align}\]
We will begin by first finding the entropy of a single orbital, and then adding up the entropy of all the orbitals. One orbital has only two microstates, occupied and unoccupied, which correspondingly have probabilities \(f(\varepsilon)\) and \(1-f(\varepsilon)\). Before we go any farther, it is worth simplifying the latter.
\[\begin{align}
1-f &= 1 - \frac1{e^{\beta(\varepsilon-\mu)}+1}
\\
&=
\frac{e^{\beta(\varepsilon-\mu)}+1}{e^{\beta(\varepsilon-\mu)}+1}
- \frac1{e^{\beta(\varepsilon-\mu)}+1}
\\
&= \frac{e^{\beta(\varepsilon-\mu)}}{e^{\beta(\varepsilon-\mu)}+1}
\\
&= \frac1{e^{-\beta(\varepsilon-\mu)}+1}
\end{align}\]
The entropy corresponding to a single orbital, thus is
\[\begin{align}
S_{\text{orbital}} &= -k(f\ln f + (1-f)\ln(1-f)) \\
&= -k\bigg(
\frac1{e^{\beta(\epsilon-\mu)}+1}\ln\left(\frac1{e^{\beta(\epsilon-\mu)}+1}\right)
\notag\\&\quad\quad+
\frac1{e^{-\beta(\epsilon-\mu)}+1}\ln\left(\frac1{e^{-\beta(\epsilon-\mu)}+1}\right)
\bigg)
\\
&=
\frac{k}{e^{\beta(\epsilon-\mu)}+1}\ln\left(e^{\beta(\epsilon-\mu)}+1\right)
\notag\\&\quad\quad+
\frac{k}{e^{-\beta(\epsilon-\mu)}+1}\ln\left(e^{-\beta(\epsilon-\mu)}+1\right)
\end{align}\]
This is inherently symmetric as we change the sign of \(\varepsilon-\mu\), which makes sense given what we know about the Fermi-Dirac distribution. It is less obvious in this form that the entropy does the right thing when \(|\varepsilon-\mu|\gg kT\). We expect the entropy to go to zero in this case, and one term very obviously goes to zero, but the other requites a bit more thinking, which I'm not going to go into here.

Using this expression for the entropy of a single orbital, we can solve for the entropy of the whole gas. \[\begin{align} S &= \int_{0}^\infty \mathcal{D}(\varepsilon) S_{\text{orbital}}(\varepsilon)d\varepsilon \\ &\approx \mathcal{D}(\varepsilon_F)\int_{-\infty}^\infty S_{\text{orbital}}(\varepsilon)d\varepsilon \\ &= \mathcal{D}(\varepsilon_F) \int_{-\infty}^\infty \bigg( \frac{k}{e^{\beta(\epsilon-\mu)}+1}\ln\left(e^{\beta(\epsilon-\mu)}+1\right) \notag\\&\quad\quad+ \frac{k}{e^{-\beta(\epsilon-\mu)}+1}\ln\left(e^{-\beta(\epsilon-\mu)}+1\right) \bigg) d\varepsilon \end{align}\] This looks nasty, but we can make it dimensionless, and it'll just be a number! \[\begin{align} \xi &= \beta(\varepsilon-\mu) & d\xi &= \beta d\varepsilon \end{align}\] which gives us \[\begin{align} S &= \mathcal{D}(\varepsilon_F)k^2T \notag\\&\quad \int_{-\infty}^\infty \bigg( \frac{\ln\left(e^{\xi}+1\right)}{e^{\xi}+1} +\frac{\ln\left(e^{-\xi}+1\right)}{e^{-\xi}+1} \bigg) d\varepsilon \end{align}\]Now the last bit is just a number, which happens to be finite.

**White dwarf**- Showing that something is a given order of magnitude can be both tricky and confusing. The potential energy is exactly given by
\[\begin{align}
U &= -\frac12\int d^3r\int d^3r' \frac{G\rho(\vec r)\rho(\vec
r')}{|\vec r-\vec r'|}
\end{align}\]
as you learned in static fields, where \(\rho(\vec r)\) is the mass density. Unfortunately, we don't know what the mass density is as a function of position, or how that function depends on the mass of the white dwarf.

An adequate if not satisfying set of reasoning is to say that the integral above must scale as \(M^2\), since increasing \(M\) will either increase \(\rho\) or increase the volume over which the mass is spread. The denominator \(|\vec r-\vec r'|\) is going to*on average*scale as the radius \(R\). Thus it makes sense that the potential energy would be about \(\sim -\frac{GM^2}{R}\). Another approach here would have been to use dimensional analysis to argue that the energy must be this. Alternatively, you could have assumed a uniform mass density, and then argued that the actual energy must be of a similar order of magnitude. - The kinetic energy of the electrons is the \(U\) of the Fermi gas, which in class we showed to be \[\begin{align} KE &\sim N\varepsilon_F \\ &\sim N \frac{\hbar^2}{2m}\left(\frac{N}{V}\right)^{\frac23} \\ &\sim \frac{\hbar^2N^{\frac53}}{mR^2} \end{align}\] where \(m\) is the mass of the electron. Then we can reason that the number of electrons is equal to the number of protons, and if the star is made of hydrogen the total mass of the star is equal to the total mass of its protons. \[\begin{align} N &\approx \frac{M}{M_H} \\ KE &\sim \frac{\hbar^2}{m}\frac{M^{\frac53}}{M_H^{\frac53}} \frac1{R^2} \end{align}\]
At this stage is is worth motivating the virial theorem from mechanics, which basically says that the magnitude of the average potential energy of a bound system (which is bound by a power law force) is about the same as the average of its kinetic energy. This makes sense in that the

All right, so \[\begin{align} \frac{GM^2}R &\sim \frac{\hbar^2}{m}\frac{M^{\frac53}}{M_H^{\frac53}}\frac1{R^2} \\ M^{\frac13}R &\sim \frac{\hbar^2}{mM_H^{\frac53}G} \end{align}\] At this point we just need to plug in numbers.*thing*that is holding a bound state together is the potential energy, while the thing that is pulling it apart is the kinetic energy. If they aren't in balance, then something weird must be going on. BTW, this virial theorem also applies quite well to the quantum mechanical hydrogen atom.- Again we need to plug in numbers. \[\begin{align} M^{\frac13}R &\sim \frac{\hbar^2}{mM_H^{\frac53}G} \\ R^3 &\sim \left(\frac{\hbar^2}{mM_H^{\frac53}G}\right)^3\frac1{M} \\ \rho &= \frac{M}{\frac{4\pi}{3}R^3} \\ &\sim M^2\left(\frac{\hbar^2}{mM_H^{\frac53}G}\right)^3 \end{align}\] Plug in numbers.
- All that changes is that our degenerate gas has mass \(M_N\approx M_H\), and our total mass is now \(M=NM_N\approx NM_H\).
\[\begin{align}
\frac{GM^2}{R} &\sim \frac{\hbar^2 M^{\frac53}}{M_H M_H^{\frac53}}
\\
M^{\frac13}R &\sim \frac{\hbar^2}{M_H^{\frac83}G}
\\
R &\sim \frac{\hbar^2}{M^{\frac13}M_H^{\frac83}G}
\end{align}\]
Plug in numbers to find the neutron star radius in kilometers when its mass is one solar mass.
\[\begin{align}
R &\sim \frac{\left(10^{-27}\frac{\text{g cm}^2}{
\text{s}}\right)^2}{\left(10^{33}\text{g}\right)^{\frac13}
\left(10^{-24}\text{g}\right)^{\frac83}
\left(10^{-7}\frac{\text{cm}^3}{\text{g s}^2}\right)}
\\
&\sim 10^{6}\text{cm} \sim 10 \text{km}
\end{align}\]
That's what I call a small-town star!

- Showing that something is a given order of magnitude can be both tricky and confusing. The potential energy is exactly given by
\[\begin{align}
U &= -\frac12\int d^3r\int d^3r' \frac{G\rho(\vec r)\rho(\vec
r')}{|\vec r-\vec r'|}
\end{align}\]
**Fluctuations in the Fermi gas**We are looking here at a single orbital, and asking what is the variance of the occupancy number. \[\begin{align} \left<(\Delta N)^2\right> &= \left<(N - \left<N\right>)^2\right> \\ &= \sum_i P_i (N_i - \left<N\right>)^2 \end{align}\] Now this single orbital has only two possible states: occupied and unoccupied! So we can write this down pretty quickly, using the probability of those two states, which are \(f\) and \(1-f\). We also note that \(\left<N\right>=f\), so we're going to have \(f\) all over the place. \[\begin{align} \left<(\Delta N)^2\right> &= P_1 (1-f)^2 + P_0 (0-f)^2 \\ &= f(1+\cancel{f^2}-2f) + (1-\cancel{f})f^2 \\ &= f-f^2 \\ &= \left<N\right>(1-\left<N\right>) \end{align}\]This tells us that there is no variation in occupancy when the occupancy reaches \(0\) or \(1\). In retrostpect that is obvious. If there is definitely an electron there, then we aren't uncertain about whether there is an electron there.

**Einstein condensation temperature**I'm going to be sloppier on this solution, because this is done in the textbook, and I'm still quite sick. The idea is to set the chemical potential to \(0\), which is its maximum value and integrate to find the number of atoms not in the ground state, \(N_E\), which is normally essentially equal to the number of atoms total. \[\begin{align} N_E &= \int_0^\infty \mathcal{D}(\varepsilon)f(\varepsilon)d\varepsilon \\ &= \frac{V}{4\pi^2}\left(\frac{2M}{\hbar^2}\right)^{\frac32} \int_0^\infty\varepsilon^{\frac12}\frac1{e^{\beta\varepsilon}-1}d\varepsilon \end{align}\] Naturally at this stage we will want to use a change of variables to take the physics out of the integral as we typically do. \[\begin{align} N_E &= \frac{V}{4\pi^2}\left(\frac{2M}{\hbar^2}\right)^{\frac32}(kT)^{\frac32} \int_0^\infty\frac{\sqrt{\xi}}{e^\xi-1}d\xi \end{align}\] Now we can simply solve for \(T_E\). \[\begin{align} T_E &= \frac1{k_B} \frac{\hbar^2}{2M} \left( \frac{N}{V} \frac{4\pi^2}{\int_0^\infty\frac{\sqrt{\xi}}{e^\xi-1}d\xi} \right)^{\frac23} \end{align}\]

## Solution for week 8

**Heat pump**- To approach this, I'll essentially do a quick re-derivation of the Carnot efficiency, based around the idea that the process is reversible. Since it is a cycle, the state of the system doesn't change, only that of the environment. The hot side in this case gets hotter, while the cool side gets cooler, and the entropy change of each must be equal and opposite.
\[\begin{align}
\Delta S_H &= \frac{Q_H}{T_H} \\
\Delta S_C &= -\frac{Q_C}{T_C} \\
\Delta S_H + \Delta S_C &= 0 \\
\frac{Q_H}{T_H} &= \frac{Q_C}{T_C} \\
\frac{T_C}{T_H} &= \frac{Q_C}{Q_H}
\end{align}\]
Note that I'm defining all heats and works to be positive, and taking their direction innto account (which explains the minus sign in \(\Delta S_C\). Now to find the amount of work we had to do, we just need to use energy conservation (i.e. the First Law). The energy
*inputs*to the heat pump are our work \(W\) and the heat from the cool side \(Q_C\). The energy output is just \(Q_H\). \[\begin{align} W + Q_C &= Q_H \\ \frac{W}{Q_H} &= 1 - \frac{Q_C}{Q_H} \\ &= 1 - \frac{T_C}{T_H} \end{align}\]which is just the Carnot efficiency, as predicted. Note however, that in this case this efficiency is not "what we get out divided by what we put in," but rather the inverse of that. So in this case, when \(T_C\ll T_H\), we have a very

*inefficient*heat pump, since we hardly get any "free" energy.If the heat pump is not reversible, as always, things look worse, we will need more work to get the same amount of heating. Note here that there are two possible interpretations of the word "reversible". What is meant in the question is that the entropy of the pump and its surroundings doesn't change. From a practical perspective a heat pump may be described as "reversible" when it can also function as an air conditioner in the summer (as most do).

- Now we have an engine driving a heat pump. The work output from the engine must equal the work input of the pump. We can recall from class (or reproduce with reasoning like that above) that
\[\begin{align}
\frac{W}{Q_{HH}} &= 1 - \frac{T_C}{T_{HH}}
\end{align}\]
Now we just need to eliminate the work to find how much heat input at the very high temperature \(Q_{HH}\) we need in order to get a given amount of heat in our home \(Q_H\).
\[\begin{align}
\frac{\frac{W}{Q_H}}{\frac{W}{Q_{HH}}}
&= \frac{1 - \frac{T_C}{T_{H}}}{1 - \frac{T_C}{T_{HH}}}
\\
\frac{Q_{HH}}{Q_H} &= \frac{T_{HH}}{T_H}\frac{T_H-T_C}{T_{HH}-T_C}
\end{align}\]
For the three temperatures requested, this comes out to
\[\begin{align}
\frac{Q_{HH}}{Q_H} &= \frac{600}{300}\frac{300-270}{600-270}
\\
&= 2\frac{30}{330}
\\
&= \frac2{11}
\\ &\approx .18
\end{align}\]
So you save about a factor of five in fuel by not just burning it in your home to heat it, but instead using it to power a heat pump. Yay. And this is with it freezing outside, and uncomfortably warm inside!

Here is a pretty picture illustrating where the energy and entropy come and go. The heats all came from the above computations, while the entropies came from dividing each heat by its temperature. For the energy plot I made a distinction between the heat added or removed by the heat pump (left) and the engine (right). For the entorpy plot I just lumped those together.

- To approach this, I'll essentially do a quick re-derivation of the Carnot efficiency, based around the idea that the process is reversible. Since it is a cycle, the state of the system doesn't change, only that of the environment. The hot side in this case gets hotter, while the cool side gets cooler, and the entropy change of each must be equal and opposite.
\[\begin{align}
\Delta S_H &= \frac{Q_H}{T_H} \\
\Delta S_C &= -\frac{Q_C}{T_C} \\
\Delta S_H + \Delta S_C &= 0 \\
\frac{Q_H}{T_H} &= \frac{Q_C}{T_C} \\
\frac{T_C}{T_H} &= \frac{Q_C}{Q_H}
\end{align}\]
Note that I'm defining all heats and works to be positive, and taking their direction innto account (which explains the minus sign in \(\Delta S_C\). Now to find the amount of work we had to do, we just need to use energy conservation (i.e. the First Law). The energy
**Photon Carnot engine**- The engine starts at \(T_H\) and \(V_1\) and first expands isothermally to \(V_2\). Then is expands adiabatically to \(T_C\) and \(V_3\). Next is is compressed at fixed temperature to \(V_4\), from which it expands adiabatically to \(V_1\). So we can identify \(V_3\) and \(V_4\) as the two volumes that have the same entropy at \(T_C\) as \(V_2\) and \(V_1\) have at \(T_H\). \[\begin{align} S_3 &= S_2 \\ 32\pi k V_3\left(\frac{kT_C}{hc}\right)^3\frac{\pi^4}{45} &= 32\pi k V_2\left(\frac{kT_H}{hc}\right)^3\frac{\pi^4}{45} \\ V_3T_C^3 &= V_2T_H^3 \\ V_3 &= V_2\left(\frac{T_H}{T_C}\right)^3 \\ V_4 &= V_1\left(\frac{T_H}{T_C}\right)^3 \end{align}\]
- Now we
*could*integrate to find the work, but the easy approach is to find the heat from \(T_H\Delta S\), and then use the First Law to find the work. \[\begin{align} Q_H &= \int TdS \\ &= T_H \Delta S \\ &= kT_H 32\pi (V_2-V1)\left(\frac{kT_H}{hc}\right)^3\frac{\pi^4}{45} \\ &= 32\pi (V_2-V1)\frac{(kT_H)^4}{h^3c^3}\frac{\pi^4}{45} \end{align}\] Now using the First Law... \[\begin{align} \Delta U &= Q_H + W_H \\ 24\pi \frac{(kT_H)^4}{h^3c^3}\frac{\pi^4}{45}(V_2-V_1) &= 32\pi (V_2-V1)\frac{(kT_H)^4}{h^3c^3}\frac{\pi^4}{45} + W_H \\ W_H &= -8\pi\frac{(kT_H)^4}{h^3c^3}\frac{\pi^4}{45} (V_2-V1) \end{align}\] This tells us that the photon gas does work as it expands, like the ideal gas does, but unlike the ideal gas, the work done is considerably less than the heat absorbed by the gas, since its internal energy increases significantly. - To find the work on each adiabatic stage just requires finding \(\Delta U\), since \(Q=0\) for any isentropic (or adiabatic) process. The first adiabatic stage goes from \(V_2\) to \(V_3\) while the temperature changes from \(T_H\) to \(T_C\). The internal energy change is thus
\[\begin{align}
\Delta U_{32} &= W_2 \\&=
24\pi \frac{k^4}{h^3c^3}\frac{\pi^4}{45}
\left(V_3T_C^4 - V_2T_H^4\right)
\\ &=
24\pi \frac{k^4}{h^3c^3}\frac{\pi^4}{45}
\left(V_2\left(\frac{T_H}{T_C}\right)^3T_C^4 - V_2T_H^4\right)
\\ &=
24\pi \frac{k^4}{h^3c^3}\frac{\pi^4}{45}
V_2T_H^3\left(T_C - T_H\right)
\end{align}\]
So the system is losing energy (thus doing work) as we adiabatically expand it down to lower temperature. At the other end, going from \(V_4\) and \(T_C\) to \(V_1\) and \(T_H\), we have
\[\begin{align}
\Delta U_{14} &= W_4 \\ &=
24\pi \frac{k^4}{h^3c^3}\frac{\pi^4}{45}
\left(V_1T_H^4 - V_4T_C^4\right)
\\ &=
24\pi \frac{k^4}{h^3c^3}\frac{\pi^4}{45}
\left(V_1T_H^4 - V_1\frac{T_H^3}{\cancel{T_C^3}}T_H^{\cancel{4}}\right)
\\ &=
24\pi \frac{k^4}{h^3c^3}\frac{\pi^4}{45}
V_1T_H^3\left(T_H - T_C\right)
\end{align}\]
So as normal we do work while compressing the photon gas adiabatically. However, the amount of work in this case is
*not*equal and opposite to the amount of work done when the gas was adiabatically expanded. This is because \(V_1\ne V_2\), which causes the internal energies to be different in the two cases. The ideal gas is unique in that its energy is independent of its density. - For the total work, I will add up all four little works. It's a little annoying to do it this way, because I could have just used energy conservation and the fact that my system is a cycle to say that the total work must be equal and opposite to the total heat. I'm completely fine with you doing that, but I think there is some pedagogical utility in seeing that doing all the works individually gives us the same answer, even though we don't see the same detailed cancellation that happens with the ideal gas. Oh, but I'm noticing that I haven't yet computed \(W_C\). I think you can see that it'll be exactly like \(W_H\) only with the temperature and volumes replaced with their appropriate values. This gives us for \(W_C\): \[\begin{align} W_C &= 8\pi\frac{(kT_C)^4}{h^3c^3}\frac{\pi^4}{45} (V_4-V3) \\ &= 8\pi\frac{(kT_C)^4}{h^3c^3}\frac{\pi^4}{45} \left(V_1-V_2\right)\frac{T_H^3}{T_C^3} \\ &= 8\pi\frac{k^4}{h^3c^3}\frac{\pi^4}{45}\left(V_1-V_2\right)T_H^3T_C \end{align}\] Note also that the sign of the work was opposite because we were compressing rather than expanding. Plugging this in we can see that: \[\begin{align} W &= W_H + W_2 + W_C+ W_4 \\ &= -8\pi\frac{(kT_H)^4}{h^3c^3}\frac{\pi^4}{45} (V_2-V1) \notag\\&\quad + 24\pi \frac{k^4}{h^3c^3}\frac{\pi^4}{45} V_2T_H^3\left(T_C - T_H\right) \notag\\&\quad +8\pi\frac{k^4}{h^3c^3}\frac{\pi^4}{45}\left(V_1-V_2\right)T_H^3T_C \notag\\&\quad + 24\pi \frac{k^4}{h^3c^3}\frac{\pi^4}{45} V_1T_H^3\left(T_H - T_C\right) \\ &= -8\pi\frac{k^4}{h^3c^3}\frac{\pi^4}{45} (V_2-V1)T_H^4 \notag\\&\quad + 24\pi \frac{k^4}{h^3c^3}\frac{\pi^4}{45} V_2T_H^3\left(T_C - T_H\right) \notag\\&\quad +8\pi\frac{k^4}{h^3c^3}\frac{\pi^4}{45}\left(V_1-V_2\right)T_H^3T_C \notag\\&\quad + 24\pi \frac{k^4}{h^3c^3}\frac{\pi^4}{45} V_1T_H^3\left(T_H - T_C\right) \\ &= -8\pi\frac{k^4}{h^3c^3}\frac{\pi^4}{45}T_H^3 (V_2-V1)(T_H-T_C) \notag\\&\quad + 24\pi \frac{k^4}{h^3c^3}\frac{\pi^4}{45} T_H^3(V_1-V_2)\left(T_H - T_C\right) \\ &= -32\pi\frac{k^4}{h^3c^3}\frac{\pi^4}{45}T_H^3 (V_2-V1)(T_H-T_C) \end{align}\] I'll take the ratio that I want now. Almost everything will cancel. \[\begin{align} \frac{W}{Q_H} &= \frac{ -32\pi\frac{k^4}{h^3c^3}\frac{\pi^4}{45}T_H^3 (V_2-V1)(T_H-T_C) }{ 32\pi (V_2-V1)\frac{(kT_H)^4}{h^3c^3}\frac{\pi^4}{45} } \\ &= -\frac{T_H-T_C}{T_H} \\ &= -\left(1-\frac{T_C}{T_H}\right) \end{align}\] This is just the Carnot efficiency from class with a minus sign. This sign came from the convention that positive work means work added to a system, which I used in this solution (and is convenient when using the First Law), but differs from the standard convention when discussing engines, where all signs are taken to be positive.

We have a 100W light bulb in a refridgerator that draws 100W power. This means the work done by the refridgerator per second is 100W. How we need to ask how efficient the refridgerator can be, to see how much it can cool its inside. The refridgerator operates between two temperatures the inside (which I'll call \(T_C\)) and the room (which I'll call \(T_H\)). Energy conservation tells us that \[\begin{align} Q_C + W &= Q_H \end{align}\] where I've taken the usual convention (for this kind of problem) where all signs are positive, so \(Q_C\) is the magnitude of heat drawn from the inside, \(W\) is the work done, and \(Q_H\) is the amount of heat dumped in the room. If this is a reversible cycle, then the change in entropy of the room must be equal and opposite to the change in entropy of the inside of the fridge. That means that \[\begin{align} \frac{Q_C}{T_C} &= \frac{Q_H}{T_H} \\ Q_H &= Q_C \frac{T_H}{T_C} \end{align}\] If we have an irreversible fridge, entropy of the room plus fridge can only go up, which would mean less cooling in the fridge (since the entropy of the inside is going down). Putting these equations together, we can see that \[\begin{align} Q_C + W &= Q_C \frac{T_H}{T_C} \\ W &= Q_C\left(\frac{T_H}{T_C}-1\right) \\ Q_C &= \frac{W}{\frac{T_H}{T_C}-1} \\ \frac{Q_C}{W} &= \frac{1}{\frac{T_H}{T_C}-1} \end{align}\] This tells us the effiency of our refridgerator. As long as this efficiency is greater than 1, our fridge can out-cool the light bulb. So when is this equal to one? \[\begin{align} \frac{1}{\frac{T_H}{T_C}-1} &= 1 \\ 1 &= \frac{T_H}{T_C}-1 \\ T_H &= 2T_C \end{align}\]**Light bulb in a refridgerator**So our fridge can indeed cool the insides below room temperature even with the light bulb (who

*ever*put a 100W light bulb in a fridge?!), and could in fact (in principle) cool it down to like 150K which would be crazy cold. Of course, the poor insulation would prevent that, as well as the capabilities of the pumps and refridgerant.Is this the answer you were expecting for this problem? I can tell you that it was

*not*the answer*I*was expecting. Kind of crazy.

## Solution for week 9

**Vapor pressure equation**- To solve for \(\frac{dp}{dT}\) we will begin with the Clausius-Clapeyron equation derived in class. \[\begin{align} \frac{dp}{dT} &= \frac{L}{T(V_g - \cancelto{0}{V_\ell})} \\ &= \frac{L}{TV_g} \\ &= \frac{L}{T\frac{NkT}{p}} \\ &= \frac{Lp}{NkT^2} \end{align}\]
- Now we will assume \(L\) is a constant, and solve for the vapor pressure \(p(T)\). The key will be to put \(p\) and \(T\) on separate sides of the equation so we can integrate.
\[\begin{align}
\frac{dp}{dT} &= \frac{Lp}{NkT^2}
\\
\frac1{p}\frac{dp}{dT} &= \frac{L}{NkT^2}
\\
\int_{T_0}^{T}\frac1{p}\frac{dp}{dT}dT &= \int_{T_0}^{T}\frac{L}{NkT^2}dT
\\
\int_{p_0}^{p}\frac1{p}dp &= \frac{L}{Nk}\int_{T_0}^{T}\frac{1}{T^2}dT
\\
\ln\left(\frac{p}{p_0}\right) &= -\frac{L}{Nk}\left(\frac1T-\frac1{T_0}\right)
\end{align}\]
Now we can solve for \(p\)!
\[\begin{align}
p &= \left(p_0 e^{\frac{L}{NkT_0}}\right) e^{-\frac{L}{NkT}}
\end{align}\]
We could clump all the stuff in parentheses into a big constant without any loss, but I kind of like making it explicit that if we know that \((p_0,T_0)\) is on the coexistence curve then we have a closed solution here.
*Note again that this makes an assumption about \(L\) being independent of temperature that is not entirely accurate.*

**Entropy, energy, and enthalpy of van der Waals gas**We will begin with the free energy of the van der Waals gas: \[\begin{align} F &= -NkT\left(\ln\left(\frac{n_Q(V-Nb)}{N}\right) + 1\right) - \frac{N^2a}{V} \end{align}\]- We can find the entropy as usual by taking a derivative of the free energy. \[\begin{align} S &= -\left(\frac{\partial F}{\partial T}\right)_V \\ &= Nk\left(\ln\left(\frac{n_Q(V-Nb)}{N}\right) + 1\right) \notag\\&\quad + \frac{NkT}{n_Q}\frac{dn_Q}{dT} \\ &= Nk\left(\ln\left(\frac{n_Q(V-Nb)}{N}\right) + 1\right) \notag\\&\quad + \frac{NkT}{n_Q}\frac{\frac32 n_Q}{T} \\&= Nk\left\{\ln\left(\frac{n_Q(V-Nb)}{N}\right)+\frac52\right\} \end{align}\] In the penultimate (second-to-last) step, I used the fact that \(n_Q\propto T^{\frac32}\).
- We can find the internal energy from \(F=U-TS\) now that we know the entropy. \[\begin{align} U &= F + TS \\ &= -NkT\left(\cancel{\ln\left(\frac{n_Q(V-Nb)}{N}\right)} + 1\right) - \frac{N^2a}{V} \notag\\&\quad +Nk\left(\cancel{\ln\left(\frac{n_Q(V-Nb)}{N}\right)}+\frac52\right)T \\ &= \frac32 NkT - \frac{N^2a}{V} \end{align}\] which looks like the monatomic ideal gas internal energy plus a correction term, which depends on the density of the fluid.
- To find the enthalpy we just need the pressure. We could find it using a derivative of the free energy, but that was done in class and in the text, so we needn't duplicate it.
\[\begin{align}
H &= U + pV \\
p &= \frac{NkT}{V-Nb} - \frac{N^2}{V^2}a \\
H &= \frac32 NkT - \frac{N^2a}{V} + \left(\frac{NkT}{V-Nb} -
\frac{N^2}{V^2}a\right)V
\\ &=
\frac32 NkT - 2\frac{N^2a}{V} + \frac{NkT}{1-\frac{Nb}{V}}
\\ &\approx
\frac32 NkT - 2\frac{N^2a}{V} + NkT\left(1+\frac{Nb}{V}\right)
\\ &=
\frac52 NkT - 2\frac{N^2a}{V} + \frac{N^2bkT}{V}
\\
H(T,p) &= \frac52NkT + Nbp - \frac{2Nap}{kT}
\end{align}\]
In the approximate step, we were just doing a power series expansion since \(\frac{Nb}{V}\ll 1\). Now we just want to express the enthalpy in terms of pressure, since it is usually used at fixed pressure. That requires us to replace volume with pressure. Solving for volume in terms of pressure is a slight nuisance.
\[\begin{align}
\left(p + \frac{N^2}{V^2}a\right)(V-Nb) &= NkT
\\
pV - pNb + \frac{N^2}{V}a &\approx NkT
\\
pV^2 - pNbV + N^2a &= NkTV
\\
pV^2 - (pNb + NkT)V + N^2a &= 0
\end{align}\]
Now we can use the quadratic equation.
\[\begin{align}
V &= \frac{pNb + NkT\pm \sqrt{(pNb + NkT)^2 - 4pN^2a}}{2p}
\\
&\approx \frac{pNb + NkT\pm \sqrt{(NkT)^2 + 2pN^2bkT - 4pN^2a}}{2p}
\\
&= \frac{pNb + NkT + NkT\sqrt{1 + \frac{2pNbkT - 4pNa}{kT}}}{2p}
\\
&\approx \frac{pNb + NkT + NkT\left(1 + \frac12\frac{2pNbkT - 4pNa}{kT}\right)}{2p}
\\
&= \frac{pNb + 2NkT + \frac{pNbkT - 2pNa}{kT}}{2p}
\\
&= \frac{2pNb + 2NkT - \frac{2pNa}{kT}}{2p}
\\
&= \frac{NkT}{p} + Nb - \frac{Na}{kT}
\end{align}\]
What a nuisance. Each approximation I made eliminated a term that had two or more factors of \(a\) or \(b\), which are taken to be small quantities (albeit with dimensions). Note that the first term is just what we get from the ideal gas law. The rest is the first-order correction to the volume. Now that we have an expression for \(V\) in terms of \(p\) and \(T\)
\[\begin{align}
H &=
\frac52 NkT + \frac{N^2bkT - 2N^2a}{V}
\\ &=
\frac52 NkT + \frac{N^2bkT - 2N^2a}{\frac{NkT}{p} + Nb - \frac{Na}{kT}}
\\ &=
\frac52 NkT +
\frac{p}{NkT}\frac{N^2bkT - 2N^2a}{1 + \left(Nb - \frac{Na}{kT}\right)\frac{p}{NkT}}
\\ &\approx
\frac52 NkT +
\frac{p}{NkT}\left(N^2bkT - 2N^2a\right)
\left(1 - \left(Nb - \frac{Na}{kT}\right)\frac{p}{NkT}\right)
\end{align}\]
Okay, this is admittedly looking a little hairy. But remember that we only need to keep terms that are linear in \(a\) and \(b\), so that actually just kills our correction term entirely. And after all that work!
\[\begin{align}
H &\approx
\frac52 NkT +
\frac{p}{NkT}\left(N^2bkT - 2N^2a\right)
\\ &=
\frac52 NkT +
N\frac{p}{kT}\left(bkT - 2a\right)
\\ &=
\frac52 NkT +
Np\left(b - \frac{2a}{kT}\right)
\end{align}\]
which matches with the expected answer. So yay. In retrospect, we could have simplified the solving for the volume bit drastically, if I had noticed that \(V\) only occured in \(H\) in a ratio to a small quantity, and thus we didn't need to keep up to the
*first order*terms, we only needed up to the*zero order*term, which would have eliminated most of the work. You are welcome to argue this in your solution, but should try to argue it well. Otherwise, you'd just want to do all the same tedium I did.

We begin with the Clausius-Clapeyron equation. However, to do this we have to ensure that we get everything in the right units, and such that the volume we divide by corresponds to the same quantity of water as the latent heat on top. Let's say we have one gram of water (which is nice up top), we need the volume of a gram of steam. \[\begin{align} \Delta V &\approx V_g \\ &= \frac{NkT}{p} \end{align}\] I'll start by finding the number of molecules in a gram of water: \[\begin{align} N &= \frac{1\text{g}}{18 \text{g mol}^{-1}}N_A \\ &= \frac{1\text{g}}{18 \text{g mol}^{-1}}6.0221\times 10^{23} \\ &\approx 3.35\times 10^{22} \end{align}\] Since one atmosphere is \(\sim 10^5\) pascals, we have \[\begin{align} \Delta V &\approx \frac{3.35\times 10^{22} (1.38\times 10^{-23}\text{J K}^{-1}) (373 \text{K}) }{10^5 \text{J m}^{-3}} \\ &\approx 1.7\times 10^{-3}\text{m}^3 \end{align}\] Just as a check, we may as well verify that \(V_g\gg V_l\). I know that liquid water has a density of about \(1\text{g cm}^{-3}\). Which makes the vapor density about two thousand times higher, so we're okay ignoring the liquid density, yay. Putting this together, we can find the slope we are asked for. \[\begin{align} \frac{dp}{dT} &= \frac{L}{T\Delta V} \\ &= \frac{2260\text{J g}^{-1}}{(373\text{K})(1.7\times 10^{-3}\text{m}^3\text{g}^{-1})} \\ &= 3530 \frac{\text{Pa}}{\text{K}} \end{align}\] Now we were asked for this in units of atmosphere per Kelvin, which gives us a change of five orders of magnitude. \[\begin{align} \frac{dp}{dT} &= 3.5\times 10^{-2}\text{atm K}^{-1} \end{align}\] Actually, we were asked for the inverse of this, presumably so we'd have a number greater than one. \[\begin{align} \frac{dT}{dp} &= 28 \text{K atm}^{-1} \end{align}\]**Calculation of \(\frac{dT}{dp}\) for water**(K&K 9.2)That tells us that if the liquid-vapor coexistence curve were a straight line, it would drop to zero vapor pressure at 72\(^\circ\text{C}\), which is emphasizes how much curvature there is to the coexistence curve.

Okay, once again we'll want to find the volume of gas, which gives us part of the answer. In addition, we'll need to find \(\frac{dp}{dT}\) from the given pressures at a couple of temperatures. That leaves us with nothing but the latent heat to solve for. I'll start with the volume of a gram of water. It's like the last problem, but at a lower temperature. I'll not copy the work that is identical. One mm Hg is 133 Pa, so \[\begin{align} \Delta V &\approx \frac{3.35\times 10^{22} (1.38\times 10^{-23}\text{J K}^{-1}) (272 \text{K}) }{4.2\times 133 \text{J m}^{-3}} \\ &\approx .225\text{m}^3 \end{align}\]**Heat of vaporization of ice**(K&K 9.3)So the volume of the gram of chilly steam is drammatically higher, due to the vapor pressure being way lower at these frigid temperatures. Note that I used a pressure halfway between the two pressures give, since we know the derivative most accurately at this half-way point.

Now for the derivative itself: \[\begin{align} \frac{dp}{dT} &= \frac{611 - 518}{2.01\text{K}}\text{Pa} \\ &\approx 46 \text{Pa K}^{-1} \end{align}\] Putting things together, we get: \[\begin{align} \frac{dp}{dT} &= \frac{L}{T\Delta V} \\ L &= T\Delta V\frac{dp}{dT} \\ &=(272\text{K}) (.225\text{m}^3\text{g}^{-1})(46 \text{Pa K}^{-1}) \\ &\approx 2815 \text{J g}^{-1} \end{align}\] And now I remember we want our final answer in \(\text{J mol}^{-1}\). I guess it would have been smart to compute the volume of a mole, rather than a gram. Oh well, it's not a hard conversion. \[\begin{align} L &= 2815 \text{J g}^{-1} (18 \text{g mol}^{-1}) \\ &\approx 51 \text{kJ mol}^{-1} \end{align}\]This isn't all that accurate. The answer per gram can be compared with the latent heat of vaporization given in the last problem, and you can see that it's higher for the ice, but only about twice as high, which reflects the fact that the liquid still has most of the same hydrogen bonds that hold the solid ice together.

Of course, we already talked last week about \(F=-kT\ln Z\), but that was done using the Gibbs entopy, which we're pretending we don't yet know...↩