An elastic collision is a collision in which kinetic energy is conserved. Suppose that we have 2 objects of masses m1 and m2. They collide with initial velocities v1i and v2i. We wish to calculate their velocities after the collision, denoted v1f and v2f, respectively.
First, we consider the equation for the conservation of momentum:
m1v1i+m2v2i=m1v1f+m2v2f
m1(v1i−v1f)=m2(v2f−v2i)
Next, we consider the equation for the conservation of kinetic energy:
21m1v1i2+21m2v2i2=21m1v1f2+21m2v2f2
m1(v1i2−v1f2)=m2(v2f2−v2i2)
Dividing the second equation by the first equation gives us:
v1i+v1f=v2f+v2i
v2f−v1f=v1i−v2i
This division is allowed because the masses are not zero, v1i−v1f=0, and v2f−v2i=0. These last two hold because we are looking for the situation after the collision, not before. Obviously, v1f=v1i and v2f=v2i would satisfy the equations, but that is not what we want.
Note that v2f−v1f is the final velocity of object 2 relative to object 1, while v1i−v2i is the initial velocity of object 1 relative to object 2. Therefore, we can say the following very useful result: In an elastic 1-dimensional collision, the relative velocities switch signs.
This result is very powerful, because we no longer have to use any quadratic equations. Instead, we can solve the following linear system, equivalent to the original system:
m1v1i+m2v2i=m1v1f+m2v2f
v2f−v1f=v1i−v2i
This is very useful in any context requiring fast calculation of the velocities, and it also helps with a general understanding of what occurs in an elastic collision.
There is really no point in trying to solve this system and memorize it, as far as I know, but it is very useful to know this result and use it to simplify the system of equations. But if you insist:
v1f=m1+m22m2v2i+(m1−m2)v1i
v2f=m1+m22m1v1i+(m2−m1)v2i
Note that these solutions are completely symmetric, as they should be. But again, these are just for the sake of completeness and are not worth memorizing.
However, as I stated earlier, the important result is worth remembering: In an elastic 1-dimensional collision, the relative velocities switch signs.
I will now show you a very easy way to remember this result. Since we are dealing with relative velocities, it makes sense to shift our reference frame. Let us look in the reference frame of object 1 (of course, we could also choose object 2, if we wished; the same reasoning will apply). In this reference frame, object 1 stays stationary, while object 2 approaches it, bounces off it, and moves away from it.
But wait! If object 1 is always stationary, we can think of it as a wall! And when object 2 collides with the wall, it will move away with the same speed that it approached, since the collision is elastic! Therefore, the speed at which object 2 approaches object 1 is the same speed at which object 2 moves away from object 1 after the collision! This means that the relative velocities must switch signs.