# Maximum range of a projectile (launched from an elevation)

If a projectile is launched at a speed $u$ from a height $H$ above the horizontal axis, and air resistance is ignored, the maximum range of the projectile is $R_{max}=\frac ug\sqrt{u^2+2gH}$, where $g$ is the acceleration due to gravity.

The angle of projection to achieve $R_{max}$ is $\theta = \arctan \left(\frac u{\sqrt{u^2+2gH}} \right)$.

Can someone help me derive $R_{max}$ as given above?

I have tried substituting $y=0$ and $x=R$ into the trajectory equation

$$y=H+x \tan\theta -x^2\frac g{2u^2}(1+\tan^2\theta),$$

then differentiating with respect to $\theta$ so that we can let $\frac {dR}{d\theta}=0$ (so that $R=R_{max}$), but this would eliminate the $H$, so it won't lead to the expression for $R_{max}$ that I want to derive.

-
Cross-posted from math.stackexchange.com/q/127300/11127 – Qmechanic Apr 2 '12 at 20:55
Differentiating will not eliminate H. You need the derivative of x with respect to $\theta$. I can read off from what you have that $H$ is divided by $\tan\theta$ when you solve for $x$. (I didn't check everything else, though.) – Mark Eichenlaub Apr 2 '12 at 21:23
H is a constant, so it gets eliminated, no? – Ryan Apr 2 '12 at 21:51
No. Take $\frac{d}{dx} 5x$. 5 is a constant but does not get eliminated. – Mark Eichenlaub Apr 3 '12 at 0:00
@Mark, perhaps we're talking at cross-purposes. Please refer to leongz's answer below to see why our H gets eliminated. – Ryan Apr 3 '12 at 0:36

As you described, we substitute $y=0$ and $x=R$ into the trajectory equation: $$0=H+R\tan{\theta}-R^2\frac{g}{2u^2}\sec^2\theta.\tag{1}$$ Then, differentiating with respect to $\theta$ and setting $\frac{dR}{d\theta}=0$:
$$0=R_{max}\sec^2\theta-R_{max}^2\frac{g}{2u^2}2\sec^2\theta\tan\theta,$$ which simplifies to $$R_{max}=\frac{u^2}{g}\cot\theta.\tag{2}$$ Solving $(1)$ and $(2)$ will yield the desired expressions for $\theta$ and $R_{max}$.