2. Let the quadratic function $f(x)$ satisfy $f(x+2)=f(-x+2)$, and its graph intersects the $y$-axis at the point $(0,1)$, and the segment it intercepts on the $x$-axis has a length of $2 \sqrt{2}$. Find the analytical expression of $f(x)$.
(2002, Anhui Province High School Mathematics Competition)
(Given that $f(x)$ is symmetric about $x=2$, we can set $f(x)=a(x-$ $2)^{2}+b$. From $4 a+b=1,\left|x_{1}-x_{2}\right|=2 \sqrt{2}$, i.e., $2 \sqrt{-\frac{b}{a}}$ $=2 \sqrt{2}$, we know $\left.f(x)=\frac{1}{2}(x-2)^{2}-1.\right)$