Solution (source code)

= Solution

Here $F_y=\rho g$, $F_{y'}=0$, and $F_{y''}=Ky''$. The <Euler-Lagrange equation for a second-derivative functional> is therefore
$$
\boxed{Ky^{(4)}+\rho g=0.}
$$
Write $q=\rho g/K>0$. After imposing the clamped conditions at zero, the general solution is
$$
y(x)=-\frac q{24}x^4+\frac A6x^3+\frac B2x^2.
$$
\b[Free right endpoint.] Both endpoint variations are free, so the <natural boundary conditions for second-derivative functionals> give $y''(L)=y'''(L)=0$. Since $y'''=-qx+A$ and $y''=-qx^2/2+Ax+B$, they give $A=qL$, $B=-qL^2/2$. Hence
$$
\boxed{y_{\mathrm{free}}(x)=-\frac{\rho g}{24K}(x^4-4Lx^3+6L^2x^2).}
$$
\b[Right endpoint with fixed height and free slope.] Now $y(L)=0$ is imposed, while the free slope gives $y''(L)=0$. These equations yield $A=5qL/8$ and $B=-qL^2/8$, so
$$
\boxed{y_{\mathrm{pinned}}(x)=-\frac{\rho g}{48K}(2x^4-5Lx^3+3L^2x^2).}
$$
\b[Both endpoints clamped.] The right conditions are $y(L)=y'(L)=0$, giving $A=qL/2$, $B=-qL^2/12$. Thus
$$
\boxed{y_{\mathrm{clamped}}(x)=-\frac{\rho g}{24K}x^2(x-L)^2.}
$$
Each formula has fourth derivative $-\rho g/K$ and satisfies all four boundary conditions of its case. The three endpoint choices therefore change the integration constants, not the interior <differential equation>.

\Image[/past-exam-of-the-short-options-course-of-the-university-of-oxford/2014-elastic-beam-boundaries.png]
{title=Elastic beam deflections under three right-end boundary conditions}
{description=Original dimensionless plots of the three quartic solutions. Each beam is clamped horizontally at the left. Requiring the right height, then the right slope as well, progressively restricts the admissible deflections.}