Solution (source code)

= Solution

For an inextensible planar filament, $\mathbf r_s=(\cos\theta,\sin\theta)$. The bending energy and compressive-force potential are
$$
\boxed{E[\theta]=\frac A2\int_0^L\theta_s^2\,ds
+F\int_0^L\cos\theta\,ds}.
$$
The straight state has $E=FL$. Free pivoting means zero end moment,
$$
\boxed{\theta_s(0)=\theta_s(L)=0}.
$$
The endpoints sharing the $x$ axis impose $\int_0^L\sin\theta\,ds=0$; near the straight state this removes the constant angular mode. The Neumann eigenfunctions therefore give
$$
\boxed{\theta(s)=\sum_{n=1}^\infty a_n
\cos\frac{n\pi s}{L}}.
$$