Consider a freely jointed chain of N bonds of length  subject to a constant elongational force f applied to its ends along the z axis and an environment temperature . An example could be a chain with two opposite charges +q and -q at its ends in a constant electric field  applied along the  axis as sketched in the figure on the right. If the direct Coulomb interaction between the charges is ignored, then there is a constant force  at the two ends.
Different chain conformations are not equally likely, because they correspond to different energy of the chain in the external electric field.
Thus, different chain conformation have different statistical Boltzmann factors .
The partition function is:
Every monomer connection in the chain is characterized by a vector  of length  and angles  in the spherical coordinate system. The end-to-end vector can be represented as: . Therefore:
The Gibbs free energy G can be directly calculated from the partition function:
The Gibbs free energy is used here because the ensemble of chains corresponds to constant temperature  and constant force   (analogous to the isothermal-isobaric ensemble, which has constant temperature and pressure).
The average end-to-end distance corresponding to a given force can be obtained as the derivative of the free energy:
This expression is the Langevin function , also mentioned in previous paragraphs:
 where, .
For small relative elongations () the dependence is approximately linear,
and follows Hooke's law as shown in previous paragraphs: