User:DrPippy/sandbox

Example: the two-state paramagnet (for Multiplicity (statistical mechanics))
A simplified model of the two-state paramagnet provides an example of the process of calculating the multiplicity of particular macrostate. This model consists of a system of $$N$$ microscopic dipoles $$\mu$$ which may either be aligned or anti-aligned with an externally applied magnetic field $$B$$. Let $$N_\uparrow$$ represent the number of dipoles that are aligned with the external field and $$N_\downarrow$$ represent the number of anti-aligned dipoles. The energy of a single aligned dipole is $$U_\uparrow=-\mu B$$, while the energy of an anti-aligned dipole is $$U_\downarrow=\mu B$$; thus the overall energy of the system is


 * $$U = (N_\downarrow-N_\uparrow)\mu B.$$

The goal is to determine the multiplicity as a function of $$U$$; from there, the entropy and other thermodynamic properties of the system can be determined. However, it is useful as an intermediate step to calculate multiplicity as a function of $$N_\uparrow$$ and $$N_\downarrow$$. This approach shows clearly that the number of available macrostates is $$N+1$$.

For example, in a very small system with $$N=2$$, there are three macrostates, corresponding to $$N_\uparrow=0, 1 \, \mathrm{or} \, 2$$. Since the $$N_\uparrow=0$$ and $$N_\uparrow=2$$ macrostates require both dipoles to be either anti-aligned or aligned, respectively, the multiplicity of either of these states is 1. However, in the $$N_\uparrow=1$$, either dipole can be chosen for the aligned dipole, so the multiplicity is 2. In the general case, the multiplicity of a state with $$N_\uparrow$$ aligned dipoles follows from combinatorics, resulting in


 * $$\Omega = \frac{N!}{N_\uparrow!(N-N_\uparrow)!} = \frac{N!}{N_\uparrow!N_\downarrow!},$$

where the second step follows from the fact that $$N_\uparrow+N_\downarrow = N$$.

Since $$N_\uparrow - N_\downarrow = -U/\mu B$$, the energy $$U$$ can be related to $$N_\uparrow$$ and $$N_\downarrow$$ as follows:

$$\begin{align} N_\uparrow &= \frac{N}{2} - \frac{U}{2\mu B}\\ N_\downarrow &= \frac{N}{2} + \frac{U}{2\mu B}. \end{align}$$

Thus the final expression for multiplicity as a function of internal energy is

$$\Omega = \frac{N!}{(N/2-U/2\mu B)!(N/2+U/2\mu B)!}.$$

This can be used to calculate entropy in accordance with Boltzmann's entropy formula; from there one can calculate other useful properties such as temperature and heat capacity.

Intro to entropy
In popular usage, entropy is often considered to be a measurement of disorder. This usage stems from the physical definition of entropy as a numerical quantity which describes the number of different ways that the constituent parts of a system can be arranged to get the same overall arrangement. For example, there are many ways to arrange the molecules of a gas inside its container that yield the same temperature and pressure; any two molecules could be swapped, but the overall state of the system would remain unchanged. If the gas were moved to a larger container, the number of possible arrangements of the constituent molecules would increase greatly; the entropy would therefore be larger as well.

The equivalence between entropy and disorder arises because disordered states almost always have higher entropy than ordered states. There are relatively few ways to organize a deck of cards so that it is separated by suit compared to the number of arrangements where the suits are mixed together. There are relatively fewer ways to organize the objects in a room in a tidy fashion compared to the number of haphazard arrangements. There are fewer ways to arrange pieces of glass into an intact window than a shattered window. A shuffled deck, a messy room, and a broken window all possess more entropy than their more well-ordered counterparts.

The second law of thermodynamics is one of the foundational principles of physics; it states that entropy tends to increase over time. A gas which is initially confined to only the lower half of its container will quickly expand to fill the upper half of its container as well. From the standpoint of entropy, this is a result of the fact that there are many more ways to arrange the gas molecules in the entire container than there are to arrange them in only half of the container. Thus the entropy of the gas increases as it expands to fill the container. (Note: I think a figure here could be useful. Maybe a 2-molecule "gas", which would only have one way to have both molecules in the bottom half, but two ways to have one molecule in each half, implying that it's twice as likely for this "gas" to fill the container than to remain confined at the bottom.  I can make a figure like this, but it won't happen until the weekend!)

The second law, taken in combination with the relationship between entropy and disorder, implies that it is relatively easy for a highly-ordered system to become disorganized, but much more difficult to bring order to a disorganized system. Furthermore, some processes cannot be undone at all. The process of scrambling an egg increases its entropy, as there are many more ways to arrange the egg molecules in a scrambled state than there are to arrange those same molecules with an intact yolk separated from the white. The scrambling process essentially randomizes the positions of the egg molecules; once the egg is scrambled, it is practically impossible for continued stirring to cause all of the egg molecules to happen upon one of the relatively few arrangements where the yolk and white are separated, and so an egg cannot be unscrambled. (Note: I can imagine other analogies here that might be considered more encyclopedic; perhaps mixing two liquids, or lighting a match? I think this version works fine, but I'm not opposed if someone would prefer a different illustration.)

For addition to Gravitational PE article
In the common situation where a much smaller mass $$m$$ is moving near the surface of a much larger object with mass $$M$$, the gravitational field is nearly constant and so the expression for gravitational energy can be considerably simplified. Consider the change in potential energy moving from the surface (a distance $$R$$ from the center) to a height $$h$$ above the surface:


 * $$\Delta U = \frac{GMm}{R}-\frac{GMm}{R+h}$$
 * $$\Delta U = \frac{GMm}{R}\left(1-\frac{1}{1+h/R}\right).$$

If $$h/R$$ is small, as it must be if we remain close to the surface where $$g$$ is constant, then we can simplify this expression using the binomial approximation:
 * $$\frac{1}{1+h/r} \approx 1-\frac{h}{R}$$
 * $$\Delta U \approx \frac{GMm}{R}\left[1-\left(1-\frac{h}{R}\right)\right]$$
 * $$\Delta U \approx \frac{GMmh}{R^2}.$$
 * $$\Delta U \approx m\left(\frac{GM}{R^2}\right)h.$$

As the gravitational field is $$g=GM/R^2$$, this reduces to
 * $$\Delta U \approx mgh.$$

If we take $$U=0$$ at the surface (instead of at infinity), then we're left with the familiar expression
 * $$U=mgh.$$