> 
> If a projectile is launched at a speed $u$ from a height $H$ above the horizontal axis, $g$ is the acceleration due to gravity, and air resistance is ignored, its trajectory is
> $$y=H+x \tan θ-x^2\frac g{2u^2}\left(1+\tan ^2\theta\right),$$
> and its maximum range is
> $$R\_{\max }=\frac ug\sqrt{u^2+2gH}.$$
> 
> 
> 

I would like to derive the above $R\_{\max},$ and here's what I've done:

1. substitute $(x,y)=(R,0)$ into the trajectory equation;
2. differentiate the result with respect to $\theta;$
3. substitute $\left(R,\frac {\mathrm dR}{\mathrm
 d\theta}\right)=\left(R\_{\max},0\right).$

However, this eliminates $H$ and fails to lead to the desired expression for $R\_{\max }.$ How to actually derive the above $R\_{\max }?$

P.S. This is the context; in the above, I've replaced all occurrences of $L$ below with $\frac{u^2}g$.

![enter image description here](https://i.stack.imgur.com/xcSCy.jpg)