Lesson 2 · Projectile motion¶
For: A-level Physics (for example AQA 3.4.1.4, OCR A 3.1.3, Edexcel Topic 2) and IB Physics (A.1). Check your own specification for the exact wording.
Before this lesson: none of the other lessons. Assumed: the suvat equations and resolving a vector into components.
Leads to: Lesson 3, Circular motion and gravitational orbits; Lesson 6, Charged particles in electric and magnetic fields; Lesson 8, Special relativity.
You will be able to:
- explain why the horizontal and vertical motions of a projectile are independent
- resolve a launch velocity into components and apply the suvat equations to each
- find the time of flight, maximum height and range, and use $R = \dfrac{u^2\sin 2\theta}{g}$ on level ground
- solve problems where the projectile is launched from a height, including horizontal launches
- describe how air resistance changes the path, the range and the best launch angle
How to use this lesson: run each cell with Shift+Enter. Where you see Try it, change a number and run the cell again. Before some experiments a Predict box asks you to commit to an answer; write it down, run the cell, then answer the Explain box below it. Answers to both are at the very end, after the worked solutions. Exercises are at the end, with worked solutions below them.
Throughout, the computer solves Newton's second law step by step (mechanics.projectile), with no projectile formulas built in, and we compare it with the formulas you use in the exam.
# Setup: installs the qplay package if it is missing (for example on Google Colab).
import importlib.util, subprocess, sys
if importlib.util.find_spec("qplay") is None:
subprocess.run([sys.executable, "-m", "pip", "install", "-q",
"quantum-playground"], check=True)
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
from qplay import mechanics
g = 9.81
1. Two motions at once¶
Once a projectile is released, and ignoring air resistance, the only force on it is its weight. So:
- horizontally there is no force, so the velocity is constant: $a_x = 0$
- vertically the acceleration is uniform: $a_y = -g$
The two motions do not affect each other. A classic test: drop one ball and, at the same moment, throw another horizontally from the same height. Which lands first?
Predict (P1). From 20 m up, one ball is dropped and another is thrown horizontally at 15 m s$^{-1}$ at the same moment. Which lands first, or do they land together? Write your prediction down before you run the next cell.
h = 20.0 # launch height in m <- Try it: change h or the throw speed
t_drop, x_drop, y_drop = mechanics.projectile(0.0, 0, h0=h)
t_throw, x_throw, y_throw = mechanics.projectile(15.0, 0, h0=h)
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(10, 3.8))
ax1.plot(x_drop, y_drop, "o-", ms=3, markevery=25, label="dropped")
ax1.plot(x_throw, y_throw, "o-", ms=3, markevery=25, label="thrown at 15 m/s")
ax1.set_xlabel("x / m"); ax1.set_ylabel("height / m"); ax1.set_title("Paths (dots at equal time steps)"); ax1.legend()
ax2.plot(t_drop, y_drop, label="dropped"); ax2.plot(t_throw, y_throw, "--", label="thrown")
ax2.set_xlabel("t / s"); ax2.set_ylabel("height / m"); ax2.set_title("Height against time"); ax2.legend()
print(f"dropped lands after {t_drop[-1]:.3f} s, thrown lands after {t_throw[-1]:.3f} s")
print(f"from s = 1/2 g t^2: t = sqrt(2h/g) = {np.sqrt(2 * h / g):.3f} s")
dropped lands after 2.019 s, thrown lands after 2.019 s from s = 1/2 g t^2: t = sqrt(2h/g) = 2.019 s
Explain (P1). Explain the result by treating the horizontal and vertical motions separately.
They land together. The height-time graphs lie on top of each other: throwing the ball sideways changes nothing about how it falls. In the left plot, the dots on the thrown path are evenly spaced horizontally (constant $v_x$) but get further apart vertically (accelerating downwards).
2. Resolving the launch velocity¶
Launch at speed $u$ and angle $\theta$ above the horizontal. Split the velocity into components:
$$u_x = u\cos\theta,\qquad u_y = u\sin\theta$$
Then apply suvat to each direction separately:
$$x = u_x t,\qquad y = u_y t - \tfrac12 g t^2,\qquad v_y = u_y - g t .$$
On level ground this gives three results worth knowing how to derive:
| quantity | how | result |
|---|---|---|
| time of flight | $y = 0$ again | $T = \dfrac{2u\sin\theta}{g}$ |
| maximum height | $v_y = 0$ | $H = \dfrac{u^2\sin^2\theta}{2g}$ |
| range | $R = u_x T$ | $R = \dfrac{u^2\sin 2\theta}{g}$ |
u, angle = 20.0, 40.0 # launch speed in m/s, angle in degrees <- Try it
th = np.radians(angle)
t, x, y = mechanics.projectile(u, angle)
plt.figure(figsize=(7, 3.8))
plt.plot(x, y, label="simulation")
tt = np.linspace(0, t[-1], 15)
plt.plot(u * np.cos(th) * tt, u * np.sin(th) * tt - 0.5 * g * tt**2, "k.", label="suvat formulas")
plt.xlabel("x / m"); plt.ylabel("y / m"); plt.gca().set_aspect("equal"); plt.legend()
print(" simulation formula")
print(f"time of flight {t[-1]:8.3f} s {2 * u * np.sin(th) / g:8.3f} s")
print(f"maximum height {y.max():8.3f} m {(u * np.sin(th))**2 / (2 * g):8.3f} m")
print(f"range {x[-1]:8.3f} m {u**2 * np.sin(2 * th) / g:8.3f} m")
simulation formula time of flight 2.621 s 2.621 s maximum height 8.423 m 8.424 m range 40.155 m 40.155 m
The path is a parabola: eliminate $t$ from the two equations and you get $y = x\tan\theta - \dfrac{g x^2}{2u^2\cos^2\theta}$, a quadratic in $x$.
Exam tip: at the top of the path the vertical velocity is zero but the horizontal velocity is not, so the speed there is $u\cos\theta$, not zero.
3. Which angle goes furthest?¶
The range $R = \dfrac{u^2 \sin 2\theta}{g}$ is largest when $\sin 2\theta = 1$, that is at $\theta = 45^\circ$. Because $\sin 2\theta = \sin(180^\circ - 2\theta)$, the angles $\theta$ and $90^\circ - \theta$ give the same range: $30^\circ$ and $60^\circ$ land in the same place, the steeper one taking longer and going higher.
u = 20.0
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(11, 3.8))
for angle in [15, 30, 45, 60, 75]:
t, x, y = mechanics.projectile(u, angle)
ax1.plot(x, y, label=f"{angle}°")
ax1.set_xlabel("x / m"); ax1.set_ylabel("y / m"); ax1.set_aspect("equal"); ax1.legend(title="angle")
angles = np.arange(5, 90, 5)
ranges = [mechanics.projectile(u, a)[1][-1] for a in angles]
fine = np.linspace(0, 90, 200)
ax2.plot(fine, u**2 * np.sin(2 * np.radians(fine)) / g, "k:", label=r"$u^2\sin 2\theta / g$")
ax2.plot(angles, ranges, "o", label="simulation")
ax2.set_xlabel("launch angle / degrees"); ax2.set_ylabel("range / m"); ax2.legend();
4. Launching from a height¶
When the projectile starts at height $h$ above where it lands, the time of flight comes from the vertical motion alone, but now $y$ goes from $h$ to $0$:
$$-h = u_y t - \tfrac12 g t^2 .$$
Horizontal launch ($u_y = 0$), for example off a cliff or a table: $t = \sqrt{2h/g}$, and the horizontal distance is $u\,t$. This is what section 1 showed. To find the impact velocity, combine the unchanged $u_x$ with $v_y = g t$: speed $\sqrt{u_x^2 + v_y^2}$, at an angle $\arctan(v_y/u_x)$ below the horizontal.
Angled launch: solve the quadratic for $t$ and take the positive root.
Predict (P2). A ball is thrown at 12 m s$^{-1}$ from 2.0 m above the ground. Is the best angle for range above 45°, at 45° or below 45°? Write your prediction down before you run the next cell.
u, h = 12.0, 2.0 # launch speed and release height <- Try it: set h = 0
angles = np.arange(20, 61, 1.0)
ranges = [mechanics.projectile(u, a, h0=h)[1][-1] for a in angles]
best = angles[np.argmax(ranges)]
plt.figure(figsize=(7, 3.8))
plt.plot(angles, ranges, "o-", ms=3)
plt.axvline(45, color="0.6", ls="--", lw=0.8); plt.axvline(best, color="C3", lw=0.8)
plt.xlabel("launch angle / degrees"); plt.ylabel("range / m"); plt.title(f"Launched from {h} m: best angle is about {best:.0f}°");
Explain (P2). Why does starting above the landing point change the best angle?
5. Air resistance¶
Real projectiles feel drag, roughly proportional to the square of the speed and opposite to the velocity. That force has a horizontal component, so $v_x$ is no longer constant, and the two motions are no longer independent. A-level and IB only ask you to describe the effects, which the simulation shows clearly. Here the drag constant $c$ is typical of a tennis ball.
With air resistance:
- the range and the maximum height are both smaller
- the path is not symmetric: the descent is steeper than the climb, because $v_x$ keeps falling throughout the flight
- the best launch angle is below 45°
Predict (P3). Without air resistance, a 45° throw at 30 m s$^{-1}$ goes 92 m. With tennis-ball drag, roughly how far will it go: 85 m, 60 m or 40 m? Write your prediction down before you run the next cell.
u, c = 30.0, 0.020 # launch speed in m/s, drag constant in 1/m <- Try it: change c
plt.figure(figsize=(8, 3.8))
for i, angle in enumerate([30, 45, 60]):
t, x, y = mechanics.projectile(u, angle)
plt.plot(x, y, ":", color=f"C{i}")
t, x, y = mechanics.projectile(u, angle, drag=c)
plt.plot(x, y, color=f"C{i}", label=f"{angle}°: range {x[-1]:.0f} m with drag")
plt.xlabel("x / m"); plt.ylabel("y / m"); plt.gca().set_aspect("equal")
plt.title("Solid: with air resistance. Dotted: without."); plt.legend();
Explain (P3). Why does drag cut the range so much more than you might expect from a 'small' force?
Drag roughly halves the range here: the best throw drops from about 92 m to about 42 m. Notice too that with drag the 30° throw nearly matches the 45° one: the best angle has moved down.
Exercises¶
Work on paper first, then put your answer in the cell and run it. Take $g = 9.81\ \mathrm{m\,s^{-2}}$ and ignore air resistance unless told otherwise. Give answers to 3 significant figures.
Q1. A ball is kicked from level ground at 18 m s$^{-1}$ at 35° above the horizontal. Find (a) the time of flight, (b) the maximum height, (c) the range.
Q2. A stone is thrown horizontally at 12 m s$^{-1}$ from the top of a cliff 45 m above the sea. Find (a) the time it takes to reach the sea, (b) how far from the foot of the cliff it lands, (c) its speed as it hits the water, (d) the angle, in degrees below the horizontal, at which it hits the water.
Q3. A projectile launched from level ground at 30° has a range of 40 m. Find its launch speed.
Q4. At what launch angle, in degrees, is the maximum height equal to the range?
Q5. A ball is thrown at 12 m s$^{-1}$ at 40° above the horizontal, from 2.0 m above level ground. Find (a) its time of flight, (b) the horizontal distance it travels before landing.
Q6 (simulation). A ball with drag constant $c = 0.020\ \mathrm{m^{-1}}$ is launched from level ground at 30 m s$^{-1}$. Use mechanics.projectile(30, angle, drag=0.020) to find (a) the launch angle that gives the greatest range, to within 2°, and (b) that greatest range. (The range is the last value of x.)
from scipy.optimize import minimize_scalar
def check(name, yours, correct, tol=0.01):
if yours is None:
print(f"{name}: not answered yet")
elif abs(yours - correct) <= tol * abs(correct):
print(f"{name}: correct")
else:
print(f"{name}: not yet, check your working (you gave {yours})")
# The correct values are computed here from the physics, not typed in.
_u, _th = 18.0, np.radians(35)
_t2 = np.sqrt(2 * 45 / g)
_uy5 = 12 * np.sin(np.radians(40))
_t5 = (_uy5 + np.sqrt(_uy5**2 + 2 * g * 2.0)) / g # positive root of -2.0 = u_y t - g t^2 / 2
_best = minimize_scalar(lambda a: -mechanics.projectile(30, a, drag=0.020)[1][-1], bounds=(20, 50), method="bounded")
_answers = {
"Q1a": 2 * _u * np.sin(_th) / g, "Q1b": (_u * np.sin(_th))**2 / (2 * g), "Q1c": _u**2 * np.sin(2 * _th) / g,
"Q2a": _t2, "Q2b": 12 * _t2, "Q2c": np.hypot(12, g * _t2), "Q2d": np.degrees(np.arctan2(g * _t2, 12)),
"Q3": np.sqrt(40 * g / np.sin(np.radians(60))),
"Q4": np.degrees(np.arctan(4)),
"Q5a": _t5, "Q5b": 12 * np.cos(np.radians(40)) * _t5,
"Q6a": _best.x, "Q6b": -_best.fun,
}
# The range is very flat near its maximum, so any angle within 2 degrees of the best counts as correct.
_tol = {"Q6a": 2 / _best.x}
# Replace None with your answers, in SI units (angles in degrees).
mine = {"Q1a": None, "Q1b": None, "Q1c": None, "Q2a": None, "Q2b": None, "Q2c": None, "Q2d": None,
"Q3": None, "Q4": None, "Q5a": None, "Q5b": None, "Q6a": None, "Q6b": None}
for q in mine:
check(q, mine[q], _answers[q], _tol.get(q, 0.01))
Q1a: not answered yet Q1b: not answered yet Q1c: not answered yet Q2a: not answered yet Q2b: not answered yet Q2c: not answered yet Q2d: not answered yet Q3: not answered yet Q4: not answered yet Q5a: not answered yet Q5b: not answered yet Q6a: not answered yet Q6b: not answered yet
Worked solutions¶
Try the questions before reading on.
Q1. $u_x = 18\cos35^\circ = 14.7\ \mathrm{m\,s^{-1}}$, $u_y = 18\sin35^\circ = 10.3\ \mathrm{m\,s^{-1}}$. (a) $T = 2u_y/g = 2 \times 10.32/9.81 = 2.10\ \mathrm{s}$ (b) $H = u_y^2/2g = 10.32^2/19.62 = 5.43\ \mathrm{m}$ (c) $R = u_x T = 14.74 \times 2.105 = 31.0\ \mathrm{m}$
Q2. Vertically, $u_y = 0$: (a) $45 = \tfrac12 \times 9.81\,t^2 \Rightarrow t = \sqrt{90/9.81} = 3.03\ \mathrm{s}$ (b) $x = 12 \times 3.029 = 36.3\ \mathrm{m}$ (c) $v_y = g t = 29.7\ \mathrm{m\,s^{-1}}$, so $v = \sqrt{12^2 + 29.7^2} = 32.0\ \mathrm{m\,s^{-1}}$. The horizontal component is still 12 m s$^{-1}$ at impact. (d) $\arctan(29.7/12) = 68.0^\circ$ below the horizontal.
Q3. $R = \dfrac{u^2\sin 2\theta}{g} \Rightarrow u = \sqrt{\dfrac{Rg}{\sin 60^\circ}} = \sqrt{\dfrac{40 \times 9.81}{0.866}} = 21.3\ \mathrm{m\,s^{-1}}$
Q4. Set $\dfrac{u^2\sin^2\theta}{2g} = \dfrac{2u^2\sin\theta\cos\theta}{g}$. Cancel $u^2\sin\theta/g$ to get $\sin\theta = 4\cos\theta$, so $\tan\theta = 4$ and $\theta = 76.0^\circ$. The speed does not matter.
Q5. $u_y = 12\sin40^\circ = 7.71\ \mathrm{m\,s^{-1}}$, $u_x = 12\cos40^\circ = 9.19\ \mathrm{m\,s^{-1}}$. Vertically, taking up as positive: $-2.0 = 7.71t - 4.905t^2$, so $4.905t^2 - 7.71t - 2.0 = 0$. The positive root is (a) $t = \dfrac{7.71 + \sqrt{7.71^2 + 4 \times 4.905 \times 2.0}}{2 \times 4.905} = 1.80\ \mathrm{s}$, and (b) $x = 9.19 \times 1.799 = 16.5\ \mathrm{m}$. The other root is negative: it is when the ball would have been at ground level if its path extended backwards.
Q6. There is no formula with drag, so scan the angle and pick the largest range. The cell below does this properly with a numerical optimiser.
for q, value in _answers.items():
print(f"{q}: {value:#.3g}")
angles = np.arange(25, 56, 1.0)
plt.figure(figsize=(6, 3.4))
plt.plot(angles, [mechanics.projectile(30, a, drag=0.020)[1][-1] for a in angles], "o-", ms=3)
plt.axvline(_answers["Q6a"], color="C3", lw=0.8)
plt.xlabel("launch angle / degrees"); plt.ylabel("range / m"); plt.title("Q6: range with air resistance");
Q1a: 2.10 Q1b: 5.43 Q1c: 31.0 Q2a: 3.03 Q2b: 36.3 Q2c: 32.0 Q2d: 68.0 Q3: 21.3 Q4: 76.0 Q5a: 1.80 Q5b: 16.5 Q6a: 39.1 Q6b: 42.2
The answer to Q6 is about $39^\circ$, giving 42.2 m. Without drag the same throw would reach $u^2/g = 91.7$ m at 45°. Notice how flat the curve is near the top: anywhere from about 36° to 42° loses less than half a metre, which is why the exercise accepts any angle within 2° of the best.
Next: in section 5, set c = 0.005 (a heavier, smoother ball) and then c = 0.05 (a light, fluffy ball), and watch the best angle move.
Predict and explain: answers¶
P1. They land together. Vertically both start with zero velocity and have the same acceleration $g$, so both take $\sqrt{2h/g} = 2.02$ s to fall 20 m. The thrown ball's horizontal velocity carries it sideways but has no effect on its vertical motion.
P2. Below 45°: about 42° here (the red line). The drop below the launch point gives the ball extra flight time for free, so it pays to trade some vertical velocity for horizontal velocity, which is what carries it forward. This is part of why shot putters, who release from about 2 m up, aim below 45° (they can also push harder at lower angles).
P3. About 42 m, less than half. Drag grows with the square of the speed, and at launch it decelerates the ball by $cv^2 = 0.020 \times 30^2 = 18\ \mathrm{m\,s^{-2}}$, almost twice $g$. For a light ball thrown hard it is not a small force at all.