1D Ising Model with different boundary conditions The Hamiltonian for one-dimensional Ising model is given by,
\begin{equation}
\mathcal{H} = -J\sum_{<ij>} S_iS_j; \quad i,j=1,2,...,N+1
\end{equation}
where $<ij>$ denotes that there is nearest neighbor approximation. The partition function is given by,
\begin{equation}
\mathcal{Z}=\sum_{\{S_i\}} e^{-\beta \mathcal{H}(S_i)}
\end{equation}
with $\beta = \frac{1}{k_BT}$, where $k_B$ is the Boltzmann constant and $T$ is the temperature.
Now my questions are:
1. How to compute the partition function when $S_{N+1}=+1$ while other spins ($S_i$ for $i=1,2,...,N$)  may take value $+1$ or $-1$?
2. How to compute the partition function when $S_{N+1}=-1$ while other spins ($S_i$ for $i=1,2,...,N$)  may take value $+1$ or $-1$?
 A: 1.
\begin{equation}
\mathcal{Z}(N+1,+)= \sum_{S_1}...\sum_{S_N} e^{K(S_1S_2+S_2S_3+...+S_{N-1}S_N}e^{KS_N}
\end{equation}
where $K=\beta J$.
We define new variables,
\begin{equation}
\eta_i =S_i S_{i+1}; \quad i=1,2,...,N-1
\end{equation}
The $\eta_i$s take value:
\begin{equation}
\eta_i= \left\{
  \begin{array}{l l}
    +1 & \quad \text{if} \quad S_i=S_{i+1} \\
    -1 & \quad \text{if} \quad S_i \neq S_{i+1}
  \end{array} \right.
\end{equation}
Then the partition function becomes,
\begin{array}
\mathcal{Z}(N+1,+) &= \sum_{S_N}\sum_{\{\eta_i\}} e^{K\sum_{i=1}^{N-1}\eta_i}e^{KS_N} \\
&= \sum_{S_N} \left\{\prod_{i=1}^{N-1}\sum_{\{\eta_i\}} e^{K\eta_i}\right\}e^{KS_N} \\
&= \sum_{S_N} \left(2coshK\right)^{N-1} e^{KS_N} \\
&= \left(2coshK\right)^{N-1} \left(e^K+e^{-K} \right) \\
&= \left(2coshK\right)^{N}
\end{array}
2. In a similar way we can show that,
\begin{equation}
\mathcal{Z}(N+1,+) = \mathcal{Z}(N+1,-) = \left(2coshK\right)^{N}.
\end{equation}
A: See Ising's paper of 1925 in Zeit. fur Physik. His equation shows the density of states (DOS) and has a parameter for s(N+1) that can be set to +1 or -1.  Near the end of the paper he sums over this parameter. In your question, try multiplying the DOS by the Boltzmann factor to get the partition factor.
