Solution (source code)

= Solution

For pressureless matter, $\rho_ma^3=\rho_{m,0}$ when $a_0=1$. Set
$$
D=\frac{8\pi G\rho_{m,0}}3;
$$
then $\dot a^2=D/a-k$. Substitution of $a=A(1-\cos\theta)$ makes this identity hold when
$$
\boxed{A=\frac{D}{2k}=\frac{4\pi G\rho_{m,0}}{3k}},
\qquad
\boxed{B=\frac{A}{\sqrt k}=\frac{D}{2k^{3/2}}}.
$$
Indeed $dt/d\theta=B(1-\cos\theta)=Ba/A$, and hence
$$
t=B(\theta-\sin\theta)
$$
after setting $t=0$ at $\theta=0$. This is the <closed matter-dominated Friedmann solution>.