Solution (source code)

= Solution

Take downward deflection $y(x)$ positive, with the support level $y=0$. The <rectangular section second moment of area> about the horizontal <neutral axis> is
$$
I=a\int_{-b/2}^{b/2}z^2\,dz=\frac{ab^3}{12}.
$$
For small slopes the <curvature> relation from part (b), with the stated sign convention, is
$$
EIy''=-\frac q2x(L-x).
$$
Integrating twice gives
$$
EIy'=-\frac{qLx^2}{4}+\frac{qx^3}{6}+C_1,\qquad
EIy=-\frac{qLx^3}{12}+\frac{qx^4}{24}+C_1x+C_2.
$$
The support <boundary conditions> $y(0)=y(L)=0$ give $C_2=0$ and $C_1=qL^3/24$. Hence
$$
\boxed{y(x)=\frac{q}{24EI}\left(x^4-2Lx^3+L^3x\right)
=\frac{\rho g}{2Eb^2}\left(x^4-2Lx^3+L^3x\right),\quad0\le x\le L.}
$$
This is a downward displacement; its upward component is $-y(x)$. As checks, reflection <symmetry> gives $y'(L/2)=0$, and the maximum downward deflection is
$$
\boxed{y_{\max}=y(L/2)=\frac{5qL^4}{384EI}=\frac{5\rho gL^4}{32Eb^2}.}
$$
The units are length: $\rho g/(Eb^2)$ has units $\mathrm{m^{-3}}$. The width $a$ cancels because both weight and bending resistance scale with it. The small-slope approximation requires $\rho gL^3/(Eb^2)\ll1$; <shear strain> is also neglected, as appropriate for a slender <elastic beam>.

\Image[/past-exam-of-the-physics-b-course-of-the-university-of-cambridge/2022/paper-1-b7-self-weight-deflection.png]
{title=Calculated deflection of a simply supported beam under its own weight; downward displacement is positive}