I found the folowing formula for 1d elastic colition:
$$v_1 +u_1 =v_2+u_2 $$
(v,u means the velocity before and after the collision respectively)
I tried to derivate it from momentum and energy conservations but didn't see how it works. Moreover that, when I tried to see if it works it seems to work for mass ratio of 1,2 and infinity (wall colision).
A problem I saw was that obviously when there is no collision the law dous not apply. Can anyone help me pinpoint what I miss?