Number of solutions of $\left\{x\right\}+\left\{\frac{1}{x}\right\}=1$ Find the number of solutions of $$\left\{x\right\}+\left\{\frac{1}{x}\right\}=1,$$ where $\left\{\cdot\right\}$ denotes Fractional part of real number $x$.
My try:
When $x \gt 1$ we get
$$\left\{x\right\}+\frac{1}{x}=1$$ $\implies$
$$\left\{x\right\}=1-\frac{1}{x}.$$
Letting $x=n+f$, where $n \in \mathbb{Z^+}$ and $ 0 \lt f \lt 1$, we get
$$f=1-\frac{1}{n+f}.$$
By Hint given by $J.G$, i am continuing the solution:
we have
$$f^2+(n-1)f+1-n=0$$ solving we get
$$f=\frac{-(n-1)+\sqrt{(n+3)(n-1)}}{2}$$ $\implies$
$$f=\frac{\left(\sqrt{n+3}-\sqrt{n-1}\right)\sqrt{n-1}}{2}$$
Now obviously $n \ne 1$ for if  we get $f=0$
So $n=2,3,4,5...$ gives values of $f$ as
$\frac{\sqrt{5}-1}{2}$, $\sqrt{3}-1$, so on which gives infinite solutions.

Using continued fraction:
\begin{align}
  f+\frac{1}{n+f} &= 1 \tag{$n>1$, $0<f<1$} \\[5pt]
  n+f &= n+1-\frac{1}{n+f} \\[5pt]
  x &= n+\frac{n+f-1}{n+f} \\[5pt]
  &= n+\frac{1}{\dfrac{n+f}{n+f-1}} \\[5pt]
  &= n+\frac{1}{1+\dfrac{1}{n+f-1}} \\[5pt]
  x &= n+\frac{1}{1+\dfrac{1}{x-1}} \tag{$\star$} \\[5pt]
  &= \left[ n;\overline{1,(n-1)} \right] \\[5pt]
  \alpha &= \frac{n+1+\sqrt{(n-1)(n+3)}}{2} \tag{$\alpha=x$} \\[5pt]
  \beta &= \frac{n+1-\sqrt{(n-1)(n+3)}}{2} \tag{$\beta=\frac{1}{x}$} 
\end{align}
where $\alpha$, $\beta$ are the roots of $(\star)$.

Note that $\alpha \beta=1$, the symmetric roles for $\alpha$ and $\beta$.

