The partition function for the Hamiltonian introduced in the previous part is given by:
\[
\begin{aligned}
Z_c^{mfa} & = \sum_{s_1=0}^1 \sum_{s_2=0}^1 \dots \sum_{s_{N-1}=0}^1 \sum_{s_N=0}^1 \exp\left( \beta \sum_{i=1}^{N/2} Jz(s_{2i-1}) z(s_{2i}) + (H+J\langle s \rangle)[z(s_{2i-1})+z(s_{2i})] \right) \\
& = \sum_{s_1=0}^1 \sum_{s_2=0}^1 \dots \sum_{s_{N-1}=0}^1 \sum_{s_N=0}^1 \prod_{i=1}^{N/2} e^{\beta Jz(s_{2i-1})z(s_{2i})}e^{\beta(H+J\langle s \rangle)[z(s_{2i-1})+z(s_{2i})]} \\
& = \sum_{s_1=0}^1 \sum_{s_2=0}^1e^{\beta Jz(s_{1})z(s_{2})}e^{\beta(H+J\langle s \rangle)[z(s_{1})+z(s_{2})]} \dots \sum_{s_{N-1}=0}^1 \sum_{s_N=0}^1 e^{\beta Jz(s_{N-1})z(s_{N})}e^{\beta(H+J\langle s \rangle)[z(s_{N-1})+z(s_{N})]} \\
& = \left(e^{\beta J}e^{2\beta(H+J\langle s \rangle)} + 2e^{-\beta J} + e^{\beta J}e^{-2\beta(H+J\langle s \rangle)} \right) \dots \left(e^{\beta J}e^{2\beta(H+J\langle s \rangle)} + 2e^{-\beta J} + e^{\beta J}e^{-2\beta(H+J\langle s \rangle)} \right) \\
& = \left(e^{\beta J}e^{2\beta(H+J\langle s \rangle)} + 2e^{-\beta J} + e^{\beta J}e^{-2\beta(H+J\langle s \rangle)} \right)^{N/2} \\
& = \left(2e^{\beta J}\cosh(2\beta(H+J\langle s \rangle)) + 2e^{-\beta J} \right)^{N/2}
\end{aligned}
\]
To calculate the average spin, $\langle s \rangle$, in a system with $N$ sites we use the fact that this quantity is equal to the average magnetisation, $\langle M \rangle$,
as shown below:
$$
\langle s \rangle = \frac{\langle M \rangle}{N}
$$
We can calculate the average magnetization by taking suitable derivatves of the logarithm of the partition function as shown below:
\[
\begin{aligned}
\langle s \rangle & = \frac{1}{N \beta} \left( \frac{\partial \ln(Z_c)}{\partial H}\right)_T \\
& = \frac{1}{N \beta} \left\{ \frac{\partial }{\partial H} \frac{N}{2} \ln\left( 2e^{\beta J}\cosh(2\beta[H+J\langle s \rangle)] + 2e^{-\beta J} \right) \right\}_T \\
& = \frac{N}{2N \beta} \left[ \frac{4\beta e^{\beta J} \sinh[2\beta(H+J\langle s\rangle)] }{ 2e^{\beta J}\cosh[2\beta(H+J\langle s \rangle)] + 2e^{-\beta J}} \right] \\
& = \frac{\sinh[2\beta(H+J\langle s\rangle)] }{ \cosh[2\beta(H+J\langle s \rangle)] + e^{-2\beta J}}
\end{aligned}
\]