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
Answer: $[-2,0]$.
Solution: On $[1,+\infty)$, $f(x)=x^{2}+a x-a$ is monotonically increasing, which is equivalent to $-\frac{a}{2} \leq 1$, i.e., $a \geq-2$. On $[0,1]$, $f(x)=x^{2}-a x+a$ is monotonically increasing, which is equivalent to $\frac{a}{2} \leq 0$, i.e., $a \leq 0$. Therefore, the range of real number $a$ is $[-2,0]$.