[SOLVED] Prove max distance angle of shooting a cannon

In class we proved that the best angle (ignoring air resistance) for shooting a cannon at a height of 0 is .

How would i prove what the best angle (less than or greater than 45) is if the cannon is raised to some Height, , where . I dont need the specific angle i just need to prove it is less than or greater than 45 degrees. I think its less than but I am not sure.

Here are the initial values of everything.

V=velcoity in m/s that the ball is shot at

=angle (which we are trying to optimize)

H=starting height (greater than 0)

X=distance in terms of t

Y=Height in terms of t

From here i would normally find where .

So i used the quadratic equationa and got:

or the minus solution.

From here i am not sure what the next step would be to solve for t or even if this last step helps.