Find all functions $f: \mathbb R \to \mathbb R$ such that for any $x,y \in \mathbb R$, the multiset $\{(f(xf(y)+1),f(yf(x)-1)\}$ is identical to the multiset $\{xf(f(y))+1,yf(f(x))-1\}$.
Note: The multiset $\{a,b\}$ is identical to the multiset $\{c,d\}$ if and only if $a=c,b=d$ or $a=d,b=c$.
My idea
Let's consider the given functional equation
$$\{(f(xf(y)+1), f(yf(x)-1)\} = \{xf(f(y))+1, yf(f(x))-1\}$$ From this, we can derive that $$f(xf(y)+1) = xf(f(y))+1$$ and $f(yf(x)-1) = yf(f(x))-1$ for all $x, y \in \mathbb{R}$.
now. We analyze each part:
- $f(xf(y)+1) = xf(f(y))+1$
- $f(yf(x)-1) = yf(f(x))-1$
Consider $$ f(xf(y)+1)=xf(y)+1 $$ and let $x=0$ we have $$ f(1)=1 $$ now consider $y=1$, $\tilde{x}=x-1$ we have $$ f(x)=x-1+1=x $$ so the only function that satisfies this functional equation is the identity
You also need to consider the other possible option i.e. $$ f(xf(y)+1)=yf(f(x))-1 $$ And $$ f(yf(x)-1)=xf(f(y))+1$$ By letting $x=0$ we obtain $$ f(\pm 1)=yf(f(0))\mp 1 $$ so $f(\pm 1)=\mp 1$. By direct verification $$ f(x)=-x$$ satisfy the functional equation, I guess it is the only function, but I wasn't able to prove it