Direct Collocation for Numerical Optimal Control of Second-Order ODE