Maximum-volume cuboid in a hemisphere (source code)

= Maximum-volume cuboid in a hemisphere
{title2=$V_{\max}=4a^3/(3\sqrt3)$}

For a closed <hemisphere> of <radius> $a>0$, take a <rectangular parallelepiped> with a face on the flat base, base half-widths $x,y>0$ and height $z>0$. Its curved-boundary constraint is $x^2+y^2+z^2=a^2$ and its <volume> is $4xyz$. A <Lagrange multiplier> gives $x=y=z=a/\sqrt3$, yielding the displayed maximum. The full edge lengths are $2a/\sqrt3,2a/\sqrt3,a/\sqrt3$.

This bound remains valid when arbitrary orientations are allowed. Write a cuboid's half-edge lengths as $u_1,u_2,u_3$, its center components in its orthonormal edge basis as $v_i$, and the vertical unit-vector components as $n_i$. Containment above the base plane requires $\sum n_iv_i\geq\sum|n_i|u_i$. Hence $|v_j|\geq u_j$ for at least one $j$: otherwise every contributing term would be strictly smaller than its required bound. Its farthest vertex has squared distance
$$
\sum_i u_i^2+\sum_i v_i^2+2\sum_i u_i|v_i|
\geq\sum_{i\ne j}u_i^2+4u_j^2.
$$
Containment in the sphere bounds the right side by $a^2$. The <arithmetic-geometric mean inequality> then gives $2u_1u_2u_3\leq a^3/(3\sqrt3)$, so the full <volume> $8u_1u_2u_3$ cannot exceed the displayed value. The constructed cuboid attains it. With strict containment and no boundary contact, the same value is a supremum.