\frac{d}{dt}\frac{\partial L}{\partial \dot{\vec{r_i}}}-\frac{\partial L}{\partial \vec{r_i}}=0