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

I saw the answers here about how to 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 understood the proof. But, can someone give me an example for an irrational $x$ that makes this equality true?

• Try solving $x+1/x = 3$. – Joey Zou Nov 3 '15 at 15:48

If $x>1$ then $0< \frac 1x < 1$ so $\lfloor \frac 1x \rfloor = 0$ and the equation reduces to

$$x + \frac{1}{x} = 1 + \lfloor x \rfloor$$

Any number $x>1$ can be written on the form $x = n + r$ where $n$ is an integer and $0<r<1$. Take this form for $x$ in the equation above. Since $\lfloor n + r\rfloor = n$ the equation then reduces to

$$r^2 + (n-1)r - (n-1) = 0$$

Solve the quadratic equation for $r$ and pick the root that is in $(0,1)$. $x = n + r$ will then be an irrational number that satisfy your equation for any value of the integer $n > 1$.

• Note that it's not clear that for a given $n$ there will be a solution for $r$ in $[0,1)$. – nbubis Nov 3 '15 at 17:05
• @nbubis $f(r) = r^2 + (n-1)r - (n-1)$ satisfy $f(1) = 1$ and $f(0) = -(n-1)$ so by the intermediate value theorem there is a solution $r \in (0,1)$ for all $n>1$. – Kibble Nov 3 '15 at 17:41

Clearly,$$x+\frac1x$$ is an integer, let $n$, and solving the equation for $x$,

$$x=\frac{n+\sqrt{n^2-4}}2,\\ \frac1x=n-x.$$

For large $n$, we have by the Taylor development

$$x=\frac{n+\sqrt{n^2-4}}2=\frac n2\left(1+\sqrt{1-\frac4{n^2}}\right)\approx n-\frac1n,\\\frac1x=n-x\approx\frac1n.$$

Thus the integer parts are respectively $n-1$ and $0$, and the initial equation is verified:

$$x-(n-1)+(n-x)-0=1$$

(actually it works for any $n>2$).

• Check my edit.. – nbubis Nov 3 '15 at 17:59
• Yep, was a typo. – Yves Daoust Nov 3 '15 at 18:10

Hint: If $k\gt2$ is an integer, then

$$\left\lfloor k+\sqrt{k^2-4}\over2\right\rfloor=k-1$$

• When answers are so cryptic, you're not even sure they're trying to answer the given question. – nbubis Nov 3 '15 at 17:02
• The strange form inside the brackets should be motivated imo (as solutions to $x+1/x = k$). For example we also have $\lfloor \frac{k + \sqrt{k^2-3}}{2} \rfloor = k - 1$ but this does not work to produce an example. – Kibble Nov 3 '15 at 17:50