Solving $a + \frac1a = 12$ 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.
 A: It looks like in your third step you tried to take the square root of both sides (since $\sqrt{12}\approx 3.4641$). However, multiple things went wrong.
First, on the left hand side it is not true that $\sqrt{x^2+y^2}=x+y$. For example, take $x=3,y=4$; then $\sqrt{x^2+y^2}=5$ but $x+y=7$. You can't move the "$+$" through the "$\sqrt{\cdot}$." In your case, we can't take the square root of $a^2+1$ and get $a+1$.
Second, on the right hand side you can't just ignore the $a$. We have $$\sqrt{12a}=\sqrt{12}\times\sqrt{a},$$ not $$\sqrt{12a}=\sqrt{12}\times a.$$ This is a variant of the same mistake above: you can't move the "$\times$" out of the "$\sqrt{\cdot}$."
Square-rooting both sides of the equation $a^2+1=12a$ isn't going to help: if done correctly we get $$\sqrt{a^2+1}=\sqrt{12}\times\sqrt{a},$$ which is true but ... just awful. But there's something else you can do here which will (HINT: think about moving the terms around a bit).
A: $$\begin{align}
a+\frac{1}{a} = 12 &\implies  a^2+1=12a \\
& \implies a^2-12a+1=0\\
& \implies a^2-12a+36 -35 = 0\\
& \implies (a-6)^2 - 35 = 0 \\
& \implies (a-6)^2 = 35 \\
& \implies a-6 = \pm \sqrt{35} \\
& \implies \color{green}{a = 6 \pm \sqrt{35}}
\end{align}$$
