Let's write the law of motions of the ball on both x and y axis. The motion of the ball is a uniform motion on the x-axis, with constant velocity, and uniformly accelerated motion on the y-axis, with constant acceleration g:


where

is the initial speed of the ball and

is the angle at which the ball is launched.
The ball reaches its maximum height when its vertical velocity is zero. The law for the vertical velocity is:

By requiring

, we find the time t at which the ball reaches the maximum height:


And if we substitute this time t inside the law of motion on the y-axis, y(t), we find the maximum height of the ball:

