Problem: Show that if a projectile is shot from a height $h$ with speed $v_0$ the maximum range obtains for launch angle $\theta = \arctan(\frac{v_{0}} {\sqrt{2gh+v_{0}^{2}}})$.
I'm able to derive the general equation for range (i.e. $y \neq0$) without any bother, but I get all tangled up in the differentiation and trig once I try to maximise $\theta$. If someone could guide me through the derivation, that would be fantastic:)
My progress thus far:
We know that for a projectile fired from initial height $h$ with initial velocity $v_{0}$ at an angle $\theta$, the equations of motion are
$x(t)= v_{0}cos{\theta}t$; $y(t)=h + v_{0}sin{\theta}t - \frac{1}{2}gt^{2}$
Range occurs at the time of flight ($t^{*})$, which is found by setting the equation for $y(t)$ equal to zero. Doing so yields
$h + v_{0}sin{\theta}t^{*}-\frac{1}{2}gt^{*2}$ = 0
Rearranging and solving for $t^{*}$:
$t^{*}=\frac{-(-2v_{0}sin\theta)\pm\sqrt{(-2v_{0}^{2}sin^{2}\theta-2(g)(-2h)}}{2g}$
$=\frac{v_{0}sin\theta}{g}\pm \frac{1}{g}\sqrt{v_{0}^{2}sin^{2}\theta+2gh}$
The square-root must be positive, and since the initial velocity and sine of the launch angle can also be assumed to be positive, it follows that the greater time will occur when using the plus sign from the plus or minus sign.
$t^{*}=\frac{v_{0}sin\theta}{g}+ \frac{1}{g}\sqrt{v_{0}^{2}sin^{2}\theta+2gh}$
Substituting into our equation for $x(t)$, we find that the general expression for the range $R$ is given by
$x(t^{*})=R=v_{0}cos\theta[\frac{v_{0}sin\theta}{g}+ \frac{1}{g}\sqrt{v_{0}^{2}sin^{2}\theta+2gh}]$
or
$R = \frac{v_{0}cos\theta}{g}[v_{0}sin\theta+\sqrt{v_{0}^{2}sin^{2}\theta+2gh}]$
From here, I know to set $dR/d\theta$ equal to 0, but I keep fumbling the differentiation.