# Partition function

Hi,
maybe someone can help me with this problem?

## Homework Statement

A system consist of N Atoms that have a magnetic moment m. The Hamiltonian in the presence of a magnetic field H is
$$\mathcal{H}(p,q) - mH \sum_{i=1}^N cos(\alpha_{i})$$
where $\alpha_i$ is the angle between the magnetic field and the atom i.

Show that the induced magnetisationt M is:
$$M=Nm\coth(\theta-\frac 1 \theta), \theta=\frac {mH}{ k_BT}$$

## Homework Equations

Magnetisation $M=-\frac {\partial F} {\partial H}$
Free energy $F=-k_B\ln(Z)$

## The Attempt at a Solution

$Z=Z_{mech}* Z_{magn}$
I don't know how to calculate the magnetic partition function.

This problem I think is problem (7.14) in Reif's Fundamentals of Statistical and Thermal Physics. Reif gives a hint for the probability being around the angle $\alpha_i$ (he calls it $\theta$ ) : In the absence of a magnetic field, the probability that the magnetic moment is between $\theta$ and $\theta + d \theta$ is proportional to the differential solid angle $d \Omega=2 \pi sin(\theta) d \theta$ covered by this $d \theta$, and in the presence of a magnetic field this will be weighted by the factor $e^{-E/(kT)}$, where $E$ is the magnetic energy for the angle $\theta$.