So tomorrow I tackled a maths test where I faced a question which was saying,
Question: Let $f:R-\{0,1\}\rightarrow R$ be a function satisfying the relation
$$f(x)+f\left(\frac{x-1}{x}\right)=x$$
for all $x\in R-\{0,1\}$
Find $f(x)$?
Till yet I tried so many replacements as like replacing $x\rightarrow \frac{1}{x}$ and $x\rightarrow \frac{x-1}{x}$, but these are not the appropriate ones to get my answer.
These kind of questions are not new to me as I had solved many before and even asked one before to (here is it). But here my main issue is that I am not getting an appropriate replacements and that's the thing for which I had raised my question.
Thanks in advance.
Let $g(x)=1-\frac{1}{x}=\frac{x-1}{x}$. Then $g(g(x))=1-\frac{x}{x-1}=\frac{1}{1-x}$, $g(g(g(x)))=1-\frac{1-x}{1}=x$. Notice that $g(x)\neq 1$ and $g(x)\neq 0$ is $x\neq 1$. By assumption, we have $f(x)+f(g(x))=x$ for every $x\in\mathbb{R}\setminus\left\{0,1\right\}$, so we obtain the equations $$f(x)+f(g(x))=x\qquad (1)$$ $$f(g(x))+f(g(g(x)))=g(x)\qquad(2)$$ $$f(g(g(x)))+f(g(g(g(x))))=g(g(x))\qquad (3)$$ We can calculate equation (1)-(2)+(3), and cancel the terms $f(g(x))$ and $f(g(g(x))$, thus obtaining \begin{align*} 2f(x)&=f(x)+f(g(g(g(x))))=x-g(x)+g(g(x))=x-\frac{x-1}{x}+\frac{1}{1-x}\\ &=\frac{x^2(1-x)-(x-1)(1-x)+x}{x(1-x)}=\frac{x^2-x^3+x^2-2x+1+x}{x(1-x)}\\ &=\frac{x^3-2x^2+x-1}{x(x-1)} \end{align*}