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)$ such that there exists $x_{0} \in[-1,1]$, satisfying
$$
\left|f^{\prime}\left(x_{0}\right)\right|=K .
$$
18. Note that, $|f(0)|=|c| \leqslant 1$.

From the fact that one of $b$ and $-b$ must have the same sign as $a+c$, we have
$$
\begin{array}{l}
|f(1)|=|a+b+c| \leqslant 1, \\
|f(-1)|=|a-b+c| \leqslant 1 \\
\Rightarrow|a+c|+|b| \leqslant 1 \\
\Rightarrow|a+c| \leqslant 1-|b| \\
\Rightarrow|a|-|c| \leqslant|a+c| \leqslant 1-|b| \\
\Rightarrow|a| \leqslant 1+|c|-|b| \leqslant 2-|b| .
\end{array}
$$

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

In fact, when $f(x)=2 x^{2}-1$,
$$
\left|f^{\prime}(1)\right|=4 \Rightarrow K=4 \text {. }
$$

For $f(x)$ that satisfies $\left|f^{\prime}\left(x_{0}\right)\right|=4$ for some $x_{0} \in[-1,1]$, we have
$$
\begin{array}{l}
4=\left|f^{\prime}\left(x_{0}\right)\right| \leqslant 4-|b| \\
\Rightarrow|b|=0,|a|=2 .
\end{array}
$$

When $a=2$, $f(x)=2 x^{2}+c$.
Then $|f(1)|=|2+c| \leqslant 1$
$\Rightarrow-3 \leqslant c \leqslant-1$.
And $|c| \leqslant 1 \Rightarrow c=-1$.
Thus, $f(x)=2 x^{2}-1$.
When $a=-2$, similarly, $f(x)=-2 x^{2}+1$ satisfies the condition.
In summary, the functions that satisfy the given conditions are
$$
f(x)= \pm\left(2 x^{2}-1\right) \text {. }
$$