Lesson 9 of 15

Elastic Collision

Conservation of Momentum

In any collision, total momentum is conserved:

m1v1+m2v2=m1v1′+m2v2′m_1 v_1 + m_2 v_2 = m_1 v_1' + m_2 v_2'

Elastic Collisions

An elastic collision also conserves kinetic energy. Solving both conservation equations simultaneously gives the final velocities:

v1′=(m1−m2)v1+2m2v2m1+m2v_1' = \frac{(m_1 - m_2)v_1 + 2m_2 v_2}{m_1 + m_2}

v2′=(m2−m1)v2+2m1v1m1+m2v_2' = \frac{(m_2 - m_1)v_2 + 2m_1 v_1}{m_1 + m_2}

Special Cases

ScenarioResult
Equal masses (v2=0v_2=0)v1′=0v_1'=0, v2′=v1v_2'=v_1 (complete transfer)
Heavy hits light (m1≫m2m_1 \gg m_2)v1′≈v1v_1' \approx v_1, v2′≈2v1v_2' \approx 2v_1 (light bounces fast)
Light hits heavy (m1≪m2m_1 \ll m_2)v1′≈−v1v_1' \approx -v_1, v2′≈0v_2' \approx 0 (light bounces back)

Examples

m1m_1v1v_1m2m_2v2v_2v1′v_1'
110100.0000 (stops)
210103.3333
10256.6667

Your Task

Implement elasticV1(m1, v1, m2, v2) returning the post-collision velocity of mass 1.

TCC compiler loading...
Loading...
Click "Run" to execute your code.