Solution (source code)

= Solution

Use units $c=1$ throughout. Set $\chi=|\mathbf x|$, so the spatial Euclidean metric is $d\mathbf x^2=d\chi^2+\chi^2d\Omega^2$. On either hemisphere of the embedded <three-sphere>, the constraint gives $u^2=R^2-\chi^2$ and hence
$$
du=-\frac\chi u\,d\chi,\qquad
d\ell^2=\frac{d\chi^2}{1-\chi^2/R^2}+\chi^2d\Omega^2.
$$
Introduce the dimensionless <comoving coordinate> $r=\chi/R$. Then
$$
\boxed{ds^2=-dt^2+a(t)^2\left\{\frac{dr^2}{1-Kr^2}+r^2d\Omega^2\right\},\qquad a(t)=Rb(t),\quad K=+1.}
$$
This is the positively curved <Friedmann-Lemaître-Robertson-Walker metric>, with $a(t)$ the physical curvature radius. An equally valid convention retains $r=\chi$, takes $a=b$, and sets $K=R^{-2}$; only the coordinate normalization differs. The chart with $r\leq1$ describes a hemisphere, not the entire closed slice. Writing $r=\sin\psi$ gives $d\ell^2=R^2(d\psi^2+\sin^2\psi\,d\Omega^2)$, with $0\leq\psi\leq\pi$, displaying the full <spherical spatial slices of a closed FLRW universe>.