Solution (source code)

= Solution

With $p=-P$, the allowed range is $|x|\le X_2$, where $X_2=\sqrt{2P/a}$. But an orbit starting with $x\ne0$ never crosses the midplane in finite <time>, because
$$
\dot x^2=\frac{a^2}{m^2}x^2(X_2^2-x^2).
$$
One positive-side <separatrix>, with $u=\omega(t-t_c)$ and $\omega=\sqrt{2Pa}/m$, is
$$
\boxed{x=X_2\operatorname{sech}u,\qquad
z=z_c+\frac{P}{m\omega}(2\tanh u-u).}
$$
The negative-side orbit is its reflection in $x=0$. For the positive branch, $x$ rises from zero asymptotically, reaches $X_2$ at $u=0$, then returns asymptotically to zero. Thus the infimum is zero but it is not attained in finite <time> on this nontrivial branch. Since $\dot z=(P/m)(2\operatorname{sech}^2u-1)$, the two axial-velocity zeros occur at $x=\sqrt{P/a}$. Motion is toward decreasing $z$ near either asymptotic midplane tail and toward increasing $z$ near the outer excursion. These directions are marked in part <S7/1/f/i>.

The exactly midplane initial state $x=0$, $\dot x=0$ is a separate straight <trajectory> with $\dot z=-P/m$; it must not be described as a finite-time crossing of the <separatrix>.