Solution (source code)

= Solution

Set $x=e^z>0$. The <chain rule> gives $\ddot x=x(\ddot z+\dot z^2)$, so the transformed equation is the forced <harmonic oscillator> $\ddot x+x=-1$, with $x(0)=1$ and $\dot x(0)=V$. Therefore
$$
\boxed{z(t)=\log(2\cos t+V\sin t-1)}.
$$
This real solution is defined only where its <logarithm> has positive argument. Put $R=\sqrt{V^2+4}$ and $\delta=\arctan(V/2)$. Then $x+1=R\cos(t-\delta)$, and the connected interval containing zero is $|t-\delta|<\arccos(1/R)$.

Since $\dot z=\dot x/x$, a <stationary point> requires $\dot x=0$. The positive branch cannot contain the oscillator minimum $x=-R-1$. It contains the maximum $x=R-1$, attained first at $t=\delta$. Hence
$$
\boxed{z=\log(\sqrt{V^2+4}-1)}.
$$
At the endpoints where $x\downarrow0$, $z$ tends to minus infinity; the oscillator solution cannot be continued through those zeros as a finite real $z$.