5. Let $a, b$ be real numbers, and the function $f(x)=a x+b$ satisfies: for any $x \in[0,1]$, we have $|f(x)| \leq 1$. Then the maximum value of $a b$ is $\qquad$ .
Answer $\frac{1}{4}$.
Solution It is easy to know that $a=f(1)-f(0), b=f(0)$, then
$$
a b=f(0) \cdot(f(1)-f(0))=-\left(f(0)-\frac{1}{2} f(1)\right)^{2}+\frac{1}{4}(f(1))^{2} \leq \frac{1}{4}(f(1))^{2} \leq \frac{1}{4} .
$$

When $2 f(0)=f(1)= \pm 1$, i.e., $a=b= \pm \frac{1}{2}$, $a b=\frac{1}{4}$. Therefore, the maximum value of $a b$ is $\frac{1}{4}$.