# Analytically finding the solution to an equation involving tangent.

I was trying to optimise a function of the form: $$D(\alpha) = \cos \alpha \cdot (\sin\alpha+\sqrt{\sin^2\alpha+h}),$$ where $h > 0$ is a given number, and $\alpha \in (0, \pi/2)$. After some rearranging, I found that a necessary condition for $\alpha$ is: $$\tan \alpha = \underbrace{\frac{\cos\alpha + \frac{\sin(2\alpha)}{2\sqrt{\sin^2\alpha + h}} }{\sin \alpha + \sqrt{\sin^2 \alpha + h}}}_{=:f(\alpha)}.$$

To prove that a solution exists in $(0, \pi/2)$ is rather easy: $f(0) = \frac{1}{\sqrt{h}} > 0 = \tan(0)$, and: $\lim_{x\uparrow \pi/2} \tan (x)= \infty$, while $f(\pi/2)$ is finite, and $f$ is (of course) continuous on $[0,\pi/2]$. The intermediate value theorem then implies there is a solution in $(0, \pi/2)$. From some messing about in Mathematica, there looks to be a unique solution, but I haven't been able to prove that. (If someone could, that'd be appreciated as well!)

I was wondering if there is a way to solve for $\alpha$ analytically. I don't think it's all that hard to solve numerically, but it would be nice if one were to be able to find an equation for it. None of my attempts have worked so far, however.

HINT: for the first derivative with respect to $\alpha$ i have got $$\cos ^2(\alpha ) \left(\frac{\sin (\alpha )}{\sqrt{\sin ^2(\alpha )+h}}+1\right)-\sin (\alpha ) \left(\sin (\alpha )+\sqrt{\sin ^2(\alpha )+h}\right)$$ this can factorized to $$-\frac{\left(\sin (\alpha )+\sqrt{\sin ^2(\alpha )+h}\right) \left(\sin (\alpha ) \sqrt{\sin ^2(\alpha )+h}-\cos ^2(\alpha )\right)}{\sqrt{\sin ^2(\alpha )+h}}$$