Sub topic 3
Eliminating time: the parabolic trajectory
This chapter assumes you can solve quadratic equations, use sine and cosine, and write position and velocity equations for each axis. The code uses Python 3.
Eliminating time to get the path
Horizontal motion gives x = v0 cos(θ) t, so t = x / (v0 cos(θ)). Substitute this into the vertical equation y = v0 sin(θ) t - g t²/2:
y = x tan(θ) - g x² / (2 v0² cos²(θ))
This equation has the form of a parabola in x. The launch point is the origin, and the path bends downward because of the negative x² term.
Velocity and speed at any point
Horizontal velocity stays fixed at vx = v0 cos(θ). Vertical velocity is vy = v0 sin(θ) - g t, and speed is v = sqrt(vx² + vy²).
On level ground with no drag, the projectile lands at its launch height with vy = -v0 sin(θ). The impact speed equals the launch speed. Only the direction changes.
Launching from a raised platform
If the landing level is h0 below the launch point, the vertical position must satisfy h0 + vy t - g t²/2 = 0. Its positive root is t = (vy + sqrt(vy² + 2 g h0)) / g. Multiply by vx to get the horizontal distance.
import math
def flight_from_height(v0, angle_deg, h0, g=9.81):
theta = math.radians(angle_deg)
vx = v0 * math.cos(theta)
vy = v0 * math.sin(theta)
t = (vy + math.sqrt(vy**2 + 2 * g * h0)) / g
return t, vx * t
t, x = flight_from_height(v0=15.0, angle_deg=40.0, h0=10.0)
print(f"T = {t:.2f} s, x = {x:.2f} m")Which angle gives the maximum range?
On level ground, R = v0² sin(2θ) / g. The sine peaks at 2θ = 90°, so the best angle is 45°. From a raised platform, the best angle drops below 45°, because the extra fall time rewards a flatter launch.
When the ideal model fails: air resistance
Drag opposes the velocity, so it slows the projectile in both directions. The range shrinks, and the descent becomes steeper than the ascent. The parabola no longer describes the path, and the analytic formulas stop applying.
Simulating a trajectory step by step
A numerical simulation updates position and velocity in small time steps dt. With drag coefficient k set to zero, the result should be close to the analytic range of 35.31 m for v0 = 20 m/s and θ = 30°.
import math
def simulate_range(v0, angle_deg, k=0.0, dt=0.001, g=9.81):
theta = math.radians(angle_deg)
x, y = 0.0, 0.0
vx, vy = v0 * math.cos(theta), v0 * math.sin(theta)
while y >= 0.0:
speed = math.hypot(vx, vy)
ax = -k * speed * vx
ay = -g - k * speed * vy
x += vx * dt
y += vy * dt
vx += ax * dt
vy += ay * dt
return x
print(f"ideal: {simulate_range(20.0, 30.0):.2f} m")
print(f"with drag: {simulate_range(20.0, 30.0, k=0.02):.2f} m")Exercise
A ball leaves level ground at 20 m/s and 30°. Ignoring drag, what is its speed when it lands?
Show answer
20 m/s. Horizontal velocity stays constant, and vertical velocity reverses sign at the same height, so the speed matches the launch speed.