We consider two cases: $x\geq 0$ and $x<0$.
For $x\geq 0$, we have $x^2=2x+1$, so $x^2-2x-1=0$.
Using the quadratic formula, we find $x=1\pm \sqrt{2}$.
For $x<0$, we have $-x^2=2x+1$, so $x^2+2x+1=0$.
This quadratic factors as $(x+1)^2=0$, so $x=-1$.
The smallest solution is $x=\boxed{-1}$.
The answer is: -1
Below is a math problem. Provide a detailed, step-by-step solution.

### Problem:
Find the solution to $x|x| = 2x+1$ which has the smallest value.

### Answer:
