TITLE: Awkward Functional Equation $f(f(x))=(x+1)f(x)$
QUESTION [5 upvotes]: Let $f:\mathbb{R} \rightarrow \mathbb{R}$  be a function such that  $f(f(x))=(x+1)f(x)$    for all real $x$  and $f$ attains the value $(-1)$ at some point . Find all such functions $f$.

REPLY [2 votes]: First we prove $ f $ is injective when $ f(x) \neq 0 $.
Assume: $ f(a)=f(b) \implies (a+1)f(a) = f(f(a)) = f(f(b)) = (b+1)f(b) = (b+1)f(a) \implies a=b \lor f(a)=f(b)=0 \implies $

$ f(x) $ is injective everywhere where $ f(x) \neq 0 $.

Next we prove $ f(0)=0 $:
$ (0+1)f(0) = f(f(0)) \implies f(f(0)) = f(0) \implies $ (semi-)injectivity above $ \implies f(0)=0 $. 
Next we prove $ f(-1)=0 $:
$ f(0)=0=(-1+1)f(-1)=f(f(-1))  \implies $ (semi-)injectivity above $ \implies f(-1) =0 $. 
Now we show that when $ f() $ must attain the value $-1$ somewhere, ( say at $ x=a $ ) this will lead to a contradiction:
Let $ f(a)=-1 : \implies $$ -(a+1) =(a+1)f(a)=f(f(a))= f(-1) = 0 \implies -(a+1)=0 \implies a = -1 \implies f(-1)=-1 $   

This contradicts $ f(-1) =0 $ so there are no solutions.