Sub topic 13
Two Projectiles in Flight: Relative Motion Along a Straight Line
What you need before this chapter
This chapter assumes you can resolve vectors into components and use the constant-acceleration equations. It also assumes you know level-ground projectile motion and the relation vAB = vA − v_B from the previous chapters. The only new idea is that gravity cancels when you compare two projectiles. That cancellation turns many hard-looking two-body problems into straight-line problems.
Why gravity drops out
Take two projectiles A and B that are both in the air and moving only under gravity. Each has acceleration g pointing down, so the acceleration of B relative to A is
aBA = aB − a_A = g − g = 0.
Zero relative acceleration has three consequences:
- The relative velocity vBA = vB − v_A does not change with time.
- The relative position is r(t) = r₀ + v_BA·t, where r₀ is the position of B relative to A at t = 0.
- In A's frame, B moves in a straight line at constant speed.
You never need to track the two parabolas. You only need the initial relative position and the initial relative velocity.
Launched together from the same point
Suppose both bodies leave the same point at t = 0 with initial velocities u₁ and u₂. Then r₀ = 0 and the relative velocity is u₂ − u₁. The separation is
d(t) = |u₂ − u₁|·t,
and the line joining the bodies keeps a fixed direction.
If the speeds are equal (both u) and the launch directions differ by an angle φ, then |u₂ − u₁| = 2u sin(φ/2).
For example, take u = 20 m/s at 30° and 90° to the horizontal, so φ = 60°. The velocities are (17.32, 10) and (0, 20). The relative velocity is (−17.32, 10), with magnitude 20 m/s. The bodies are 20 m apart after 1 s, as long as both are still in flight.
Collision
B starts at relative position r₀ and moves with constant relative velocity v (written v_BA above). A collision needs r₀ + vt = 0 for some t > 0. That requires two conditions:
- r₀ and v lie on the same line, so r₀ₓ·vy − r₀y·vₓ = 0.
- B moves toward A, so r₀·v < 0.
The collision time is then t = |r₀| / |v|.
Both launched from the ground
If both bodies leave level ground at the same instant, r₀ is horizontal. Parallelism then requires the vertical relative velocity to be zero:
u₁ sinθ₁ = u₂ sinθ₂.
The bodies must have equal vertical launch speeds, so they stay at equal heights throughout. They meet when the horizontal gap closes. If the launch points are a horizontal distance d apart and the horizontal velocities point toward each other, then t = d / (u₁cosθ₁ + u₂cosθ₂).
Worked example. Take g = 9.8 m/s². A leaves the origin with velocity (15, 20) m/s. B leaves the ground at x = 60 m with velocity (−5, 20) m/s.
- The relative velocity of B with respect to A is (−20, 0) m/s, which is horizontal and points toward A.
- The collision time is t = 60/20 = 3 s.
- A's flight time is 2·20/9.8 ≈ 4.08 s, so both bodies are still airborne at t = 3 s.
- The collision happens at x = 15 × 3 = 45 m (B: 60 − 5 × 3 = 45 m, which matches).
- The height at that moment is 20 × 3 − 4.9 × 9 = 15.9 m.
Launched from different heights
If B is launched from a tower or a point above A, r₀ has a vertical part. A collision is still possible, but the relative velocity must point along the line joining the launch points. For a launch point B at height h and horizontal distance d, collision requires
(vBx − vAx) / (vBy − vAy) = −d / h.
In other words, the relative velocity must point along the line from B to A. This is the same condition as before.
Closest approach
If the bodies do not collide, the relative path of B is a straight line that misses A. The closest approach is the foot of the perpendicular from A (the origin of the relative frame) to that line.
- Time of closest approach: t = −(r₀·v) / |v|², valid only if this is positive. Otherwise the bodies are closest at t = 0.
- Minimum distance: dmin = |r₀ × v| / |v|, which in 2D is |r₀ₓ·vy − r₀_y·vₓ| / |v|.
The code below uses this method. It first checks the numbers from the earlier idea (B at (0, 10) relative to A, with relative velocity (3, −4)). It then solves a new case. A leaves the origin with velocity (15, 20) m/s, and B leaves the ground at x = 60 m with velocity (−5, 15) m/s.
import math
def closest_approach(r, v):
"""r: position of B relative to A at t = 0, as (x, y).
v: velocity of B relative to A, as (vx, vy).
Returns (time of closest approach, minimum distance) for t >= 0."""
vv = v[0] ** 2 + v[1] ** 2
if vv == 0:
return 0.0, math.hypot(*r)
t = max(0.0, -(r[0] * v[0] + r[1] * v[1]) / vv)
return t, math.hypot(r[0] + v[0] * t, r[1] + v[1] * t)
# Check case: gives t = 1.6 and distance 6
print(closest_approach((0.0, 10.0), (3.0, -4.0)))
# Two projectiles, relative to A
vA = (15.0, 20.0)
vB = (-5.0, 15.0)
r0 = (60.0, 0.0)
v_rel = (vB[0] - vA[0], vB[1] - vA[1])
t, d = closest_approach(r0, v_rel)
print(round(t, 2), round(d, 2))
# Flight times, to check both bodies are airborne at time t
g = 9.8
print(2 * vA[1] / g, 2 * vB[1] / g)For the second case the relative velocity is (−20, −5) m/s. The code gives t ≈ 2.82 s and d_min ≈ 14.55 m. The flight times are about 4.08 s for A and 3.06 s for B. Both exceed 2.82 s, so the answer is valid.
Different launch times
Suppose B is launched a time τ after A. For times when both are in flight,
vA(t) − vB(t) = (uA − gt) − (uB − g(t − τ)) = uA − uB − gτ.
The relative velocity is still constant, but it contains an extra vertical term of magnitude gτ. You can see this physically. At the moment B is launched, A has already gained a downward velocity gτ. So use A's actual velocity at that moment as the starting point, not its launch velocity. The relative position at that moment is also not the launch separation, because A has moved in the meantime.
Summary of the method
| Question | What to compute | Condition or check | Column | Column | Column | Column |
|---|---|---|---|---|---|---|
| Separation at time t | \ | **r**₀ + **v**t\ | Both bodies airborne | |||
| Collision | r₀ₓ·v_y − r₀_y·vₓ = 0 and **r**₀·**v** < 0 | t = \ | **r**₀\ | / \ | **v**\ | |
| Closest approach time | −(**r**₀·**v**) / \ | **v**\ | ² | Use 0 if negative | ||
| Minimum distance | \ | **r**₀ × **v**\ | / \ | **v**\ | Valid if t is within both flights | |
| Collision from level ground | u₁ sinθ₁ = u₂ sinθ₂ | t = d / (u₁cosθ₁ + u₂cosθ₂) |
Common mistakes
- Using the launch velocity of the earlier-launched body when the launch times differ.
- Forgetting that the relative path is a straight line only in the relative frame. In the ground frame both paths are still parabolas.
- Applying the closest-approach formula when t comes out negative. The minimum is then at t = 0.
- Not checking whether the collision point lies below the ground.
- Mixing the sign convention. Use r = rB − rA and v = vB − vA together, or r = rA − rB and v = vA − vB together.
Exercise
Two stones are thrown at the same instant from the same point on level ground. Stone 1 has speed 30 m/s at 53° above the horizontal (sin 53° = 0.8, cos 53° = 0.6). Stone 2 has speed 30 m/s at 37° above the horizontal (sin 37° = 0.6, cos 37° = 0.8). Find their separation at t = 1 s, and say whether the line joining them rotates.
Show answer
The velocities are (18, 24) and (24, 18) m/s. The relative velocity is (6, −6) m/s, with magnitude 6√2 ≈ 8.49 m/s. Both start at the same point, so the separation at t = 1 s is 6√2 ≈ 8.49 m. The relative velocity is constant and r₀ = 0, so the line joining the stones always points along the same direction (down and to the right at 45°). It does not rotate. Both stones are still airborne at 1 s, since their flight times are 4.9 s and 3.7 s.
Exercise
A ball is thrown from the ground with velocity (12, 16) m/s. At the same instant, a second ball is thrown from the ground 36 m away, horizontally toward the first, with velocity (−x, 16) m/s. For what value of x do the balls collide in the air, and at what height? Take g = 10 m/s².
Show answer
The vertical launch speeds are equal (16 m/s), so the balls stay at the same height and the relative velocity is horizontal, (−x − 12, 0). A collision needs the horizontal gap of 36 m to close, which works for any x > 0 as long as the balls are still in flight. The flight time is 2·16/10 = 3.2 s, so the collision time 36/(12 + x) must be less than 3.2 s. That gives 12 + x > 11.25, which holds for any x > 0. So every positive x gives a collision. For x = 6, for example, t = 36/18 = 2 s, and the height is 16·2 − 5·4 = 12 m.