# Proving that $x$ is irrational if $x-\lfloor x \rfloor + \frac1x - \left\lfloor \frac1x \right\rfloor = 1$

Prove : $$\text{If } \; x-\lfloor x \rfloor + \frac{1}{x} - \left\lfloor \frac{1}{x} \right\rfloor = 1 \text{, then } x \text{ is irrational.}$$

I think the way to go here is to falsely assume that $x$ is rational, thus having $x=\frac mn$ with $m,n$ integers and go with that, we also know that $x$ with the celling belongs to the integers and that $\frac 1x$ with the celling gotta be a $0$. Still can't prove it. Thank in advance !

• Note that because of the symmetry of roles for $x$ and $1/x$, we may assume $|x| \le 1$. – hardmath Oct 30 '15 at 1:37

$x-\lfloor x\rfloor+{1\over x}-\lfloor {1\over x}\rfloor=1$ implies $x^2-kx+1=0$, where $k=\lfloor x\rfloor+\lfloor {1\over x}\rfloor+1$ is an integer. It does not matter that $k$ depends on $x$, the only possible rational solutions are $x=\pm1$.

But if $x=\pm 1$, then $x - \lfloor x \rfloor + \frac 1 x - \left\lfloor \frac{1}{x} \right\rfloor = 0$.

• Can you please clarify what you did here for me? I am not seeing where you got $x^2-kx+1=0$ from... – nikolita Nov 4 '15 at 12:13
• @nikolita, first move the $1$ over to the left hand side and collect it together with the two floor-function terms to get what I call $k$. This gives you $x^2-k+{1\over x}=0$. Then multiply both sides by $x$. – Barry Cipra Nov 4 '15 at 14:03
• Do you mean that it gives me $x-k+\frac { 1 }{ x } =0$ and the multiply both sides by $x?$ – nikolita Nov 4 '15 at 21:08
• @nikolita, yes, that was a typo on my part. – Barry Cipra Nov 4 '15 at 22:20

Suppose $x = 1$. Then $x - \lfloor x \rfloor + \frac 1 x - \lfloor \frac 1 x \rfloor = 0$.

Suppose $x = m/n$, $m,n \in \mathbb Z$. Without loss of generality, presume $x > 1$ so $m/n = m' + m''/n$ for some $m' \in \mathbb Z$, $0 < m'' < n$ and $1/x = n/m$.

So $x - \lfloor x \rfloor + \frac 1 x - \lfloor \frac 1 x \rfloor = m''/n + n/m = 1$ so $m''m + n^2 = nm$ so $(m - m'n)m +n^2 = nm$ so $m^2 - mn(m' + 1) - n^2 = 0$. The quadratic equation yields no integer solutions for $m$ or $n$.