$${\Sigma_i^N m_i v_i^2 = G \Sigma_i^N \frac{Mm_i}{r_i}.}$$