2. Let $y=f(x)$ be a quadratic function, the equation $f(x)=0$ has two equal real roots, and $f^{\prime}(x)=2 x+2$, then the expression of $y=f(x)$ is $\qquad$ .
2. $f(x)=x^{2}+2 x+1 \quad$ Let $f(x)=a x^{2}+b x+c, f^{\prime}(x)=2 a x+b$, so $a=1, b=2$, and $\Delta=$ $b^{2}-4 a c=0$. Thus, $c=1$, which gives $f(x)=x^{2}+2 x+1$.