From here: http://en.wikipedia.org/wiki/Brillouin_function
Define $$B_j(x)=\frac{2j+1}{2j} \coth \left( \frac{2j+1}{2j} x \right) - \frac{1}{2j} \coth \left( \frac{1}{2j} x \right)$$
I want to do this calculation ($m,j$ are integers):
$$\langle m \rangle = \sum_{-j\le m\le j} m \ P(m)$$
where $$P(m)=\frac{e^{xm/j}}{Z}$$
and
$$Z = \sum_{-j\le m\le j} e^{xm/j}$$
The answer is supposed to be
$$\langle m \rangle = j \cdot B_j (x)$$
But I'm unable to grind through this calculation. I keep getting stuck with an awful expression with exponentials that I can't seem to simplify. I tried expressing them as the cotangents and the best I got was the two cotangents from the original formula plus a ton of garbage that didn't seem to cancel. I'm guessing there is some sort of trick to calculating stuff like this that I'm unaware of.
I will summarize the steps; they are a little messy, but no more difficult than geometric series.
First of all, evaluate $Z$:
$$Z = \sum_{m=-J}^J e^{m x/J} = e^{-x} \frac{e^{(2 J+1) x/J}-1}{e^{x/J}-1} = \frac{\sinh{\left ( \frac{2J+1}{2 J} x\right)}}{\sinh{\left( \frac{x}{2 J}\right)}}$$
Then note that
$$\sum_{m=-J}^J m \, e^{m x/J} = J \frac{dZ}{dx}$$
This is the mere application of the quotient rule; the result is
$$J \frac{dZ}{dx} = \frac{1}{2 \sinh^2{\left( \frac{x}{2 J}\right)}}\left [(2J+1) \cosh{\left ( \frac{2J+1}{2 J} x\right)}\sinh{\left( \frac{x}{2 J}\right)} - \sinh{\left ( \frac{2J+1}{2 J} x\right)}\cosh{\left( \frac{x}{2 J}\right)}\right ]$$
The ratio of this derivative and $Z$ is then
$$P(M) = \frac12 \left [(2J+1) \coth{\left ( \frac{2J+1}{2 J} x\right)} - \coth{\left( \frac{x}{2 J}\right)} \right ] $$
The result follows.
ADDENDUM
A little more detail on the first equation.
$$\begin{align}e^{-x} \frac{e^{(2 J+1) x/J}-1}{e^{x/J}-1} &= \frac{e^{(J+1) x/J}-e^{-x}}{e^{x/J}-1}\\ &= \frac{e^{x/(2 J)} \left (e^{(2 J+1) x/(2 J)} - e^{-(2 J+1) x/(2 J)} \right )}{e^{x/(2 J)} \left (e^{x/(2 J)}-e^{-x/(2 J)} \right )}\\ &= \frac{\sinh{\left ( \frac{2J+1}{2 J} x\right)}}{\sinh{\left( \frac{x}{2 J}\right)}}\end{align}$$
as was to be demonstrated.