Lesson 3 of 15

Projectile Range

Projectile Motion

When an object is launched at speed v0v_0 and angle θ\theta above horizontal (ignoring air resistance), it follows a parabolic path. Horizontal and vertical motion are independent.

Horizontal Range

The total horizontal distance (range) when landing at the same height:

R=v02sin(2θ)gR = \frac{v_0^2 \sin(2\theta)}{g}

Maximum Height

hmax=v02sin2(θ)2gh_{\max} = \frac{v_0^2 \sin^2(\theta)}{2g}

Key Observations

  • 45° gives maximum range: sin(2×45°)=sin(90°)=1\sin(2 \times 45°) = \sin(90°) = 1
  • Complementary angles have equal range: 30° and 60° give the same RR
  • Range scales as v02v_0^2 — doubling launch speed quadruples range

Examples at v0=20v_0 = 20 m/s

θ\thetaRR (m)
30°35.3119
45°40.7747
60°35.3119

Your Task

Implement projectileRange(v0, angle_deg) returning range in metres.

Hint: Convert degrees to radians: angle_rad=angle_deg×π/180\text{angle\_rad} = \text{angle\_deg} \times \pi / 180.

TCC compiler loading...
Loading...
Click "Run" to execute your code.