Projectile

How far does a thrown ball go? Change its speed and angle and watch the flight time, height and range respond.

Download Projectile.ddec Beginner · 15 lines · units, plot, integral

A ball leaves the ground at , aimed above level ground. It stays in the air for 5.27 s, rises to 34.1 m, and lands 174.5 m away.

Drag the blue numbers. The sheet beside it is the same calculation.

How the sheet works

  1. Lines 3 to 5 name the inputs. They carry units, so every result below comes out in seconds or metres with no conversion step.
  2. Line 8 is the range formula, v₀²·sin(2θ)/g.
  3. Line 10 refers to line 8 by its number and converts the range to feet.
  4. Lines 11 to 13 define the path y(x), plot it, and integrate it to get the area under the arc.

Things to try

  • Drag θ to 45°. For a fixed speed, that angle gives the longest range.
  • Set θ to 30°, then to 60°. The ball lands in the same place, because sin(2θ) is the same for both.
  • Double v₀. The range grows four times, because v₀ is squared.
Projectile.ddec
1Projectile
2// Launch from ground level, no drag
3v₀ = m/s42 m/s
4θ = °38°
5g = 9.81 m/s²9.81 m/s²
6
7t = 2*v₀*sin(θ)/g5.27 s
8range = v₀²*sin(2*θ)/g174.5 m
9peak = (v₀*sin(θ))²/(2*g)34.1 m
10line8 in ft572.4 ft
11y(x) = x*tan(θ) − g*x²/(2*v₀²*cos(θ)²)ƒ(x)
12plot(y(x), x, 0 m, range)2D
13area = integral(y(x), x, 0 m, range)3,964 m²
14mean height = area/range22.7 m

The sheet as text

# Projectile
// Launch from ground level, no drag
v₀ = 42 m/s
θ = 38°
g = 9.81 m/s²

t = 2*v₀*sin(θ)/g
range = v₀²*sin(2*θ)/g
peak = (v₀*sin(θ))²/(2*g)
line8 in ft
y(x) = x*tan(θ) - g*x²/(2*v₀²*cos(θ)²)
plot(y(x), x, 0 m, range)
area = integral(y(x), x, 0 m, range)
mean height = area/range

Paste this into a new sheet, or download the .ddec file above.

Related examples

TrigonometryWavesSliders and an integral with bounds you drag. CalculusTaylorSlide the order of a polynomial until it fits eˣ. EverydayUnit scratchPaint for a wall, in metres and feet.