# Statistical Mechanics, Absolute Probability, and the Average Magnetic Moment

1. Sep 11, 2009

### Piamedes

I'm not sure if this is the proper location for this thread, but its for a math course and I think my issues concern the math portion of the problems. If it should be moved please do so.

Note: I know the post is quite long, so I'll just pull out my few main issues from all the junk.
1) What exactly are 'absolute probability' and 'total probability' from what I assume is a statistical mechanics standpoint.
2) How do you find the mean value a variables assumes over all allowed values weighted by their probablities?

Those I believe are my main two problems, but I'm not even entirely sure of that.

The Actual Question
There are actually two questions, one for a specific instance and the other for a more general occurrence. I've typed out both questions verbatim so anything that looks or sounds weird is just the wording of the question.

The Specific One: A magnetic moment $$\mu$$ in a magnetic field $$h$$ has energy $$E_{}\pm=\mp \mu h$$ when it is parallel (antiparallel) to the field. Its lowest energy state is when it is aligned with $$h$$. However at any finite temperature, it has a nonzero probabilities for being parallel or antiparallel given by P(par)/ P(antipar) = exp[-E+/T] / exp[-E-/T] where T is the absolute temperature. Using the fact

that the total probability must add up to 1, evaluate the absolute probabilities for the two orientations. Using this show that the average magnetic moment along the field $$h$$ is $$m=\mu\tanh{\frac{\mu h}{T}} .$$
Sketch this as a function of temperature at fixed $$h$$. Notice that if $$h=0$$, $$m$$ vanishes since the moment point up and down with equal probability. Thus $$h$$ is the cause of a nonzero $$m$$. Calculate the susceptibility, $$\frac{dm}{dh} \right|_{h=0}$$ as a function of $$T$$.

The General Case: Consider the previous problem in a more general light. According to the laws of statistical mechanics if a system can be in one of n states labeled by an index i, energies $$E_{i}$$, then at temperate T the system will be in state i with a relative probability $$p(i)=e^{-\beta E_{i}}$$ where Beta is one over T. Introduce the partition function $$Z= \sum_{i} e^{-\beta E_{i}}$$. First write and expression for $$P(i)$$, the absolute probability (which must add up to one). next write a formula for <V>, the mean value of a variable V that takes the value $$V_{i}$$ in the state i. i.e., <V> is the average over all allowed values, duly weighted by probabilities. Show that <E> $$= -\frac{d ln{Z}}{d \beta}}$$. Give an explicit Formula for Z for the specific case described above. Show that $$-\frac{d ln{Z}}{d \beta}}$$ gives the mean moment along h. Use the formula for Z, evaluate this derivative and verify that it agrees with the result you got in the last problem.

My Attempts to solve them

Yes I realize that is a very long set of questions, but I typed both of these problems because I've only made a little progress by working them together. I don't know if that is the best approach, but here's what I so far.

By reading the second problem I realized that the weird proportion in the first one relating the probabilities of being parallel and antiparallel wasn't actually a proportion; it was just a very confusing way of stating:

$$P_{par} = e^{\mu h}$$ and
$$P_{anti} = e^{-\mu h}$$ .

Now is where I first encountered problems. I am completely uncertain what the question means by 'absolute probabilities', and google unfortunately has been no help. I at first assume that the sum of those two equations summed to one, but that didn't really accomplish anything.

I then tried to work backwards, starting with the hyperbolic tangent function. I did the last part of the first problem, the simple derivative:

$$m=\mu\tanh{\frac{\mu h}{T}}$$
$$\frac{dm}{dh}=\frac{\mu^2}{T} \text{sech}^2 {\frac{\mu h}{T}}$$

At h=0 the hyperbolic secant term equals one, so the final equation is just:
$$\frac{dm}{dh}=\frac{\mu^2}{T}$$.

I then tried manipulating any of the exponential equations into some sort of hyperbolic tangent form and couldn't do so.

I then moved onto the second problem and did a little research into statistical mechanics. The wikipedia page on the Partition Function looked quite appealing until I realized it still didn't answer my main problems.

So if anyone could please answer my original two questions at the top of the post I would be most thankful and then I could move onto doing the math portion of this homework instead of fumbling around blindly.

2. Sep 11, 2009

### Dick

Here's a partial answer. P(par)/ P(antipar) = exp[-E+/T] / exp[-E-/T] gives you the 'relative' probability of being par vs antipar. I think the 'absolute' probability means to find the values of P(par) and P(antipar) given that P(par)+P(antipar)=1. That's two equations in two unknowns. Find their values. The answer is NOT exp(mu*h) and exp(-mu*h). Now the average magnetic moment is (+mu)*P(par)+(-mu)*P(antipar). I.e. the average of something is the sum of all of the values times the probability of having that value. Can you show that gives your tanh function?

3. Sep 11, 2009

### gabbagabbahey

Some helpful definitions for you are:

(1)Absolute Probability: The absolute probability of a specific particle, in a given ensemble, being in a state $i$ is defined as the number of particles in the ensemble in the state $i$ divided by the total number of particles in the ensemble ($P_i=\frac{n_i}{N}$ ).

(2)Relative Probability: The relative probability of a specific particle, in a given ensemble, being in a state $i$ can be defined as any constant $\alpha$ times the absolute probability ($p_i=\alpha P_i$)

The big difference between absolute probability and relative probability is that the sum of all the absolute probabilities is necessarily equal to one, while the sum of the relative probabilities depends on the value of $\alpha$.

Not really. Given the above definitions, you could say that the relative probabilities (for a certain choice of $\alpha$) are $p_{\parallel} = e^{\mu h/T}$ and $p_{-\parallel} = e^{-\mu h/T}$, but these are not the absolute probabilities ($P_{\parallel}$ and $P_{-\parallel}$), since the sum of the absolute probabilities (the total probability) must be equal to 1.

So, you have

$$\frac{P_{\parallel}}{P_{-\parallel}}=\frac{e^{\mu h/T}}{e^{-\mu h/T}}$$

and $P_{\parallel}+P_{-\parallel}=1$...To find the absolute probabilities, just solve this system of equations.

The average value $\langle Q\rangle$ and mean uncertainty $\Delta Q$ of any observable quantity $Q$ in a given ensemble are defined by:

$$\langle Q\rangle=\sum_{\text{all } i} P_iQ_i$$

and

$$\Delta Q=\sqrt{\langle Q^2\rangle-\langle Q\rangle^2}$$

4. Sep 11, 2009

### Piamedes

Thanks, that helped tons. Here is my work for both problems with that in mind:

$$\frac{P_{par}}{P_{anti}} = \frac{e^{\frac{-E_{+}}{T}}}{e^{\frac{-E_{-}}{T}}}$$

$$P_{par} = P_{anti} * e^{\frac{-E_{+}-E_{-}}{T}}$$

For ease of caculation,

$$\frac{-E_{+}-E_{-}}{T} = x$$

$$P_{par} = P_{anti} * e^{x}$$

And

$$P_{par} + P_{anti} = 1$$

$$P_{anti} * e^{x} + P_{anti} = 1$$

$$P_{anti} (1+ e^{x}) = 1$$

$$P_{anti} = \frac{1}{1 + e^{x}}$$

$$P_{par} + \frac{1}{1 + e^{x}} = 1$$

$$P_{par} = \frac{e^{x}}{1 + e^{x}}$$

So

$$\overline{\mu} = \mu P_{par} - \mu P_{anti}$$

$$= \mu \frac{e^{x}}{1 + e^{x}} - \mu \frac{1}{1 + e^{x}}$$

$$= \mu (\frac{e^{x}-1}{1 + e^{x}})$$

But

$$-E_{+}-E_{-} = \mu h - (-\mu) h = -2 \mu h$$

So

$$\overline{\mu} = \mu (\frac{e^{\frac{2 \mu h}{T}}-1}{e^{\frac{2 \mu h}{T}} + 1})$$

Which is just

$$\overline{\mu} = \mu \tanh{\frac{\mu h}{T}}$$

So that answer part one. Thanks so much.

Regarding the second problem:

Using the same definition of absolute probability from above, in this case the absolute probability for a given energy state would the the relative probability of that state, e^BE, divided by the sum of probabilities.

Given that the relative probabilities is
$$p(i) = e^{-\beta E_{i}}$$

And the partition function Z (which is just the sum of the relative probabilities)

$$Z = \sum_{i} e^{-\beta E_{i}}$$

Then the absolute probability for a given energy state would be:

$$P(i) = \frac{e^{-\beta E_{i}}}{Z}$$

The sum of all the absolute probabilities using this function works because it just works out to Z/Z=1.

Now for the next part, <V> should just be the sum of each value of V times that values absolute probability, or:

$$<V> = \sum_{i} V_{i}P(i)$$

So for <E> you get:

$$<E> = \sum_{i} E_{i}P(i)$$

$$<E> = \sum_{i} E_{i} [\frac{e^{-\beta E_{i}}}{Z}]$$

Z is a constant, so:

$$<E> = \frac{1}{Z} \sum_{i} E_{i} e^{-\beta E_{i}}$$

And here is where I get stuck again. I'm trying to prove that

$$<E> = -\frac{d lnZ}{d \beta}$$

Working the formula I derived backwards, I recognize that the lnZ easily comes from the one over Z, but how would could I change that summation into a simple derivative?

If I just take the natural log of the original equation for Z, ignoring the summation and take the derivative it immediately gives the proper answer, but I feel this is wrong because I would be taking the natural of a sum of terms and so then it would follow the addition rules for derivatives

*Nevermind:

If I take ln of the summation and take the derivative I will get one over Z times the summation of each individual term's chain rule. So it works out to the same series.

Thanks so much for all the help

Last edited: Sep 11, 2009
5. Sep 11, 2009

### gabbagabbahey

Careful,

$$\frac{e^{\frac{-E_{+}}{T}}}{e^{\frac{-E_{-}}{T}}}=e^{\frac{-E_{+}-E_{-}}{T}}$$

And

$$-E_{+}+E_{-} = -(-\mu) h + (+\mu) h = +2 \mu h$$

6. Sep 11, 2009

### gabbagabbahey

As for your remaining question, the chain rule gives you:

$$\frac{\partial (\ln Z)}{\partial \beta}=\frac{1}{Z}\frac{\partial Z}{\partial \beta}$$

You have an expression for $Z$ ($Z = \sum_{i} e^{-\beta E_{i}}$), so just take its derivative....what do you get?