3. If the function $f(x)=x^{2}+a|x-1|$ is monotonically increasing on $[0,+\infty)$, then the range of the real number $a$ is $\qquad$ .
3. $[-2,0]$.

On the interval $[1,+\infty)$, $f(x)=x^{2}+a x-a$ is monotonically increasing, which is equivalent to $-\frac{a}{2} \leqslant 1 \Rightarrow a \geqslant-2$.

On the interval $[0,1]$, $f(x)=x^{2}-a x+a$ is monotonically increasing, which is equivalent to $\frac{a}{2} \leqslant 0 \Rightarrow a \leqslant 0$.
Therefore, the real number $a \in[-2,0]$.