Fix $f: \mathbb{R}\times \mathbb{R}^n \mapsto \mathbb{R}^n$ and $v\_0:\mathbb{R}^n \mapsto \mathbb{R}^n$. Let $X\_t$ be the solution to the second-order ODE 


$$\frac{d^2}{dt^2}X\_t = f(t,X\_t), \quad X\_0 = id, \frac{d}{dt}X\_t|\_{t = 0}=v\_0.$$


Under what conditions on $f$ and $v\_0$ is $X\_t$ a diffeomorphism?



Diffeomorphisms as solutions to second-order ODEs
First, I just want to consider the requirement that $X\_t$ be a *local* diffeomorphism, which by the inverse function theorem is equivalent to requiring the Jacobian of $X\_t$ to never vanish. We have
$$ X\_t = id + \int\_0^t V\_s\,ds = id + \int\_0^t \left(v\_0 + \int\_0^s f\_r(X\_r)\,dr\right)\, ds \\= id + v\_0 t + \int\_0^t \int\_0^s f\_r(X\_r)\,dr\,ds$$
and so, taking Jacobians,
$$D X\_t = I + (D v\_0)t + \int\_0^t \int\_0^s D f\_r(X\_r) \bullet D X\_r\,dr\,ds$$
where $\bullet$ denotes matrix multiplication. Mirroring the proof of Picard-Lindelöf, we can define a sequence converging to $DX\_T$ by "repeatedly plugging the whole RHS into the term inside the integral", which should converge by the Banach fixed point theorem, assuming $f$ is Lipschitz. So we get an infinite sum that looks like
$$DX\_t = I + (Dv\_0)t + \int\_0^t \int\_0^s D f\_r(X\_r) + r\,D f\_r(X\_r)\bullet D v\_0\,dr\,ds \\
+ \int\_0^t\int\_0^s\int\_0^r\int\_0^u Df\_v(X\_v)+v\,Df\_v(X\_v)\bullet D v\_0\,dv\,du\,dr\,ds + \cdots $$


Now, it seems to me that a very natural condition to impose is that $Dv\_0$ be nilpotent. After all, consider the case where $f = 0$, so $DX\_t = I + D v\_0\,t$. This matrix will be non-invertible as soon as $t$ hits $-1/\lambda$ for any nonzero eigenvalue $\lambda$ of $Dv\_0$. So if $Dv\_0$ has any nonzero eigenvalues, $DX\_t$ will be singular in some finite time.\*


Once we start thinking this way, it's natural to continue and require $D f\_t$ to be nilpotent at each point, and to commute with $Dv\_0$, so that their product is also nilpotent. We will then have $DX\_t = I + nilpotent$, so that it's unipotent, and in particular a local diffeo.


Going from that to a *global* diffeo is a much much harder problem. Based on preliminary googling (search for example 'global univalence'), this is an active area of research that a lot of work has been done in, but which still has a lot of open conjectures -- it's quite close to the famous Jacobian conjecture for polynomial maps. One conjecture I encountered [here](https://arxiv.org/pdf/math/9907157.pdf) on page 5 is the following:


Conjecture 3 ($C^1$ Unipotent Jacobian Univalence Conjecture). If $f: \mathbb R^n \to \mathbb R^n$ is $C^1$ and $Df$ is unipotent, then $f$ is injective.


which would apply in this case. This seems to have been proven for $n = 2$, and there are other results about so-called "P-matrices" and "N-matrices" where it is also known. Surjectivity also seems to be an easier problem than injectivity. In any case, I think the moral is that you'll probably have to do a dig through the literature to see if you can find something that applies in your case.


\*I'm going off your question that we want $X\_t$ to be defined for all time, positive and negative. If you only care about $t>0$, you could make the weaker assumption that the eigenvalues of $Dv\_0$ and $Df\_t(X\_t)$ are always positive (and still that they commute), which would related to Conjecture 2 from the same paper, since the eigenvalues of $DX\_t$ would be bounded away from 0.


