Solution
= Solution
For the <partition function> $Z=\sum_{\{S\}}e^{-\beta E}$, differentiation with respect to the external field gives
$$
\frac{\partial\log Z}{\partial B}
=\frac1Z\sum_{\{S\}}\beta\!\left(\sum_iS_i\right)e^{-\beta E}
=\beta\sum_i\langle S_i\rangle.
$$
Therefore the <magnetization> per site is
$$
\boxed{m=\frac1{N\beta}\frac{\partial\log Z}{\partial B}}.
$$