%% LyX 2.3.4.2 created this file. For more info, see
http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{extarticle}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{babel}
\begin{document}
\title{Solving $x-\lfloor x\rfloor=\frac{1}{x}$}
\author{Amit Yaron}
\maketitle
\section*{How to solve the equation?}
$x$ cannot be zero, so let us first multiply both sides by $x$:
\begin{multline*}
x^{2}-\lfloor x\rfloor x=1\Rightarrow\\
\Rightarrow x^{2}-x\lfloor x\rfloor-1=0
\end{multline*}
Great! No, we can substitute
\begin{alignat*}{1}
n & =\lfloor x\rfloor
\end{alignat*}
and solve for $x$:
\begin{multline*}
x^{2}-nx-1=0\Rightarrow\\
\Rightarrow x=\frac{n\pm\sqrt{n^{2}+4}}{2}
\end{multline*}
Now, we need to find values of $n$, for which:
\[
n\leq x<n+1
\]
Or:
\[
n\leq\frac{n\pm\sqrt{n^{2}+4}}{2}<n+1
\]
\paragraph*{For a positive $n$:}
\begin{multline*}
n^{2}+4>n^{2}\Rightarrow\sqrt{n^{2}+4}>n\Rightarrow\frac{n-\sqrt{n^{2}+4}}{2}<0<n
\end{multline*}
so,
\begin{multline*}
x=\frac{n+\sqrt{n^{2}+4}}{2}<n+1\Rightarrow\\
\Rightarrow n+\sqrt{n^{2}+4}<2n+2\Rightarrow\\
\Rightarrow\sqrt{n^{2}+4}<n+2\Rightarrow\\
\Rightarrow n^{2}+4<n^{2}+4n+4\Rightarrow\\
\Rightarrow4<4n+4\Rightarrow\\
\Rightarrow0<4n
\end{multline*}
and that's true $\forall n\in\mathbb{N}$
Thus,
\begin{multline*}
n\in\mathbb{N}\Rightarrow x=\frac{n+\sqrt{n^{2}+4}}{2}
\end{multline*}
\paragraph*{For a negative $n$:}
Let us check when
\begin{multline*}
n\leq\frac{n-\sqrt{n^{2}+4}}{2}
\end{multline*}
Multiply by 2:
\begin{multline*}
2n\leq n-\sqrt{n^{2}+4}\Rightarrow\\
\Rightarrow n\leq-\sqrt{n^{2}+4}\Rightarrow\\
\Rightarrow n^{2}\geq n^{2}+4\Rightarrow\\
\Rightarrow0\geq4
\end{multline*}
So, we'll use again
\begin{multline*}
x=\frac{n+\sqrt{n^{2}+4}}{2}
\end{multline*}
Check the condition:
\begin{multline*}
n\leq\frac{n+\sqrt{n^{2}+4}}{2}\Rightarrow\\
\Rightarrow2n\leq n+\sqrt{n^{2}+4}\Rightarrow\\
\Rightarrow n\leq\sqrt{n^{2}+4}
\end{multline*}
That's true because $n<0$
Let us check the other condition:
\begin{multline*}
\frac{n+\sqrt{n^{2}+4}}{2}<n+1\Rightarrow\\
\Rightarrow n+\sqrt{n^{2}+4}<2n+2\Rightarrow\\
\Rightarrow\underbrace{\sqrt{n^{2}+4}}_{\geq2}<n+2<-1+2=1
\end{multline*}
So, there are no negative solutions.
And there are no solutions for $n=0$ either, because:
$\frac{0\pm\sqrt{0^{2}+4}}{2}=\pm1$
and no floor of $\pm1$is zero.
Thus, the set of solutions is:
$\{\frac{n+\sqrt{n^{2}+4}}{2}\mid n\in\mathbb{N}\}$
\end{document}