Okay here it is for elastic. Basically, before and after the collision, total momentum in the system remains the same. Momentum is calculated by Mass*Velocity. So, before collision we have 40*2 + 20*2 = 120. We will need to keep that the same. For the sake of giving proper direction, we will say that the 20g particle has a velocity of -2.
u1 = old velocity of 40g particle (2)
m1 = mass of 40g particle (40)
u2 = old velocity of 20g particle (-2)
m2 = mass of 20g particle (20)
To calculate the new velocity of the 40g particle we will use the following equation:
v = (u1(m1 - m2) + 2*m2*u2) / (m1 + m2)
Plug it all in, do the math and we get:
v = 1.33333 m/s (New velocity of 40g particle)
Do the same for the 20g particle, but swapping the values in the numerator.
v = (u2(m2 - m1) + 2*m1*u1) / (m1 + m2)
v = 3.33333 m/s (New velocity of 20g particle)
Now, we said we had to conserve momentum, so these new velocities have to hold true to that. Let's find out:
40*1.3333 + 20*3.3333 = 119.9999999 (Pretty much 120)
Yup, so that's your answer!
Btw, since they both came out with positive values here, they are both traveling in the positive direction (Since the 20g particle was originally traveling in the negative direction, straight at the 40g particle that was already moving in the positive direction)
(40)>1.33m/s (20)>3.33m/s
Hope that all made sense.
~Plystire
Only those who sow the seeds of their desires will reap their benefits later.
However, I have seeds of my own to tend to. I don't have time to be someone else's watering can.