2. Given the function $f(x)=x^{2}-2 a x+2 a+4$ with the domain $\mathbf{R}$ and the range $[1,+\infty)$, the range of real number $a$ is $\qquad$ .
2. $\{-1,3\}$. The parabola opening upwards is tangent to the line $y=1$, so $x^{2}-2 a x+2 a+4=1, \Delta=0$.