Maximum height = 40 m.
Assume g = 9.8 m/s² and no air resistance.
Let V = vertical launch velocity.
At maximum height, the vertical velocity is zero.
Therefore
(V m/s)² - 2*(9.8 m/s²)*(40 m) = 0
V² = 784
V = 28 m/s
Let the pitcher throw the ball with velocity 28 m/s, at angle x relative to the horizontal.
The vertical component of the launch velocity is
28 sin(x),
and the horizontal component of the launch velocity is
28 cos(x)
The time, t, to reach maximum height is
28 sin(x)/9.8 = 2.8571 sin(x) s.
The total time of flight is
2t = 5.7142 sin(x) s
The horizontal distance traveled is
d = (28 cos(x) m/s)*(5.7142 sin(x) s)
= 160 sin(x) cos(x) m
Because sin(2x) = 2 sin(x) cos(x), therefore
d = 80 sin(2x)
d is maximum when 2x = 90° => x = 45°.
Therefore the maximum horizontal distance is 80 m.
Answer: 80 m