I want to find all $f(x)$s (if they exist) which $fof(x)=4-x$, I know that $f(x)$ can't be linear because if $$f(x)=ax+b$$ then $$fof(x)=a(ax+b)+b=a^2x+ab+b$$ And $a^2$ can't be -1.
Actually i think $f(x)$ can't be any polynomial but i can't prove it and a combination of trig functions may be an answer.
The answer to my question is a function with that property or a proof that such function doesn't exist. Thanks!
edit:i should be clear that $f$ is $\mathbb R\to \mathbb R $ and it is injective and continuous.