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.
 A: Now multiply by $n+f$; solve a quadratic to express $f$ in terms of $n$. Don't forget to check negative solutions too.
A: Let $x:=n+f$. The equation is
$$f+\frac1{n+f}=1,$$ 
giving the solutions in $f$
$$f=\frac{\pm\sqrt{(n+1)^2-4}-n+1}2.$$
The negative sign cannot work, nor the negative $n$. Then $n\ge1$ is required, but $n=1$ yields $x=1$, which is wrong. Finally,
$$f=\frac{\sqrt{(n+1)^2-4}-n+1}2, \forall n>1.$$
A: 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$.

A: Observations
I am assuming that $\{x\}=x-\lfloor x\rfloor$, which is in $[0,1)$.
There are no integer solutions; if $x\in\mathbb{Z}$, then $\{x\}+\left\{\frac1x\right\}=0+\left\{\frac1x\right\}\lt1$.
Since $\{x\}+\left\{\frac1x\right\}=1$ is stable under $x\leftrightarrow\frac1x$, we can get all positive solutions by looking at $x\gt1$.
Since $\{-x\}=1-\{x\}$ for all $x\not\in\mathbb{Z}$, $\{x\}+\left\{\frac1x\right\}=1$ is stable under $x\leftrightarrow-x$. Thus, we can get all solutions looking at $x\gt0$.

Assuming that $\boldsymbol{x\gt1}$
Let $t=\{x\}$ and $n=\lfloor x\rfloor$. This is equivalent to solving
$$
t+\frac1{n+t}=1\tag1
$$
for $t\in[0,1)$. Equation $(1)$ gives the quadratic equation
$$
t^2+(n-1)t-(n-1)=0\tag2
$$
which has the solution
$$
t=\frac{-n+1+\sqrt{(n+1)^2-4}}2\tag3
$$
Since $x=n+t$, we get
$$
x=\frac{n+1+\sqrt{(n+1)^2-4}}2\tag4
$$

All Solutions
As mentioned above, all solutions can be gotten by taking the reciprocal and negating $(4)$. That is, we can get all solutions, from
$$
x=\frac{\pm n\pm\sqrt{n^2-4}}2\tag5
$$
where $n\in\mathbb{Z}$ and $n\ge3$.
