You are an artillery offcer attached to Gaius Julius Caesar's Xth Legion in the Gallic War

(1st C. BCE). You are responsible for a catapult, a device with a long spoonlike arm used
to lob stones or pumpkins over the walls of Gallic oppida. These fortresses are protected by
high walls rising from a deep, wide moat; you must fire your missiles from the far side of the
moat. You are expected to fire forward.
a) Caesar has asked you for an algebraic formula for the maximum height of wall you
can clear from across a moat of width x, if the initial speed of your projectile is v0,
the magnitude of the acceleration of gravity is g, and you can launch at any angle you
choose. What formula do you give him?* Assume aerodynamic forces are negligible
and disregard the height of the catapult itself.

b) For a certain value of x your formula gives zero height. Explain why-to what does
this correspond?

c)When you shoot to clear a wall of maximum height per the formula of part a, is your
missile ascending, descending, or at the peak of its trajectory when it clears the wall?

In this case, Caesar doesn't know the purpose of the Catapult. It is supposed to knock down the walls, not go over them.

hf=hi+vo*sintheta*t-1/2 g t^2

but horizontal distance is "x", or
x=vo*cosTheta*t

or t=x/(vo*cosTheta)

then
h= vo*sinTheta*x/(vocostheta)-g/2 *(x/vocostheta)^2

h= x*tanTheta-g/2 * (x/vo)^2 sec^2 theta

now when it h zero?
=x(tantheta -g/2 *x/vo^2*sec^2Theta)

so h is zero when x is zero, and when
x=2vo^2*sintheta*costheta /g

but is not that the max distance?

check my work.