# Rational Solutions to $\frac{1}{x} = x - \left \lfloor{x}\right \rfloor$

I'm curious about if there are rational solutions to the equation $\frac{1}{x} = x - \left \lfloor{x}\right \rfloor$. The equation has infinitely many solutions, which I deduce as follows:

1) Note, for $x > 1$, $0 < \frac{1}{x} < 1$

2) Note, for $x>1$, $x - \left \lfloor{x}\right \rfloor$ is periodic with period 1, ranging between 0 and 1

Therefore, there are infinitely many intersects. This can also be easily seen by graphing the LHS and RHS as functions. Furthermore, we note that the solutions only occur when $x > 1$.

However, after examining many of the solutions, I didn't find any rational ones. Letting $x = \frac{p}{q}$, where $p,q \in \mathbb{R}$ and $p > q$ (because $x>1$) we then have:

$\frac{q}{p} = \frac{p}{q} - \left \lfloor{\frac{p}{q}}\right \rfloor$

$\frac{q}{p} = \frac{(p \mod q)}{q}$, which comes from the fact that $\frac{p}{q} - \left \lfloor{\frac{p}{q}}\right \rfloor$ basically eliminates the whole number part of $\frac{p}{q}$, and leaves the fractional part.

$\frac{q^2}{p} = (p \mod q)$

However, at this point, I get stuck. It's evident that $p$ can't be a multiple of $q$ and that $q < p < q^2$. I'm considering currently trying to make some sort of prime factorization argument, but I'm not sure what it would look like. Would appreciate any help!

• Another approach: for $x>0$ we can write $x = n + \epsilon$ where $n \in \mathbb{N}$ and $0\leq \epsilon<1$ and then the equation gives $1 = \epsilon(n+\epsilon)$ which you can solve for $\epsilon$ and it's not hard to show that this solution is never rational. – Winther Jun 26 '17 at 23:27
• looclooclooclooclook – hamam_Abdallah Jun 26 '17 at 23:50

You are on the right track. Continue your argument and you will find the answer.

Let $p=q*n+r$, where $q, n , r \in \mathbb N$. Now we have $\frac{q}{qn+r}=\frac {r}{q}$, and it follows $q^2-r^2=nqr$. Further, $\frac {q}{r}-\frac{r}{q}=n$. Let $\frac {q}{r}=t$ and this leads to a quadric equation w.r.t t, $t^2-tn-1=0$.

Clearly, there is no rational t when $n\in \mathbb N$ since $n^2+4$ can not be a square ($n \neq 0$). In other words, $\frac {q}{r}$ is irrational. This contradicts that $q, r \in \mathbb N$

assume there is a solution $x=p/q$ with $x$ irreductible. then $x-1/x$ is an integer. or

$p/q-q/p=(p^2-q^2)/pq$ integer.

thus $p|p^2-q^2$

and $p|q$ which is not possible.

Let us assume for convenience that $x$ is in the interval $(N, N+1)$, where $N$ is a natural number greater than zero. Your equation becomes: $1/x = x - N$. Rearranging of terms leads to the quadratic equation $x^2 - Nx - 1 = 0$. The standard solution can be written down, and it involves the square root of $(N^2 + 4)$. We can easily verify that this is a non-rational number for every natural number $N$.

• How easily can we verify that. – hamam_Abdallah Jun 26 '17 at 23:37
• @Salahamam_Fatima Pretty straightforwardly, if you know that the square root of an integer is rational iff it's integral - $(N+1)^2=N^2+2N+1\gt N^2+4$ if $N\geq 2$, so there's just no whole (and thus no rational) number that $\sqrt{N^2+4}$ can be. – Steven Stadnicki Jun 26 '17 at 23:45
• @StevenStadnicki Thanks for time you took. – hamam_Abdallah Jun 26 '17 at 23:51