To find the angle giving the maximum height for a given speed calculate the derivative of the maximum height H = v 2 sin 2 ( θ ) / ( 2 g ) {\displaystyle H=v^{2}\sin ^{2}(\theta )/(2g)} with respect to θ {\displaystyle \theta } , that is d H d θ = v 2 2 cos ( θ ) sin ( θ ) / ( 2 g ) {\displaystyle {\mathrm {d} H \over \mathrm {d} \theta }=v^{2}2\cos(\theta )\sin(\theta )/(2g)} which is zero when θ = π / 2 = 90 ∘ {\displaystyle \theta =\pi /2=90^{\circ }} . So the maximum height H m a x = v 2 2 g {\displaystyle H_{\mathrm {max} }={v^{2} \over 2g}} is obtained when the projectile is fired straight up.