I would like to find all functions $f:\mathbb{R}\backslash\{0,1\}\rightarrow\mathbb{R}$ such that
$$f(x)+f\left( \frac{1}{1-x}\right)=x.$$
I do not know how to solve the problem. Can someone explain how to solve it?
In one of my attempts I did the following, which is confusing to me: By the substitution $y=1-\frac{1}{x}$ one gets
$f(y)+f\left( \frac{1}{1-y}\right)=\frac{1}{1-y}$. So with $x=y$ it follows that $0=x-\frac{1}{1-x}$. So it would follow that there is no solution. Is that possible or is there a mistake?
Best regards

make $x:= \frac{1}{1-x}$ then
$$f\left( \frac{1}{1-x}\right)+f\left( \frac{1}{1-\frac{1}{1-x}}\right)=\frac{1}{1-x}\to f\left( \frac{1}{1-x}\right)+f\left(1- \frac{1}{x}\right)=\frac{1}{1-x}\quad (1)$$
do it again in the last equation:
$$f\left( \frac{1}{1-\frac{1}{1-x}}\right)+f(x)=\frac{1}{1-\frac{1}{1-x}}\to f\left(1- \frac{1}{x}\right)+f(x)=1- \frac{1}{x}\quad (2)$$
now make $(1)-(2)$ and get:
$$f\left( \frac{1}{1-x}\right)-f(x)=\frac{1}{1-x}-1+\frac{1}{x}$$
Subtract the equation is the statement and this last one.
$$2f(x)=x-\frac{1}{1-x}+1-\frac{1}{x}\to f(x)=\frac12\left(x-\frac{1}{1-x}+1-\frac{1}{x}\right)$$