<s>[INST] Angle of Inclination if Range is at Maximum If the horizontal range of a projectile launched, without air resistance is given by: $$R = \frac{v_0\cos\theta}{g}\left(v_0\sin\theta +\sqrt{v_{0}^{2}\sin^{2}\theta + 2S_0g}\right)$$ where $S_0$ is the initial height of the projectile, $v_0$ is the initial velocity, and $g$ is the acceleration due to gravity. Consider the range as a function of $\theta$. Show that the projectile launched is a maximum for the angle of inclination $$\theta = \cos^{-1}\sqrt{\frac{2S_0g + v_{0}^{2}}{2S_0g + 2v_{0}^{2}}}.$$
This problem is from the book "Advanced Engineering Mathematics" (6th ed.) by Dennis Zill. After taking the derivative of the Range with respect to $\theta$, and equating it to zero, I'm stuck with $$\sqrt{\sin^2\theta + \frac{2S_0g}{v_{0}^2}}\cos2\theta + \cos2\theta\sin\theta -\frac{2S_0g\sin\theta}{v_{0}^{2}} = 0.$$
 [/INST] I tried to change my approach in finding the derivative of the Range. Since the Range is a maximum, it implies that $\frac{\partial R}{\partial \theta} = 0$.
\begin{eqnarray*}
\ln{R} &=& \ln{v_0} - \ln{g} + \ln{\cos\theta} + \ln{\left(v_0\sin\theta + \sqrt{v_{0}^{2}\sin^2\theta + 2S_0g}\right)}\\
\frac{\partial R}{\partial \theta} &=& \frac{\partial}{\partial \theta}\left[\ln{v_0} - \ln{g} + \ln{\cos\theta} + \ln{\left(v_0\sin\theta + \sqrt{v_{0}^{2}\sin^2\theta + 2S_0g}\right)}\right]\\
\frac{R'}{R}&=& \frac{-\sin\theta}{\cos\theta} + \frac{v_0\cos\theta + \frac{v_{0}^{2}\sin\theta\cos\theta}{\sqrt{v_{0}^{2}\sin^2\theta + 2S_0g}}}{v_0\sin\theta + \sqrt{v_{0}^{2}\sin^2\theta + 2S_0g}}\\
\end{eqnarray*}
Since Range is a maximum, therefore $R' = 0$.
\begin{eqnarray*}
0 &=& -\tan\theta + \frac{\cos\theta + \frac{\sin\theta\cos\theta}{\sqrt{\sin^2\theta + \frac{2S_0g}{v_{0}^{2}}}}}{\sin\theta + \sqrt{\sin^2\theta + \frac{2S_0g}{v_{0}^{2}}}}\\
\sin\theta\left(\sin\theta + \sqrt{\sin^2\theta + \frac{2S_0g}{v_{0}^{2}}}\right)&=& \cos^2\theta \left(1 + \frac{\sin\theta}{\sqrt{\sin^2\theta + \frac{2S_0g}{v_{0}^{2}}}}\right)\\
\sin\theta\sqrt{\sin^2\theta + \frac{2S_0g}{v_{0}^{2}}} &=& \cos^2\theta
\end{eqnarray*}
Squaring both sides will yield,
\begin{eqnarray*}
\cos^4\theta &=& \sin^4\theta + \frac{2S_0g}{v_{0}^{2}}\sin^2\theta\\
\cos^4 - (1 - \cos^2\theta)^2 &=& \frac{2S_0g}{v_{0}^{2}} - \frac{2S_0g}{v_{0}^{2}}\cos^2\theta \\
2\cos^2\theta + \frac{2S_0g}{v_{0}^{2}}\cos^2\theta &=& \frac{2S_0g}{v_{0}^{2}} + 1 \\
\cos^2\theta &=& \frac{2S_0g + v_{0}^{2}}{2S_0g + 2v_{0}^{2}}
\end{eqnarray*}
Taking the root,
\begin{eqnarray*}
\cos\theta &=& \sqrt{\frac{2S_0g + v_{0}^{2}}{2S_0g + 2v_{0}^{2}}}\\
\therefore \theta &=& \cos^{-1} \sqrt{\frac{2S_0g + v_{0}^{2}}{2S_0g + 2v_{0}^{2}}}.
\end{eqnarray*}
</s>