I have an equation:
$$d=\dfrac{v\cos \theta}{g}\left(v \sin \theta + \sqrt{v^{2} \sin^{2}\theta + 2gh} \right),\ g≈9.81 \dfrac {m}{s^{2}}$$
How to find $\theta$ at which $d$ is the maximum possible?
I have an equation:
$$d=\dfrac{v\cos \theta}{g}\left(v \sin \theta + \sqrt{v^{2} \sin^{2}\theta + 2gh} \right),\ g≈9.81 \dfrac {m}{s^{2}}$$
How to find $\theta$ at which $d$ is the maximum possible?
On
For simplicity consider $$d=2v\cos\theta(v\sin\theta+\sqrt{v^2\sin^2\theta+H}).$$ $$(d-v^2\sin 2\theta)^2=4v^2\cos^2\theta(v^2\sin^2\theta+H)=v^4\sin^22\theta+4v^2H\cos^2\theta$$ $$d^2-2v^2d\sin 2\theta=4v^2H\cos^2\theta=2v^2H(\cos 2\theta-1)$$ $$2v^2H\cos 2\theta+2v^2d\sin 2\theta=d^2+2v^2H$$ $$d^2-2v^2d\sin 2\theta+2v^2H(1-\cos 2\theta)=0$$ This is a quadratic equation of $d.$ Note that when $d$ reached to its maximum discriminant of this equation should be zero. Therefore, when $d$ is maximum $$4v^4\sin^2 2\theta-8v^2H(1-\cos 2\theta)=0$$ $$(1-\cos 2\theta)(v^2((1+\cos 2\theta)-2H))=0.$$ This gives $$\cos 2\theta=1$$ or $$1+\cos 2\theta=\dfrac{2H}{v^2}$$
The derivative of your function $d$ w.r.t. $\theta$ is
$$\frac{\partial d}{\partial\theta} = \frac 1 g\left(v\cos \theta\left( \frac{v^2\sin\theta\cos \theta}{\sqrt{2gh+v^2\sin^2\theta}}+v\cos\theta\right)-v\sin \theta\left(\sqrt{2gh+v^2\sin^2\theta}+v\sin \theta\right)\right)$$
Setting this to zero and solving for $\theta$ (in a specific range such as $[0,\frac\pi 2]$will give you the extremized values. Unless you have a strong liking for high school algebraic manipulation, I would recommend WolframAlpha or a CAS.