Ph · Physics

How to Model Projectile Motion with Differential Equations

Published By the 9to5Science editorial team

At a glance

  1. 1. Choose assumptions

    Decide whether to ignore air resistance and define the launch point, axes, and gravitational acceleration.

  2. 2. Apply Newton’s law

    Resolve the motion into horizontal and vertical components and write one equation for each.

  3. 3. Use initial conditions

    Set the initial position and velocity from the launch height, speed, and angle.

  4. 4. Solve and interpret

    Find position as a function of time, then calculate quantities such as flight time, range, and peak height.

Title: How to Model Projectile Motion with Differential Equations Category: physics

Set up the model

Projectile motion is a useful example of how to turn a physical situation into differential equations. The standard introductory model assumes a flat ground, constant gravitational acceleration, and no air resistance. Under those assumptions, the horizontal and vertical motions can be modeled separately and then combined to predict the trajectory.

Choose a horizontal coordinate xx, with x0=0x_0=0 if the launch point is chosen as the horizontal origin, and let height yy be measured upward from the ground. Write the initial position as (x0,y0)(x_0,y_0) and the launch velocity as v0\mathbf{v}_0. If the launch speed is v0v_0 and its angle above the horizontal is θ\theta, its components are

vx(0)=v0cos⁡θ,vy(0)=v0sin⁡θ.v_{x}(0)=v_0\cos\theta, \qquad v_{y}(0)=v_0\sin\theta.

Newton’s second law is ma=Fm\mathbf{a}=\mathbf{F}. With gravity as the only force, F=(0,−mg)\mathbf{F}=(0,-mg), so the mass cancels:

d2xdt2=0,d2ydt2=−g.\frac{d^2x}{dt^2}=0, \qquad \frac{d^2y}{dt^2}=-g.

Near Earth’s surface, use g≈9.81 m/s2g\approx 9.81\,\text{m/s}^2. The model’s initial conditions are x(0)=x0x(0)=x_0, y(0)=y0y(0)=y_0, and the velocity components above.

Solve the differential equations

Integrate each acceleration equation, applying the initial velocity and position. The resulting position functions are

x(t)=x0+v0cos⁡θ t,x(t)=x_0+v_0\cos\theta\,t, y(t)=y0+v0sin⁡θ t−12gt2.y(t)=y_0+v_0\sin\theta\,t-\frac{1}{2}gt^2.

These equations describe position while the projectile is in flight. For a launch with nonzero horizontal velocity (v0cos⁡θ≠0v_0\cos\theta\ne0), solve the first equation for time and substitute it into the second to get the trajectory as height versus horizontal distance:

y(x)=y0+(x−x0)tan⁡θ−g(x−x0)22v02cos⁡2θ.y(x)=y_0+(x-x_0)\tan\theta-\frac{g(x-x_0)^2}{2v_0^2\cos^2\theta}.

For such a launch, the trajectory is a parabola in this model. For a vertical launch, xx remains constant instead. The equations also show why it helps to split the motion into components: horizontal velocity stays constant, while vertical velocity changes at a constant rate.

Worked example: find the landing distance

A ball is launched at 20 m/s20\,\text{m/s} at 30∘30^\circ above level ground from a height of 1.5 m1.5\,\text{m}. Take the launch point as x0=0x_0=0, use g=9.81 m/s2g=9.81\,\text{m/s}^2, and neglect air resistance. Its initial velocity components are

vx=20cos⁡30∘≈17.32 m/s,vy=20sin⁡30∘=10 m/s.v_x=20\cos 30^\circ\approx17.32\,\text{m/s}, \qquad v_y=20\sin30^\circ=10\,\text{m/s}.

The height is therefore y(t)=1.5+10t−4.905t2y(t)=1.5+10t-4.905t^2. The ball lands when its height is zero. Solving 1.5+10t−4.905t2=01.5+10t-4.905t^2=0 gives two roots; the positive one is

t=10+102+2(9.81)(1.5)9.81≈2.18 s.t=\frac{10+\sqrt{10^2+2(9.81)(1.5)}}{9.81}\approx2.18\,\text{s}.

The negative root does not describe a future landing. Since horizontal speed is constant, the landing distance from the launch point is

x(2.18)≈17.32(2.18)≈37.7 m.x(2.18)\approx17.32(2.18)\approx37.7\,\text{m}.

For another check, the ball reaches its maximum height when vertical velocity is zero. Since vy(t)=10−9.81tv_y(t)=10-9.81t, this occurs after about 1.02 s1.02\,\text{s}. Substituting that time into y(t)y(t) gives a peak height of about 6.60 m6.60\,\text{m} above the ground.

What changes when there is air resistance?

With drag, the acceleration depends on velocity, so the components are coupled through the drag force. A common idealization is linear drag, Fdrag=−bv\mathbf{F}_{\text{drag}}=-b\mathbf{v}, where b>0b>0 is a drag coefficient. Then

mdvxdt=−bvx,mdvydt=−mg−bvy.m\frac{dv_x}{dt}=-bv_x, \qquad m\frac{dv_y}{dt}=-mg-bv_y.

Quadratic drag, often used when drag is proportional to speed squared, has a force proportional to −∥v∥v-\lVert\mathbf{v}\rVert\mathbf{v}. In either case, the simple parabolic trajectory generally no longer applies. Depending on the force law and desired accuracy, you can solve the equations analytically or use numerical methods. A realistic model also needs suitable drag parameters and may need to account for wind and changing air density.

Common modeling mistakes

  • Mixing up signs: If upward is positive, gravity is −g-g in the vertical equation. If you choose downward as positive, change the signs consistently.
  • Using the wrong launch components: The angle is measured from the horizontal here. An angle measured from the vertical gives different component formulas.
  • Treating time as the range: Flight time is in seconds; range is horizontal distance, found by evaluating x(t)x(t) at the landing time.
  • Using the wrong landing condition: If the projectile lands at ground level, set y=0y=0. If it lands on a platform or at another elevation, set yy equal to that landing height.
  • Assuming the ideal model is exact: The no-drag result is a baseline. At high speeds or over long flights, air resistance can make predictions differ substantially from observations.

References

  1. OpenStax, University Physics Volume 1, Section 4.3: Projectile Motion

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.