All published worksheets from http://sagenb.org
Image: ubuntu2004
Ball motion with Sage
Jose Guzman(*) and Ignacio Delgado
version 1.0.1
December 09, 2009
(*) This file is under construction. Please send any suggestions or comments to [email protected]
Index
1. Introduction:
We will consider the equation to describe the vertical motion of a ball, and analyze and solve with Sage. Code is extensively commented through the notebook and should be self-explanatory. Comments and suggestions are greatly appreciated.
2. Ball motion equation:
From Newton's second law of motion we can write a mathematical formulation of a ball motion. With this equation we can calculate the ball's vertical position (y) according to the time as follows:
where is the vertical distance, is the initial velocity of the ball, is the acceleration of gravity, and is time.
3. Solving the equation with Sage:
We can look for for solutions to the equation a y=0, to know the time it takes for the ball to move upwards and returns to y again.
We have two possible solutions, corresponding to
or
We can easily solve this with Sage.
We can calculate the maximal vertical distance reached by simply taking the derivative of the function and solve it against time.
Once Again, Sage allows us to perform this simple calculation.
If we equal the equation to zero.
we can calculate the time at which the maximum vertical distance is reached
In Sage, we simply solve the differential equation with respect to t.
4. Graphic representation:
We can plot it now all together.