What's the size of an angle in a triangle with sides $\sin(x), \cos(x),$ and $\tan(x)$? 
Imagining a scalene triangle with sides $\sin(x), \cos(x)$ and $\tan(x)$, how would you find angle $x$ if it was between $\cos(x)$ and $\sin(x)$ when $0<x<\frac{\pi}{2}$?

I tried using the law of cosines but it lead nowhere and honestly haven't gone very far.
$$\cos(x)=\frac{\sin^2(x)+\cos^2(x)-\tan^2(x)}{2\sin(x)\cos(x)}\\
\cos(x)=\frac{1-\tan^2(x)}{\sin(2x)}$$
 A: 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$$
A: 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$$
