Projectile Motion Trajectory Equation

This comes up every so often. I get a situation (usually, it’s a video analysis problem) in which I can’t rely on the time data. This usually happens when you can see the motion of a projectile, but the middle part (or all of it) is in “slow motion”.

Before looking at the trajectory equation, let’s review what I would normally do for a video analysis. After collection x,y,t data in each frame, I could make two plots. I could plot the horizontal position vs. time. This should be a straight line (because there would be zero acceleration) and the slope of this line would be the horizontal velocity.

The second thing I could do is to plot the vertical position vs. time. This should be a parabola. From the quadratic equation fit of this data, I can find the vertical acceleration.

So, let’s say I can’t do that. How do we get data from an x-vs-y plot? This is the trajectory since it actually shows the path of the projectile. OK, for this case let’s make the following assumptions:

  • It’s a ball. I’m going to call this projectile object a ball. There is no reason for this choice.
  • The ball starts at some position (x_0,y_0).
  • The ball is launched with some initial velocity v_0 and at some angle above the horizontal \theta.
  • In my mind, the ball hits the ground at some point. I’m going to set the ground to be y = 0.
  • Oh, the vertical acceleration is -g, where g = 9.8\text{ m/s}^2.

Now for the physics. First, the initial velocity can be broken into x- and y-components:

v_{x0} = v_0 \cos \theta

v_{y0} = v_0 \sin \theta

For the x-motion, I have the following kinematic equation:

x = x_0 +(v_0 \cos \theta)t

And in the y-direction:

y = y_0 +(v_0 \sin \theta)t - \frac{1}{2} gt^2

In order to get the trajectory equation, I need to eliminate t from these two equations. I’m going to start by solving the x-motion equation for t.

t = \frac{x-x_0}{v_0 \cos \theta}

Now I can substitute this into the y-motion equation.

y = y_0 +\left( \frac{v_0 \sin theta}{v_0 \cos \theta}\right)(x-x_0)-\frac{g}{2v^2_0 \cos^2 \theta}(x-x_0)^2

Oh, notice that the velocity terms cancel in the middle term. Also, we get sine over cosine which is tangent.

y = y_0 +(\tan \theta)(x-x_0)-\frac{g}{2v^2_0 \cos^2 \theta}(x-x_0)^2

This should be good enough. If I make sure that the ball starts at x = 0, then the x-squared term of the quadratic fit in the format of:

y = Ax^2 + B x + C

Where A, B, and C are fitting coefficients. Now, A should be:

A = \frac{g}{2v^2_0 \cos^2 \theta}

So, if I have data and I plot the trajectory, I should be able to find the acceleration. Of course, this assumes that I know the launch velocity and the angle. But wait! I can get the angle from the B term:

B = \tan \theta

But what about the launch velocity? Honestly, I’m not quite sure. I guess if I new the vertical acceleration, I could solve for the launch velocity. Or maybe I could get the velocity from some other source.

Let’s test this stuff out. I could use some video data—but it’s easier to just make a plot in python. Here is a ball launched (with initial x = 0 meters). I get the following for the vertical position vs. time (like I would expect). Here is the code.

That looks good. Now, I’m going to plot two trajectory lines. The first will be calculated in the normal numerical calculation method (same as above but plotting x vs. y instead of t vs. y). The second plot will be the trajectory equation we solved for above. Here’s what I get.

The plots aren’t identical—but I could easily fix that. This shows that the thing works.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.