Solution (source code)

= Solution

Let $s$ denote distance from the <neutral axis> within a cross section. Bending to radius $R$ gives longitudinal <strain> $s/R$, so <Hooke's law> gives <stress> $Es/R$. Its moment is
$$
\boxed{B=\int_A s\frac{Es}{R}\,dA=\frac{EI}{R},\qquad I=\int_A s^2dA.}
$$
Here $E$ is <Young's modulus> and $I$ is the \i[<second moment of area>], not a mass <moment of inertia>. For the stated square orientation, $I=a^4/12$.

For <self-weight deflection of a square cantilever>, the downward load per unit length is $q=\rho a^2g$. A free-end segment from $x$ to $l$ has shear-force magnitude $F(x)=q(l-x)$ and bending-moment magnitude $B(x)=q(l-x)^2/2$. Thus, with the given sign conventions,
$$
-F'(x)=q=B''(x).
$$
Using the small-slope <curvature> $1/R\simeq y''$ for downward deflection,
$$
\boxed{y''''=\beta,\qquad\beta=\frac q{EI}=\frac{12\rho g}{Ea^2}.}
$$
The clamp fixes position and slope, and the unloaded free end has zero moment and shear:
$$
y(0)=y'(0)=0,\qquad y''(l)=y'''(l)=0.
$$
Four integrations yield
$$
y(x)=\frac\beta{24}x^2(x^2-4lx+6l^2),\qquad
\boxed{y(l)=\frac{\beta l^4}{8}=\frac{3\rho g l^4}{2Ea^2}\quad\text{downwards}.}
$$
The linear beam model requires small slopes and <strains>; the strong $l^4$ dependence eventually invalidates that approximation if other dimensions and material properties are fixed.