This is a discussion of elastic collision in one dimension.
Before collision: two  particles with mass and velocity as $m_1,\vec{v_1}$ and $m_2,\vec{v_1}$
After collision: the velocity have been changed to $\vec{v_1}'$ and $\vec{v_2}'$

Assume there is no external force or the interval is very short, then
total linear momentum is conserved: i.e. $m_1\vec{v_1}+m_2\vec{v_2}=m_1\vec{v_1}'+m_2\vec{v_2}'$
so $m_1(\vec{v_1}-\vec{v_1}')+m_2(\vec{v_2}-\vec{v_2}')=0$

For elastic collision, the total energy is also conserved. $\frac{1}{2}m_1 v_1^2+\frac{1}{2}m_2 v_2^2==\frac{1}{2}m_1 v_1^{'2}+\frac{1}{2}m_2 v_2^{'2}$
It can be re-write as $\frac{1}{2}m_1(v_1^2-v_1^{'2})= -\frac{1}{2}m_2(v_2^2-v_2^{'2})$
It is the same as m_1(v_1-v_1')(v_1+v_1')= -m_2 (v_2-v_2')(v_2+v_2')
Since $m_1(v_1-v_1')=-m_2 (v_2-v_2')$, so $(v_1+v_1')=(v_2+v_2')$  or $v_1-v_2=v_2'-v_1'$
The result is $v'_1= \frac{m_1-m_2}{m_1+m_2} v_1 +\frac{2m_2}{m_1+m_2}v_2=V_{cm}+\frac{m_2}{m_1+m_2}(v_2-v_1)=2V_{cm}-v_1$
and $v'_2=\frac{2m_1}{m_1+m_2}v_1+\frac{m_2-m_1}{m_2+m_1}v_2=V_{cm}+\frac{m_1}{m_1+m_2}(v_1-v_2)=2V_{cm}-v_2$
where $V_{cm}=\frac{m_1V_1+m_2V_2}{m_1+m_2}$
and $V_{cm}=\frac{v_1+v_1'}{2}=\frac{v_2+v_2'}{2}$ or $v_1+v_1'=v_2+v_2'=2V_{cm}$

It means that from the coordinate of center of mass: $V_{cm}=0$, it reduced to $v_1'=-v_1$ and $v_2'=-v_2$

Define $\rho=\frac{m_2}{m_1}$, the above equations can be re-write as $\frac{v'_1}{v_1}=\frac{1-\rho}{1+\rho}+ \frac{2\rho}{1+\rho}\frac{v_2}{v_1}=2\frac{V_{cm}}{v_1}-1$ $\frac{v'_2}{v_1}=\frac{2}{1+\rho}-\frac{1-\rho}{1+\rho}\frac{v_2}{v_1}=2\frac{V_{cm}}{v_1}-\frac{v_2}{v_1}$

The following simulation plot the above two functions.
The X-axis is $\frac{v_2}{v_1}$, it range from Vscale*xmin to 1. (There is no collision if $v_2>v_1$)
The blue curve is $\frac{v_1^'}{v_1}$ and red curve is $\frac{v_2^'}{v_1}$
You can change the ratio of $\frac{m_2}{m_1}$ with slider.

The default value is $\frac{m_2}{m_1}=1$, so $v_2^'= v_1$ , so $\frac{v_2^'}{v_1}=1$ is a horizontal line $v_1^'=v_2$  , so $v_2$ is a straight line with slope 1 (function of $\frac{v_2}{v_1}$)

Special case:
if $m_1<, $v_1'=-v_1+2v_2$ and $v_2'=v_2$ ,-*-
if $v_2=0$, then $v_1'=-v_1$ and $v_2'=0$
e.g.  a ball hit the wall, it will biunced back with almost the same speed (but in oppositive direction).
if $m_1>>m_2$, $v_1'=v_1$ and $v_2' =2 v_1-v_2$,
if $v_2=0$, then $v_1'=v_1$ and $v_2'=2 v_1$,
e.g. a speedy car hit you while you stand still, you will be kicked by twice the velocity of the car.

/htdocs/ntnujava/ejsuser/2/users/ntnu/fkh/collision1Dplot_pkg/collision1Dplot.propertiesFull screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Download EJS jar file(1327.4kB):double click downloaded file to run it. (16 times by 14 users) , Download EJS source (13 times by 10 users) View EJS source  