<s>[INST] Find all the solutions for $f\left(x\right) =2f\left(\frac{1}{x}\right)-\frac{2x^{2}-1}{x^{2}+1}$ The function is $f:\left(0,\infty\right)\rightarrow\mathbb{R}$, I tried to do it like that, first I saw that: $$f\left(x\right) =2f\left(\frac{1}{x}\right)-\frac{2x^{2}-1}{x^{2}+1}$$ and then decided to try to put $\frac{1}{x}\in\left(0,\infty\right) $  and came out with: $$f\left(\frac{1}{x}\right) =2f\left(x\right)-\frac{2\frac{1}{x^{2}}-1}{\frac{1}{x^{2}}+1}
 =2f\left(x\right)-\frac{\frac{2-x^{2}}{x^{2}}}{\frac{1+x^{2}}{x^{2}}}
 =2f\left(x\right)-\frac{2-x^{2}}{1+x^{2}}$$ i used it at the last equation and it came out that: $$f\left(x\right)=\frac{5-4x^{2}}{3\left(1+x^{2}\right)}$$ now i get $f\left(1\right)=\frac{1}{6}$ but i know it should equal 1/2... I have now idea how to move forward, and why it doesn't work, any tips?
 [/INST] $$f(x)=2f\left(\frac 1x\right)-\frac{2x^2-1}{x^2+1}\\f\left(\frac 1x\right)=2f(x)-\frac{2-x^2}{x^2+1}$$ Adding and simplifying we have
$$f(x)+f\left(\frac 1x\right)=1$$ It follows
$$\boxed{f(x)= \frac{1}{x^2+1}}$$ and it is easy to verify that in fact
$$f(x)=2f\left(\frac 1x\right)-\frac{2x^2-1}{x^2+1}$$
</s>