Does $\sqrt{1+\sqrt{2}}$ belong to $\mathbb{Q}(\sqrt{2})$?
We know the answer is of the form $ a + b \sqrt{2}$. Since $(a + b\sqrt{2})^2 = a^2 + 2ab\sqrt{2} + 2b^2 = 1 + \sqrt{2}$, the system we need to solve is \begin{align*} 2ab &= 1 \\ a^2 + 2b^2 &= 1 \end{align*} We write $b = \frac{1}{2a}$ and substitute this in the second equation. \begin{align*} a^2 + 2\left(\frac{1}{2a}\right)^2 &= 1 \\ a^2 + \frac{1}{2a^2} &= 1 \\ 2a^4 - 2a^2 + 1 &= 0 \end{align*} Let $z = a^2$, so $z^2 = a^4$. The equation is then \begin{equation} 2z^2 - 2z + 1 = 0 \end{equation} Using the quadratic formula we find $z = \frac{1 \pm i}{2}$. This worked out when checked. Thus $a = \sqrt{\frac{1 \pm i}{2}}$. We then find $b$ using $a$ in our original system of equations. \begin{align*} \frac{1 \pm i}{2} + 2b^2 &= 1 \\ 1 \pm i + 4b^2 &= 2 \\ \pm i + 4b^2 &= 1 \\ 4b^2 &= 1 \pm i \\ 2b &= \sqrt{1 \pm i} \\ b &= \frac{\sqrt{1 \pm i}}{2} \\ \end{align*}
Substituting $a$ and $b$ into the equation $2ab = 1$, leads to inconsistent solutions. What do I need to reconsider? How can I improve my answer?
The truth is that $\sqrt{1+\sqrt2}$ cannot be expressed as $a+b\sqrt2$ where $a,b$ are integers or rationals. If they were reals then the problem becomes trivial.
(Another way to see the first fact above is that the minimal polynomial of $\sqrt{1+\sqrt2}$ is degree-$4$, whereas if it were expressible as $a+b\sqrt2$ with $a,b\in\mathbb Q$ the minimal polynomial would only be quadratic.)