Solution (source code)

= Solution

For $\theta=a_1\cos(\pi s/L)$, expansion through fourth order gives
$$
\widetilde E:=E-FL
=\boxed{\frac L4(F_c-F)a_1^2
+\frac{FL}{64}a_1^4},
$$
where
$$
\boxed{F_c=\frac{A\pi^2}{L^2}}.
$$
Stationarity gives
$$
a_1=0
\quad\text{or}\quad
\boxed{a_1^2=\frac{8(F-F_c)}F
=\frac{8\epsilon}{1+\epsilon}},
\qquad
\epsilon=\frac{F-F_c}{F_c}.
$$
The two signs of $a_1$ are the symmetry-related buckled states of a supercritical <pitchfork bifurcation>.

The projected length is $L_\parallel=\int_0^L\cos\theta\,ds$. Hence
$$
C=1-\frac{L_\parallel}{L}
=\frac{a_1^2}{4}-\frac{a_1^4}{64}+O(a_1^6).
$$
On the buckled branch,
$$
\boxed{C(F)=\frac{2\epsilon+\epsilon^2}{(1+\epsilon)^2}
=2\epsilon+O(\epsilon^2)}.
$$