Find all $x > 0$ s/t $\sqrt{x} + 1/\sqrt{x}$ and $x^{1/3} + 1/x^{1/3}$ are integers. Why doesn't this get all solutions? This is a math puzzle I've been working on, and I'm not sure why my approach isn't yielding all the solutions for $x$. As in the title, the question is to find all positive reals $x$ where $\sqrt{x} + 1/\sqrt{x}$ and $x^{1/3} + 1/x^{1/3}$ are both integers. Here's my approach--I'm not sure where the error is. Where does the following approach go wrong?
Suppose that $\sqrt{x} + 1/\sqrt{x} = m$ and $x^{1/3} + 1/x^{1/3} = n$, where $m,n \in \mathbb{Z}$. We let $m, n > 0$ since $\sqrt{x} + 1/\sqrt{x} > 0$ and $x^{1/3} + 1/x^{1/3} > 0$ for $x > 0$.
We equivalently have $x - m\sqrt{x} + 1 = 0$ and $x^{2/3} -nx^{1/3} + 1 = 0$. Let $u = \sqrt{x}$, so that we have $u^2 - mu + 1 = 0$ and $u^{4/3} - nu^{2/3} + 1 = 0$. It suffices to find all $u$ satisfying both of these equations.
Applying the quadratic formula, $u = \frac{m \pm \sqrt{m^2 - 4}}{2}$ and $u^{2/3} = \frac{n \pm \sqrt{n^2-4}}{2}$. Squaring the first equation gets $u^2 = (\frac{m \pm \sqrt{m^2 - 4}}{2})^2$.Cubing the second equation gets $u^2 = (\frac{n \pm \sqrt{n^2-4}}{2})^3$.
So there are 4 sign combinations setting these two expressions for $u^2$ equal. Since $m,n$ are integers, I look for integer solutions only, finding only $m = 2, n = 2$ as the viable solution in all 4 cases. I checked this part with WolframAlpha--the general idea was to isolate radicals to one side. If we have a nonzero sum of surds, it ends up being irrational while the other side is rational. That leaves integer solutions to the radicals $\sqrt{m^2-4},\sqrt{n^2-4}$, the only positive solutions to which are $m = 2$ and $n = 2$.
This yields $u = 1$ as the only viable solution. However, the solution states that there are infinitely many such $x$.
 A: Since you don't show certain details of your work, it's hard for me to be able to tell what the issue is. However, I believe the main limitation of your approach is that a non-zero sum of surds doesn't necessarily need to have each term being rational for its sum to be rational, such as what Zerox's question comment states about $\sqrt{m^2 - 4}$ being some rational multiplier of $\sqrt{n^2 - 4}$ can cause the radical side to vanish.
Instead, here's how I show there are an infinite # of solutions for $x$. First, as you did, have
$$\sqrt{x} + \frac{1}{\sqrt{x}} = m \tag{1}\label{eq1A}$$
$$\sqrt[3]{x} + \frac{1}{\sqrt[3]{x}} = n \tag{2}\label{eq2A}$$
for some integers $m$ and $n$. Next, square both sides of \eqref{eq1A} to get
$$x + 2 + \frac{1}{x} = m^2 \tag{3}\label{eq3A}$$
and cube both sides of \eqref{eq2A}, plus simplify, to get
$$\begin{equation}\begin{aligned}
x + 3(\sqrt[3]{x})^2\left(\frac{1}{\sqrt[3]{x}}\right) + 3(\sqrt[3]{x})\left(\frac{1}{\sqrt[3]{x}}\right)^2 + \frac{1}{x} & = n^3 \\
x + 3\left(\sqrt[3]{x} + \frac{1}{\sqrt[3]{x}}\right) + \frac{1}{x} & = n^3 \\
x + 3n + \frac{1}{x} & = n^3
\end{aligned}\end{equation}\tag{4}\label{eq4A}$$
Next, \eqref{eq4A} minus \eqref{eq3A}, plus manipulations including factoring, gives
$$\begin{equation}\begin{aligned}
3n - 2 & = n^3 - m^2 \\
m^2 & = n^3 - 3n + 2 \\
m^2 & = (n - 1)^2(n + 2)
\end{aligned}\end{equation}\tag{5}\label{eq5A}$$
This shows any integer $n \ge 2$, where $n + 2$ is a perfect square, will work. Since $x \gt 0$ and all of the quantities are positive, all of the above steps are reversible, meaning there will not be any extraneous solutions. This proves there are an infinite # of $n$ plus $m$, and thus $x$, which work.
To get the values of $x$ (note for any $x$, you get $\frac{1}{x}$ is also a solution, so apart from $x = 1$, there's always $2$ of them), you could use your $u$ or, from \eqref{eq3A}, you also can get
$$\begin{equation}\begin{aligned}
x + \frac{1}{x} & = m^2 - 2 \\
x^2 + 1 & = (m^2 - 2)x \\
x^2 - (m^2 - 2)x + 1 & = 0
\end{aligned}\end{equation}\tag{6}\label{eq6A}$$
Thus, the quadratic formula gives
$$\begin{equation}\begin{aligned}
x & = \frac{m^2 - 2 \pm \sqrt{(m^2 - 2)^2 - 4}}{2} \\
& = \frac{m^2 - 2 \pm \sqrt{(m^4 - 4m^2 + 4) - 4}}{2} \\
& = \frac{m^2 - 2 \pm m\sqrt{m^2 - 4}}{2}
\end{aligned}\end{equation}\tag{7}\label{eq7A}$$
Note $n = 2$ gives $m = 2$, which is your one solution. An example of the other solutions is $n = 7$ which gives $m = 18$, and with \eqref{eq7A} showing $x = 161 \pm 72\sqrt{5}$.
A: A good way to simplify algebra is to start by getting rid of the radicals.  Let $y=\sqrt[6]x$.  Then $\sqrt{x}=y^3$ and $\sqrt[3]x=y^2$ and we have to find such $y$ where
$$
y^3+1/y^3 = m
$$
$$
y^2+1/y^2 = n
$$
Further, let $a=y+1/y$.  Then $$n = a^2 -2$$ and $$m = a^3-3a = a(a^2-3) = a(n-1)$$
Therefore, $a$ must also be an integer ($a=\frac{m}{n-1}$ is rational and its square is an integer $a^2=n+2$)
Solving $a=y+1/y$ for $y$, we get
$$y=\frac{a\pm\sqrt{a^2-4}}{2}$$ and
$$x=y^6 = \left({\frac{a\pm\sqrt{a^2-4}}{2}}\right)^6$$ for any integer $a\ge2$
