You can determine if the function has a local extremum. If a function is continuous and has, say, a maximum, then it is not injective since it assumes the same values on both sides of that point of maximum.
I'm reviewing Meirovitch's "Methods of Analytical Dynamics," and I don't understand the commutation of the derivative from r to dr:
$$
\mathbf{F} \cdot d\mathbf{r} = m \ddot{\mathbf{r}} \cdot d\mathbf{r} = m\mathbf{\dot{r}} \cdot d\mathbf{\dot{r}}
$$