I recently came across this problem in a textbook and I have no idea how to solve it :
$$a + \frac1a = 12$$
Here is what I tried:
$$\begin{align} a + \frac1a &= 12 \tag1\\[4pt] a^2 + 1 &= 12a \tag2 \\[4pt] a + 1 &= 3.4641a \tag3 \\[4pt] 1 &= 2.4641a \tag4 \\[4pt] a &= 0.4058 \tag5 \end{align}$$
Obviously this can’t be correct because
$$\begin{align} a + \frac1a &= 12 \tag6\\ 0.4058 + \frac{1}{0.4058} &= 12 \tag7\\[4pt] 0.4058 + 2.4642 &= 12 \tag8 \\[4pt] 2.87 &\neq 12 \tag9 \end{align}$$
I assume this is very simple and I am just ignorant. I would appreciate it if someone could explain how this problem and problems like it are solved.