18 (12 points) Let the function $f(x)=a x^{2}+b x+c,(a, b, c \in \mathbf{R}, a \neq 0)$ satisfy that when $|x| \leqslant 1$, we have $|f(x)| \leqslant 1$. Let the maximum value of $\left|f^{\prime}(x)\right|$ for $|x| \leqslant 1$ be $K$. Find all functions $f(x)$ that satisfy the condition that there exists $x_{0} \in[-1,1]$, such that $\left|f^{\prime}\left(x_{0}\right)\right|=K$.
$18|f(0)|=|c| \leqslant 1$. Since one of $b$ and $-b$ must have the same sign as $a+c$, we have
$$
\begin{array}{c}
|f(1)|=|a+b+c| \leqslant 1, \\
|f(-1)|=|a-b+c| \leqslant 1,
\end{array}
$$

which implies $|a+c|+|b| \leqslant 1$, i.e., $|a+c| \leqslant 1-|b|$, thus
$$
|a|-|c| \leqslant|a+c| \leqslant 1-|b|,
$$

so $|a| \leqslant 1+|c|-|b| \leqslant 2-|b|$.
When $|x| \leqslant 1$, we have
$$
\left|f^{\prime}(x)\right|=|2 a x+b| \leqslant 2|a|+|b| \leqslant 4-|b| \leqslant 4 .
$$

In fact, when $f(x)=2 x^{2}-1$, $\left|f^{\prime}(1)\right|=4$, so $K=4$.
For $f(x)$ such that there exists $x_{0} \in[-1,1]$ with $\left|f^{\prime}\left(x_{0}\right)\right|=4$, we have $4=$ $\left|f^{\prime}\left(x_{0}\right)\right| \leqslant 4-|b|$, which implies $|b|=0,|a|=2$.

When $a=2$, then $f(x)=2 x^{2}+c$. $|f(1)|=|2+c| \leqslant 1$, so $-3 \leqslant c \leqslant-1$, and since $|c| \leqslant 1$, we have $c=-1$, hence $f(x)=2 x^{2}-1$.
When $a=-2$, similarly, we get $f(x)=-2 x^{2}+1$ which satisfies the conditions.
In summary, the functions that satisfy the given conditions are $f(x)= \pm\left(2 x^{2}-1\right)$.