Solve the equation f(f(x))=f^2(x), where f(x)=x+2, f being a real function.
We notice that f(f(x)) is the composition law: f composed with f.
f(f(x))= f(x)+2= x+2+2=x+4
f^2(x)= (x+2)^2= x^2+2x+4
If a product between 2 factors is zero, that means that one of them is zero.
f(f(2) = f^2(x). f(x) = x+2.
Therefore f(f(x+2) = f (x+2) = (x+2)+2 =x+4