Assume angle of throw theta. Resolving vertical and horizontal components: Vvert=v.sin(theta) and Vhoriz=v.cos(theta).From 'suvat' equations, time to vertical stationary t=v/a. This must be doubled to find the total airborne time. Using the speed above and acceleration being only gravity, we have t=2.v.sin(theta)/g.Horizontal speed remains constant, so we can find total horizontal distance travelled with s=ut=v.cos(theta).2.v.sin(theta)/g.Using the trig equality sin(2.theta)=2.sin(theta).cos(theta) that can be derived from a data book equation, we can simplify to s=v^2.sin(2.theta)/g.We wish to maximise this distance, however v and g are constant. Therefore we need to maximise sin(2.theta). This can be done by differentiation or simply by noting that the maximum of a sin graph is at 90deg. Therefore 2.theta=90deg, and theta=45deg.Knowing this, and substituting, we find that distance s=v^2/g.