Let $x\neq0$ be a real number such that $x^5$ and $20x+\frac {19}x$ are rational. How can we prove that $x$ is also rational? (This was a question from the RMO 2019 in India.)
My attempt: Let $a,b,c,d$ be integers such that $20x+\frac {19}{x}=\frac ab$ and $x^5 = \frac{c}{d}$.
Then we have $$x=\frac{a\pm\sqrt{a^2-1520 b^2}}{40b}$$ so $x$ is rational iff $\sqrt{a^2-1520 b^2}$ is rational.
However, I don't know how to prove that $\sqrt{a^2-1520 b^2}$ is rational using that $$x=\frac{\sqrt[5]{c}}{\sqrt[5]{d}}$$
Given that $20x+\frac{19}{x}$ is rational. Therefore $x$ satisfies a quadratic polynomial with rational co-efficients. If we call that polynomial as $g$, we get $g(x)=0$. Now by the Euclidean algorithm $x^5=h(x)g(x)+f(x)$, where $f(x)$ is a linear polynomial on $x$ with rational co-efficients. Since $x^5\in\mathbb{Q}$ and $g(x)=0$, we get $f(x)\in\mathbb{Q}\Rightarrow x\in\mathbb{Q}$.
[Note by Bill D. $ $ The inference $f(x)\in\Bbb Q\,\Rightarrow\, x\in \Bbb Q\,$ fails if $\,\deg f < 1,\,$ so we must prove $\,\deg f = 1\,$ to complete the above argument. One way to remedy that is in Jyrki's answer, and another way is to explicitly compute the remainder $\,f(x) = r\, x + s\,$ then prove $\,r \neq 0\,$ (which is essentially equivalent to the method in the linked official solution - reproduced in Jack's answer)]