rm equation