<s>[INST] Let $x^2+kx=0;k$ is a real number .The set of values of $k$ for which the equation $f(x)=0$ and $f(f(x))=0$ have same real solution set. Let $f(x)=x^2+kx;k$ is a real number.The set of values of $k$ for which the equation $f(x)=0$ and $f(f(x))=0$ have same real solution set.

The equation $x^2+kx=0$ has solutions $x=0,-k$.
So the solutions of the equation $f(f(x))=0$ should be $x=0,-k$.
$f(f(x))=(x^2+k x)^2+(x^2+k x)k=0$ gives 
$x^4+k^2x^2+2kx^3+x^2k+x k^2=0$
$x^4+2kx^3+(k^2+k)x^2+xk^2=0$
$x(x^3+2kx^2+(k^2+k)x+k^2)=0$ has the solutions $x=0,x=-k$
Therefore $x^3+2kx^2+(k^2+k)x+k^2=0$ has the solution $x=-k$.
But putting $x=-k$ in the equation $x^3+2kx^2+(k^2+k)x+k^2=0$ gives me nothing.It just gives me $0=0$.
I am stuck here.Please help me.Thanks.
 [/INST] We have $f(x) = x(x+k)$. This means
$$f(f(x)) = f(x)(f(x)+k) = x(x+k)(x^2+kx+k)$$
Hence, we see that $0$ and $-k$ are solutions to both. For $x^2+kx+k$ not to have a real solution, we need $k^2-4k < 0 \implies 0 < k < 4$.
</s>