Solution (source code)

= Solution

The stretched segment is a <Gaussian chain> of $n$ <Kuhn length> steps, with unperturbed root-mean-square end-to-end distance $l=b\sqrt n$. Its end-to-end <probability density> is proportional to $\exp[-3z^2/(2nb^2)]$, so its leading elastic <Helmholtz free energy> is $3k_BTz^2/(2nb^2)$. Adding the remaining segment's <adsorption> <free energy> gives
$$
\boxed{F(n,z)=k_BT(N-n)\left[\left(\frac b\xi\right)^2-\epsilon\frac b\xi\right]
+\frac{3k_BTz^2}{2nb^2}.}
$$
An additive constant independent of $n,z$ is irrelevant. At the optimal adsorption height this becomes
$$
F(n,z)=-(N-n)\mu+\frac{3k_BTz^2}{2nb^2},\qquad \mu=\frac14k_BT\epsilon^2.
$$
The original PDF's hint labels the positive quantity proportional to $k_BT R^2/l^2$ an <entropy>. It has units of <energy> and is the stretching <free energy>. The corresponding change of conformational <entropy> is $\Delta S=-3k_B R^2/(2l^2)$. This dimensional and sign correction is essential to the minimization.

This is the leading extensive <Gaussian chain> approximation: endpoint normalization and junction corrections give subleading terms. It requires many stretched <monomers> and $z\ll nb$, rather than extension near the full contour length.