Skip to content
ScienceQuest
Mechanics Simulator School

Elastic and Inelastic Collision Simulator

Collide two bodies with adjustable masses, velocities and restitution. Momentum is conserved at every setting, kinetic energy at only one of them.

Simulator

Left velocity after
-2 m/s
Right velocity after
3 m/s
Momentum
Before and after. These agree at every restitution, which is the point.
5 to 5 kg m/s
Kinetic energy
Only equal when restitution is exactly 1.
17.5 to 17.5 J
Energy lost
To heat, sound and permanent deformation.
0 (0%) J
Closing to separation
Their ratio is the coefficient of restitution, by definition.
5 to 5 m/s
Parameters
kg
m/s

Positive is rightward. The left cart has to be gaining to ever catch up.

kg
m/s

1 bounces perfectly. 0 makes them stick. Momentum survives either way, energy does not.

  • Left body
  • Right body
Velocity of each body against time. Both traces are flat until the impact and flat after it, because nothing acts on either body except the collision itself.

Citing this tool

Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.

Teaching with this? You can put it on a class page or LMS for free, with no ads inside the frame. Get the embed code.

The equation

m1u1+m2u2=m1v1+m2v2m_1u_1 + m_2u_2 = m_1v_1 + m_2v_2

Conservation of momentum with Newton’s law of restitution

Two conservation laws, and only one of them always holds

Every collision problem is built on the same two statements, and the difference between them is the whole subject. Momentum is conserved whenever no outside force acts: the two bodies push on each other with equal and opposite forces for exactly the same length of time, so the impulse one receives is the impulse the other gives up. Nothing about that argument mentions what the bodies are made of, which is why it holds for a superball and for a lump of putty alike.

Kinetic energy has no such guarantee. It is conserved only when the bodies spring back perfectly, and real materials never quite do. Push the restitution slider down and watch the two readouts part company: the momentum figures stay locked to each other while the energy figures diverge. That gap is not an error in the simulation, it is where the energy went.

Restitution is one dial, not two separate problems

Textbooks usually present the elastic collision and the perfectly inelastic collision as unrelated exercises with unrelated formulae, which is how they come to be memorised as two disconnected results. They are the two ends of a single expression. The coefficient of restitution e is defined as the ratio of separation speed to approach speed:

v₂ - v₁ = e (u₁ - u₂)

Pair that with conservation of momentum and you have two linear equations in two unknowns. Solving them once gives a result that collapses to the familiar velocity swap at e = 1 and to a single shared final velocity at e = 0, with every real material in between. This simulator solves that pair rather than switching between two special cases, which is why the motion changes continuously as you drag the slider instead of jumping at the ends.

How much energy a collision can lose

The loss has a closed form, and it is worth seeing because it explains which collisions are violent and which are gentle:

ΔKE = ½ · (m₁m₂ / (m₁ + m₂)) · (1 - e²) · (u₁ - u₂)²

Three things follow. The loss depends on the relative velocity, not on either speed alone, so two cars closing at 100 km/h wreck each other whether one is parked or both are doing 50. It scales with the square of that relative velocity, so doubling a closing speed quadruples the damage. And it vanishes at e = 1 exactly, which is the only reason a perfectly elastic collision is a useful idealisation at all.

The reduced mass factor m₁m₂ / (m₁ + m₂) is the term that catches people out. Make one body enormously heavier than the other and that factor tends towards the lighter mass, so a ball bouncing off a wall loses energy according to the ball’s mass and not the wall’s. The wall takes momentum away, but it barely moves and so takes almost no energy.

Why the centre of mass gives the game away

The marker gliding above the track is the centre of mass of the pair, and it never changes speed. It cannot: an internal force is incapable of accelerating a system’s centre of mass, and the collision is entirely internal. Both bodies visibly change velocity while that marker crosses the impact without so much as a kink.

This is also the quickest route to the perfectly inelastic answer without any algebra. If the bodies end up moving together, they must be moving with the centre of mass, so their shared final velocity is simply the total momentum divided by the total mass. Set restitution to 0 and watch both bodies settle onto the marker.

Common mistakes

  • Assuming kinetic energy is conserved because momentum is. These are separate claims with separate conditions. Momentum survives every collision here; energy survives exactly one.
  • Dropping the signs. Velocity is a vector even in one dimension. A body moving left has a negative velocity, and treating it as a positive number is the single most common way to get a collision problem wrong.
  • Thinking a moving body always carries on forwards. A light body hitting a much heavier stationary one bounces back, and the heavy one creeps forward. Set the left mass to 0.2 kg, the right mass to 20 kg and the right velocity to 0 to see it.
  • Expecting a collision whenever two bodies move towards each other on paper. What matters is the relative velocity. Two bodies travelling the same way only meet if the one behind is faster, and the scene says so rather than pretending an impact happened.
  • Using restitution above 1. That would mean the bodies separate faster than they approached, creating energy from nothing. The slider stops at 1, and a value from a shared link is clamped.

Model and assumptions

Method
Exact expression, no time stepping
Repeatability
Deterministic. The same link gives the same numbers on any machine.

What it assumes

  • One dimension, with the outcome solved analytically from conservation of momentum and the coefficient of restitution.
  • Momentum is conserved at every value of restitution; kinetic energy is conserved only at restitution exactly one.
  • The impact is instantaneous, and the bodies are rigid with no rotation.

Numerical accuracy

No method error to report: the result is a closed-form expression evaluated directly, with no time stepping to accumulate error. What remains is double-precision rounding, of order one part in 10^16 per operation.

Elastic and Inelastic Collision Simulator: the equation m₁u₁ + m₂u₂ = m₁v₁ + m₂v₂.
The equation the simulator is built on, with its source. Image © ScienceQuest, CC BY 4.0. Free to reuse with credit and a link to this page; how to reuse it. Download PNG

Common questions

Is momentum always conserved in a collision?

Yes, as long as no outside force acts during the impact. The two bodies push on each other with equal and opposite forces, so whatever momentum one gains the other loses. That holds at every coefficient of restitution, which is why the momentum readout here reads the same before and after no matter where you put the slider.

Why is kinetic energy not conserved as well?

Because the bodies deform. Energy goes into heat, sound and permanent dents, none of which are kinetic energy. Only a perfectly elastic collision, restitution exactly 1, gives all of it back. Set the slider to 0 and the two bodies stick together, which loses the most energy any collision can while still conserving momentum.

What is the coefficient of restitution?

The ratio of the speed the bodies separate at to the speed they approached at. A superball is around 0.9, a tennis ball around 0.75, a lump of putty is 0. It is a property of the two materials together, not of either one alone, and it is what turns the elastic and perfectly inelastic cases from two separate formulae into two ends of one.

Why does the centre of mass marker not change speed at the impact?

Because nothing outside the pair pushed on it. The collision is an internal force, and internal forces cannot accelerate a system’s centre of mass. Watching that marker glide straight through the impact at constant speed is conservation of momentum made visible, and it holds even at restitution 0 where both bodies end up travelling along with it.

Can two bodies moving in the same direction collide?

Only if the one behind is faster. The simulator says so directly: set both velocities the same sign with the rear body slower and the scene reports that these two never meet, because the gap between them only widens. What matters is the relative velocity, not either body’s speed on its own.