Example 13 (Training Question for the 13th "Hope Cup" Invitational Competition) Given the quadratic function $f(x)=a x^{2}+b x+c(a$, $b, c \in \mathbf{R}, a \neq 0)$. (1) $f(-1)=0$, (2) For any $x \in \mathbf{R}, x \leqslant f(x) \leqslant \frac{1}{2}\left(x^{2}+1\right)$, then $a=$
Solve $a=\frac{1}{4}, b=\frac{1}{2}, c=\frac{1}{4}$. Reason: From condition (2), let $x=1$ to get $1 \leqslant f(1) \leqslant 1$, i.e., $f(1)=1$. Also, $f(-1)=0, f(0)=c$, so we can let $f(x)=\frac{1}{2} x(x+1)-c(x-1)(x+1)=$ $\frac{1}{2}(1-2 c) x^{2}+\frac{1}{2} x+c$.
From condition (2), we know that the following inequality holds for all $x \in \mathbf{R}$:
$\frac{1}{2}(1-2 c) x^{2}+\frac{1}{2} x+c \geqslant x$, i.e., $\frac{1}{2}(1-2 c) x^{2}-\frac{1}{2} x+c \geqslant 0$.
Thus, $\left\{\begin{array}{l}\frac{1}{2}(1-2 c)>0, \\ \Delta=\frac{1}{4}-4 \cdot c \cdot \frac{1}{2}(1-2 c) \leqslant 0,\end{array}\right.$
Solving this, we get $c=\frac{1}{4}$.
Therefore, $f(x)=\frac{1}{4} x^{2}+\frac{1}{2} x+\frac{1}{4}$.
Note: The function expression here uses the three-point form of a quadratic function (i.e., the Lagrange polynomial representation of the function): If a quadratic function $f(x)$ passes through three points $\left(x_{1}, f\left(x_{1}\right)\right) 、\left(x_{2} 、 f\left(x_{2}\right)\right) 、\left(x_{3}, f\left(x_{3}\right)\right)$, then $f(x)=$ $\frac{\left(x-x_{2}\right)\left(x-x_{3}\right)}{\left(x_{1}-x_{2}\right)\left(x_{1}-x_{3}\right)} \cdot f\left(x_{1}\right)+\frac{\left(x-x_{1}\right)\left(x-x_{3}\right)}{\left(x_{2}-x_{1}\right)\left(x_{2}-x_{3}\right)} \cdot f\left(x_{2}\right)+\frac{\left(x-x_{1}\right)\left(x-x_{2}\right)}{\left(x_{3}-x_{1}\right)\left(x_{3}-x_{2}\right)} \cdot f\left(x_{3}\right)$.