Through a physics problem I ended up with a nonlinear second-order ODE, which can be written on the following form: $$(y_x)^2 + ay_x + b y^{-3} + \frac{1}{3} y y_{xx} = 0$$ If we solve for $y_x$, and apply the quadratic formula, we get $$y_x = \frac{1}{2} \left( -a \pm \sqrt{a^2 - 4\left( by^{-3} + \frac{1}{3}y y_{xx} \right)} \right)$$ which means that for a single set of values for $(y,y_{xx})$, there are two different values of $y_x$ that satisfy the ODE. I have never seen this before, and wondered what this would mean for solution uniqueness.
I happened to find an analytical solution, namely $$y_x = - \frac{b}{a} y^{-3}$$ I wondered which of the two $\pm$ solutions this corresponded to, and I found out that it was both. It corresponds to the plus-solution for small $y$, but at the point where $y_x$ has a single solution, it switches to the minus-solution.
For various reasons I wanted to implement numerical integration of such an equation. I defined $y_0 = y$ and $y_1 = y_x$, and set up the equivalent system of first order ODEs, $$ y_{0,x} = y_1 \\ y_{1,x} = -3 \frac{(y_1)^2}{y_0} - 3a \frac{y_1}{y_0} - 3by^{-4} $$ and integrated from an initial condition corresponding to the analytical solution. However, this did not give back the analytical solution. It only did up until the point where $y_x$ has a single solution. The numerical solution stuck to the plus-solution, and thus went off in a different direction.
The mechanism for how the ODE system picks out one of the solutions is a mystery to me. For physical reasons I know what the sign of $y_{xx}$ should be. The question then is, how can I formulate the set of 1st order ODEs so that the correct solution is integrated? The integration looks straigh forward (numerically), so how does it pick a "branch"?