What's the size of an angle in a triangle with sides $\sin(x), \cos(x),$ and $\tan(x)$?

From the law of cosines, we have that $$c^2 = a^2 + b^2 - 2ab\cos(C)$$ In this case, we have that $c = \tan(x), a = \cos(x), b = \sin(x)$, and $C = x$.

Plugging those in, we get $$\tan^2(x) = \cos^2(x) + \sin^2(x) - 2\cos(x)\sin(x)\cos(x)$$

After making the simplification $\cos^2(x) + \sin^2(x) = 1$ and multiplying by $\cos^2(x)$, the result is $$\sin^2(x) = \cos^2(x)-2\cos^4(x)\sin(x)$$

Making the substitution $u = \sin(x)$, we get $$2u^{5}-4u^{3}+2u^{2}+2u-1=0$$

This is a quintic equation with no closed form for the roots. However, WolframAlpha says the relevant root is approximately $0.463$. $x$ is then the $\arcsin$ of this, which means that $$x \approx 0.481$$


Starting from @automaticallyGenerated's answer, facing a quintic polynomial, tou will need a numerical method.

Let us consider that we look for the zero of function $$f(x)=\sin^2(x)- \cos^2(x)+2\cos^4(x)\sin(x)$$ and use Newton method starting with $x_0=0$; this will provide the following iterates $$\left( \begin{array}{cc} n & x_n \\ 0 & 0.000000 \\ 1 & 0.500000 \\ 2 & 0.480810 \\ 3 & 0.481195 \end{array} \right)$$

Edit

Graphing or using inspection, we can notice that the solution is close to $\frac \pi 6$. So, making a Taylor expansion around this point, we have $$f(x)=\frac{1}{16}+t-\frac{392 }{507}t^2+\frac{7552 }{19773}t^3+\frac{504320 }{771147}t^4+O\left(t^5\right)$$ where $t=\frac{13\sqrt{3}}{16} \left(x-\frac{\pi }{6}\right)$.

Now, using series reversion (using $f(x)=y$), we have $$x=\frac{\pi }{6}+u+\frac{49 }{26 \sqrt{3}}u^2+\frac{817}{507} u^3+\frac{22975 }{26364 \sqrt{3}}u^4+O\left(u^5\right)$$ where $u=\frac{16 y-1}{13 \sqrt{3}}$.

Make $y=0$ to get the approximation $$x \sim \frac{\pi }{6}-\frac{497738471}{6776839836 \sqrt{3}}=0.481194$$


Elaborating on the answers by Automatically Generated and Claude Leibovici, despite quintics not being generally solvable in radicals, we can obtain a closed form solution by permitting special functions, albeit an unreadably long solution that goes beyond the scope of the original question. Following the excellent answer on Question 542108 by Tito Piezas III, we can reduce the quintic $p_1(x)=2x^5−4x^3+2x^2+2x−1$, first to principal quintic form, then to Bring quintic form. We achieve this by applying a quadratic Tschirnhausen transformation to $p_1$, attaining $p_2(y)=y^{5}-0.455y^{2}-0.531y-0.116$, where $y=x^{2}+0.148x-0.8$ *. We then follow this with a quartic Tschirnhausen transformation on $p_2$, for $p_3(z)=z^{5}-0.108z+0.0131$, where $z=y^{4}-0.477y^{3}+0.317y^{2}-1.219y-0.295$. This is finally converted to Bring quintic form with the substitution $z=0.108^{{1}/{4}}t$, giving us $p_4(t)=t^5-t+0.211$. We can then return to the desired root through the correctly chosen chain of roots, $t=0.939\to z=0.539\to y=-0.510\to x=0.463$.

Then, we may solve $p_4$ using the technique from Piezas III's answer in Question 540964. Using the notation from that answer, we would have $k = (0.268-0.625 i)$ and $\frac{(k^2)^{1/8}}{2\cdot 5^{3/4}\sqrt{k(1-k^2)}}=(0.139 + 0.0234 i)$. The root we desire corresponds to $n=4$, so $p=(-0.784 + 1.177 i)+16\cdot 4$, so then for $j=0,1,2,3,4,5$, we have $\small S_j=(-0.418-1.074i),\ (3.533-0.341i),\ (0.495+0.848i), (-0.000+1.000i),\ (-0.706+0.704i),\ (0.005-0.140i)$. Using this technique, the root $t=0.939$ is expressible in a closed form, using radicals, the complete elliptic integral of the first kind, $K(x)$, and the Dedekind eta function, $\eta(x)$. Therefore, so too is the root $x=0.463$ of $p_1$, as is the size of the angle in question.


* Each coefficient from this point onwards has a closed form in radicals but as they are unreasonably large, I've given rounded decimals only. See Tito Piezas III's answer for a full account of the substitutions, transformations and derivations of the coefficients. I'd advise using a computer algebra solver, like Maple or Mathematica when using this technique due to the volume of operations and terms. NB: Some values I've listed may have rounding errors.