with masses m1 and m2