Solve the following impact equations for unknowns v_{1} and v_{2} :
\begin{array}{c}e=\frac{v_{2}-v_{1}}{u_{1}-u_{2}}\qquad \qquad &(1) \\ \\m_{1} u_{1}+m_{2} u_{2}=m_{1} v_{1}+m_{2} v_{2}\qquad \qquad &(2)\end{array}
where e= coefficient of restitution
u_{1}, u_{2}= speed of bodies 1 and 2 , respectively, before impact
v_{1}, v_{2}= speeds of bodies 1 and 2, respectively, after impact
m_{1}, m_{2}= masses of bodies 1 and 2 , respectively
Multiply (1) by \left(u_{1}-u_{2}\right) m_{1} to obtain
e m_{1}\left(u_{1}-u_{2}\right)=m_{1} v_{2}-m_{1} v_{1}\qquad \qquad (3)
Add (2) and (3) to get
m_{1} u_{1}+m_{2} u_{2}+e m_{1}\left(u_{1}-u_{2}\right)=\left(m_{2}+m_{1}\right) v_{2}\qquad \qquad (4)
Then,
v_{2}=\frac{m_{1} u_{1}(1 + e) + u_{2}\left(m_{2}-e m_{1}\right)}{m_{2} + m_{1}}
Similarly, \qquad \qquad \qquad v_{1}=\frac{m_{2} u_{2}(1 + e) + u_{1}\left(m_{1}-e m_{2}\right)}{m_{2} + m_{1}}