We now focus on a sub problem: calculation of the norm of the partial velocities after the collision for each body. This problem can be seen as a head-on collision where:
$$ \frac{1}{2}m_1\|\vec{u_{12}}\|^2 + \frac{1}{2}m_2\|\vec{u_{21}}\|^2 = \frac{1}{2}m_1\|\vec{v_{12}}\|^2 + \frac{1}{2}m_2\|\vec{v_{21}}\|^2 $$
can be rewritten as:
$$ m_1(\|\vec{u_{12}}\|^2 - \|\vec{v_{12}}\|^2) = m_2(\|\vec{v_{21}}\|^2 - \|\vec{u_{21}}\|^2) $$
$$ m_1\vec{u_{12}} + m_2\vec{u_{21}} = m_1\vec{v_{12}} +m_2\vec{v_{21}} $$
can be rewritten as:
$$ m_1\|\vec{u_{12}}\|+m_2\|\vec{u_{21}}\|=m_1\|\vec{v_{12}}\|+m_2\|\vec{v_{21}}\| $$
and :
$$ m_1(\|\vec{u_{12}}\| - \|\vec{v_{12}}\|) = m_2(\|\vec{v_{21}}\|-\|\vec{u_{21}}\|) $$
Whole system is given by:
$$ \begin{cases} m_1(\|\vec{u_{12}}\|^2 &-& \|\vec{v_{12}}\|^2) & = & m_2(\|\vec{v_{21}}\|^2 &-& \|\vec{u_{21}}\|^2) \\ m_1(\|\vec{u_{12}}\| &-& \|\vec{v_{12}}\|) & = & m_2(\|\vec{v_{21}}\| &-& \|\vec{u_{21}}\|) \end{cases} $$
The previous system can be rewritten as:
$$ \begin{cases} m_1( \|\vec{u_{12}}\| + \|\vec{v_{12}}\|)( \|\vec{u_{12}}\| - \|\vec{v_{12}}\|) & = & m_2(\|\vec{v_{21}}\| - \|\vec{u_{21}}\|)(\|\vec{v_{21}}\| + \|\vec{u_{21}}\|) \\ m_1(\|\vec{u_{12}}\| - \|\vec{v_1}\|) & = & m_2(\|\vec{v_{21}}\| - \|\vec{u_{21}}\|) \end{cases} $$
Dividing the first equation by the second gives us:
$$ \|\vec{u_{12}}\| + \|\vec{v_{12}}\| = \|\vec{u_{21}}\| + \|\vec{v_{21}}\| $$
A new system can be formulated:
$$ \begin{cases} \|\vec{u_{12}}\| + \|\vec{v_{12}}\| &=& \|\vec{u_{21}}\| + \|\vec{v_{21}}\| \\ m_1(\|\vec{u_{12}}\| - \|\vec{v_{12}}\|) &=& m_2(\|\vec{v_{21}}\| - \|\vec{u_{21}}\|) \end{cases} $$
Let multiply the first equation by \(m_1\):
$$ \begin{cases} m_1\|\vec{u_{12}}\| &+& m_1\|\vec{v_{12}}\| &=& m_1\|\vec{u_{21}}\| &+& m_1\|\vec{v_{21}}\| \\ m_1\|\vec{u_{12}}\| &-& m_1\|\vec{v_{12}}\| &=& m_2\|\vec{u_{21}}\| &-& m_2\|\vec{v_{21}}\| \end{cases} $$
Adding the first equation to the second gives us:
$$ 2m_1\|\vec{u_{12}}\| = (m_1-m_2)\|\vec{u_{21}}\| + (m_1+m_2)\|\vec{v_{21}}\| $$
Velocities \(\|\vec{v_{12}}\|\) and \(\|\vec{v_{21}}\|\) after the collision can now be deduced:
$$ \begin{cases} \|\vec{v_{12}}\| = \frac{1}{m_1+m_2} [ 2m_2\|\vec{u_{21}}\| + (m_1-m_2)\|\vec{u_{12}}\| ] \\ \|\vec{v_{21}}\| = \frac{1}{m_1+m_2} [ 2m_1\|\vec{u_{12}}\| + (m_2-m_1)\|\vec{u_{21}}\| ] \end{cases} $$
Considering opposite directions of \(\vec{u_{21}}\) in regard of \(\vec{u_{12}}\). The previous equations become:
$$ \begin{cases}
\|\vec{v_{12}}\| = \frac{1}{m_1+m_2} [ (m_1-m_2)\|\vec{u_{12}}\| - 2m_2\|\vec{u_{21}}\| ] \\
\|\vec{v_{21}}\| = \frac{1}{m_1+m_2} [ (m_1-m_2)\|\vec{u_{21}}\| + 2m_1\|\vec{u_{12}}\| ]
\end{cases} $$
Velocity \(\vec{v_1}\) can now be computed:
$$ \vec{v_1}=\vec{u_{11}}+\vec{v_{12}} = \|\vec{u_{11}}\| \left( \begin{array}{r c l} -sin(\alpha_1) \\ cos(\alpha_1) \end{array} \right) + \|\vec{v_{12}}\| \left( \begin{array}{r c l} cos(\alpha_1) \\ sin(\alpha_1) \end{array} \right) $$
Taking into account opposite direction of \(\vec{v_{21}}\) allows us to compute \(\vec{v_2}\):
$$ \vec{v_2}=\vec{u_{22}}+\vec{v_{21}} = \|\vec{u_{22}}\| \left( \begin{array}{r c l} -sin(\alpha_2) \\ cos(\alpha_2) \end{array} \right) - \|\vec{v_{21}}\| \left( \begin{array}{r c l} cos(\alpha_2) \\ sin(\alpha_2) \end{array} \right) $$