Complex trig function example. If $\cos z=5$, why does $e^{2iz}-10e^{iz}+1=0$? The example in my book says this:

equation 1 is:
$$\cos{z} = \frac{1}{2} ( e^{iz} + e^{-iz} )$$
Where is $e^{2iz} - 10e^{iz} + 1 = 0 $ coming from? Can someone show me how they are doing this solution?

You have:
$$
\cos z = \dfrac{1}{2} \left( e^{iz} + e^{-iz} \right) \tag{1}
$$
Multiplying both sides by $ e^{iz} $ as said (and replacing $ \cos z $ with $5$):
$$
5 e^{iz} = \dfrac{e^{iz}}{2} \left( e^{iz} + e^{-iz} \right) \\
\implies 10 e^{iz} = e^{2iz} + 1
$$
