How do we simulate a (free) falling object?

Well, the answer, in principle, is rather simple: just solve the equation y'' = -g, where g is gravity.

And this works, perfectly well... except when the object reaches the ground. Then, we would expect the object to rebound.

When rebounding, the object changes instantly its velocity from downwards (negative) to upwards (positive). If the rebounding is perfectly elastic, then the object's velocity remains constant in modulus.

But, how would you implement this in a simulation?

This example shows two possible approaches to solve this problem.

The first one uses the closed form solution of the equations for the movement. It is fast, clean and efficient. But implies that we know the solution. In other, more complicated situations, we might not be able to solve these equations. For instance, if there is an external variable force applied to the falling object.

The second approach implies fine-tuning the way we solve numerically the second order differential equation at every moment. When the object comes closer to the ground, we ask the method to use a smaller time step. This provides a more accurate computation of the velocity the object had when reaching the ground.

The disadvantage is that the simulation seems to run slower at the critical moment. We try to compensate this, by asking Ejs to run faster!

Author : Francisco Esquembre

From an original idea from Taiwan Workshop on Ejs Date : March 2002

**Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop.**This work is licensed under a Creative Commons Attribution 2.5 Taiwan License

- Please feel free to post your ideas about how to use the simulation for better teaching and learning.
- Post questions to be asked to help students to think, to explore.
- Upload worksheets as attached files to share with more users.