Sub topic 7
How long the projectile stays in the air
This chapter assumes you can solve a quadratic equation, use sine and cosine in a right triangle, and write the one-dimensional constant-acceleration equations. It also assumes you have seen how a launch velocity splits into horizontal and vertical components in the earlier chapters. The Python examples are optional.
By the end you will be able to derive the time of flight for a launch from level ground. You will also be able to check the result three ways and avoid the usual mistakes.
What "time of flight" means
The time of flight, written T, is the time from the moment the projectile leaves the launch point to the moment it returns to the launch height. In this chapter, launch and landing are at the same height, which we call level ground. Launches from a cliff or a platform change the landing condition, and a later chapter covers them.
Time of flight matters because it links the two independent axes. The horizontal motion has constant velocity and the vertical motion has constant acceleration, so neither axis knows about the other. The only quantity they share is time. We find T from the vertical motion alone, then feed it to the horizontal motion to get the range.
Setting up the vertical motion
Take up as positive and put the origin at the launch point. The launch speed is v0 and the launch angle above the horizontal is θ. The vertical component of the launch velocity is:
- v_y0 = v0 sin θ
The vertical acceleration is −g, with g = 9.81 m/s² near Earth's surface. The ideal-model position and velocity equations for the vertical axis are:
- y(t) = v_y0 t − ½ g t²
- vy(t) = vy0 − g t
The horizontal component v_x0 = v0 cos θ does not appear in either equation. This is the independence of axes in action, and it has a direct consequence for T, which we return to below.
Derivation 1: solve y(t) = 0
The projectile is back at launch height when y(t) = 0:
v_y0 t − ½ g t² = 0
Factor out t:
t (v_y0 − ½ g t) = 0
This quadratic has two roots:
- t = 0, which is the launch itself.
- t = 2 v_y0 / g, which is the landing.
Substituting v_y0 = v0 sin θ gives the result:
T = 2 v0 sin θ / g
The root t = 0 is not a mistake. A quadratic has two roots, and here one of them describes the starting moment. You keep the other one.
Derivation 2: use symmetry
A second route avoids the quadratic. At the top of the path the vertical velocity is zero:
vy0 − g tup = 0, so tup = vy0 / g
On level ground the descent mirrors the ascent. The projectile falls from rest at the peak through the same height it climbed, and the same constant acceleration governs both halves, so the two halves take equal time. Therefore:
T = 2 tup = 2 vy0 / g
Both derivations agree. Use symmetry as a quick check on the algebra, and use the quadratic when symmetry does not hold, as with launches from a height.
Derivation 3: impact velocity
A third check uses the velocity equation. At landing the vertical velocity should be the mirror image of the launch value:
vy(T) = vy0 − g (2 vy0 / g) = −vy0
The projectile lands with the same vertical speed it launched with, now pointing downward. This matches the symmetry argument and gives you a quick test on any answer you compute.
What T depends on, and what it does not
The formula T = 2 v0 sin θ / g shows exactly three dependencies, and several non-dependencies.
| Quantity | Effect on T |
|---|---|
| Launch speed v0 | T is proportional to v0 at a fixed angle |
| Launch angle θ | T grows with sin θ, so it is largest at 90° |
| Gravity g | T is inversely proportional to g |
| Horizontal component v_x0 | No effect |
| Mass of the projectile | No effect in the ideal model |
The horizontal speed has no effect because it never enters the vertical equations. Two balls launched with the same v_y0 stay in the air for the same time, even if one is also moving sideways at 50 m/s. A ball dropped from rest and a ball fired horizontally from the same height land at the same moment, for the same reason.
Mass has no effect because g is the acceleration for every mass in a uniform field, with no air.
Worked example
A ball is kicked from level ground at 20 m/s and 30° above the horizontal. Find the time of flight.
- Find the vertical component: v_y0 = 20 sin 30° = 10 m/s.
- Apply the formula: T = 2 × 10 / 9.81 = 2.04 s.
- Check with symmetry: the time to the peak is 10 / 9.81 = 1.02 s, and doubling gives 2.04 s.
- Check the units: m/s divided by m/s² gives s.
The same launch on the Moon, where g = 1.62 m/s², gives T = 20 / 1.62 = 12.35 s. The time scales as 1/g, so weaker gravity stretches the flight by a factor of about 6.
Checking it in code
The function below computes T and then confirms that the height at time T really is zero. Checking by substitution catches a wrong formula faster than rereading the algebra.
import math
def time_of_flight(v0, angle_deg, g=9.81):
"""Time of flight for a launch from level ground."""
vy = v0 * math.sin(math.radians(angle_deg))
return 2 * vy / g
def height_at(t, v0, angle_deg, g=9.81):
"""Vertical position y(t) measured from the launch height."""
vy = v0 * math.sin(math.radians(angle_deg))
return vy * t - 0.5 * g * t**2
v0 = 20.0
for angle in (15, 30, 45, 60, 75):
T = time_of_flight(v0, angle)
lands = abs(height_at(T, v0, angle)) < 1e-9
print(f"{angle:>2} deg: T = {T:.2f} s, back at launch height: {lands}")Running it gives these times: 1.06 s at 15°, 2.04 s at 30°, 2.88 s at 45°, 3.53 s at 60°, and 3.94 s at 75°. Every line reports True. Time of flight keeps rising with angle all the way to 90°, even though the range does not. Range peaks at 45° because it also depends on the horizontal component, which shrinks as the angle grows. A later chapter covers that trade-off.
Edge cases
- θ = 90° (straight up). T = 2 v0 / g. The formula still works, and the projectile comes straight back down.
- θ = 0° (horizontal launch from level ground). T = 0. The projectile has no upward velocity and starts at ground level, so it has nowhere to fall. A horizontal launch only gives a flight when the launch point is higher than the landing point.
- Negative angles. A launch below the horizontal from level ground gives a negative T, which has no physical meaning. It tells you the projectile was never above the landing level.
- Different launch and landing heights. The factored form t (v_y0 − ½ g t) = 0 no longer applies, because the constant term in the quadratic is not zero. You then need the general quadratic formula, which a later chapter covers.
Common errors
- Using v0 instead of v_y0. Writing T = 2 v0 / g overestimates the time for every angle except 90°. Always resolve the velocity first.
- Forgetting the factor of 2. The value v_y0 / g is only the time to the peak. If your answer is half the expected size, check that you did not stop at the top.
- Working in the wrong angle mode. Python's
math.sinexpects radians, so convert withmath.radians. On a calculator, check that it is in degrees mode. - Using cos θ. This usually happens when the angle is measured from the vertical in the problem statement. Read where the angle is measured from before choosing sine or cosine.
- Keeping the t = 0 root. The zero root is the launch, so discard it and keep the positive root.
Summary of the method
- Resolve the launch velocity and keep v_y0 = v0 sin θ.
- Set y(t) = 0, factor out t, and keep the positive root.
- Confirm with symmetry, or by checking that vy(T) = −vy0.
- Pass T on to the horizontal motion when you need the range.
Exercise
A ball is hit from level ground at 30 m/s and 40° above the horizontal. Take g = 9.81 m/s². (a) Find the time of flight. (b) Find the vertical velocity just before it lands. (c) At what angle should it be launched at the same speed to stay in the air for the same time as the 40° launch, and why?
Show answer
(a) vy0 = 30 sin 40° = 19.28 m/s, so T = 2 × 19.28 / 9.81 = 3.93 s. (b) By symmetry the vertical velocity at landing is −vy0 = −19.28 m/s, which you can confirm with vy(T) = 19.28 − 9.81 × 3.93 ≈ −19.3 m/s. (c) T depends only on sin θ, and sin 40° = sin 140°, so the equivalent angle is 140° measured from the launch direction. Since a launch direction of 140° points backward, the physically meaningful answer is that the complement does not work: sin 50° ≠ sin 40°. The same time requires the same vy0, so only the angle with the same sine value gives it, and for angles between 0° and 90° that is 40° alone.
Exercise
Two stones leave the same level ground at the same instant. Stone A is thrown straight up at 12 m/s. Stone B is thrown at 12 m/s at 30° above the horizontal. Which stone stays in the air longer, and what is the ratio of the times?
Show answer
Stone A has vy0 = 12 m/s, so TA = 2 × 12 / 9.81 = 2.45 s. Stone B has vy0 = 12 sin 30° = 6 m/s, so TB = 2 × 6 / 9.81 = 1.22 s. Stone A stays up longer. The ratio TA / TB is sin 90° / sin 30° = 2. Stone B's horizontal motion does not change its time in the air.