<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] $f(f(x))$ has as solutions, the solutions of $f(x)$, plus the solution of the equation $x^2+kx+k=0$, which are $(1/2)[-k \pm \sqrt{k^2-4k}]$. So, to have $f(x)$ and $f(f(x))$ to have the same real solution set, these two solutions must be equal to the solutions of $f(x)$, which means $0$ and $-k$. So putting the previous solutions equal to $0$ and $-k$, lead to $k=0$.
</s>