The vertical component of the ball's initial velocity is

At any point along its trajectory, the vertical component of the ball's velocity
satisfies

where
is the corresponding height of the ball while it's in the air. At its maximum height
, the ball's vertical velocity is 0, so we have

