Complex quintic equation
Let's start with equation $x^{5}-1=0$ whose one root is $x=\cos(2\pi/5)+i\sin(2\pi/5)$. The equation can be written as $$(x-1)(x^{4}+x^{3}+x^{2}+x+1)=0$$ The first factor gives the root $x=1$ and the second factor leads to the equation $$x^{2}+x^{-2}+x+x^{-1}+1=0$$ Putting $y=x+x^{-1}$ we get $$y^{2}+y-1=0$$ or $$y=\frac{-1\pm\sqrt{5}}{2}$$ Choosing the positive root we get $$2\cos(2\pi/5)=y=\frac{\sqrt{5}-1}{2}$$ Thus the value of $\sin 18^{\circ}$ is obtained as $(\sqrt{5}-1)/4$. Similarly we can find the value of $\cos 18^{\circ}$.
Observe that apart from $x=1$ there are $4$ distinct values of $x$ out of which we have to choose only one namely $x=\cos(2\pi/5)+i\sin(2\pi/5)$. The problem of choice is simplified considerably by using $y=x+x^{-1}$ which satisfies a quadratic equation and therefore has only two values. For our desired value of $x$ the expression $y>0$ and hence the positive root $y$ is chosen. And in reality we are interested in the value $\cos(2\pi/5)=(x+x^{-1})/2=y/2$ so the choice of $y$ completes our work.
The method can be generalized (thanks to Gauss) to solve higher degree equations of type $x^{n} =1$. For example we can solve $x^{17}=1$ and get the value of $\cos(2\pi/17)$ as $$\frac{-1 + \sqrt{17} + \sqrt{34 - 2 \sqrt{17}} + 2\sqrt{17 + 3 \sqrt{17} - \sqrt{34 - 2 \sqrt{17}} - 2\sqrt{34 + 2 \sqrt{17}}}}{16}$$ (see this post for more details).