For what real numbers $a$ and $b$ is it true that for all $x \in[0 ; 1]$, $\left|x^{2}-a x-b\right| \leq \frac{1}{8}$?
I. solution. It is sufficient to examine where there is an $x_{0}$ such that the difference between the maximum and minimum values of the function $x \mapsto x^{2}$ in the interval $x \in [x_{0}; x_{0}+1]$ is at most $\frac{1}{4}$. If, for such an $x_{0}$, we translate the graph of the function parallel to the $x$-axis so that $x_{0}$ moves to 0, and then translate it parallel to the $y$-axis so that the minimum value moves to $-\frac{1}{8}$, then the resulting function $x \mapsto x^{2} - a x - b$ satisfies the problem's condition.

![](https://cdn.mathpix.com/cropped/2024_05_02_c0ed772b9920622463f1g-1.jpg?height=288&width=398&top_left_y=409&top_left_x=858)

Conversely, for any suitable $a$ and $b$, applying an appropriate linear transformation to the function $x \mapsto x^{2} - a x - b$ will bring us to the function $x \mapsto x^{2}$, which varies by at most $\frac{1}{4}$ on some interval $[x_{0}; x_{0}+1]$. Let's find such $x_{0}$ values for the function $x \mapsto x^{2}$. For simplicity, let $M_{x_{0}}$ and $m_{x_{0}}$ denote the maximum and minimum values of the function $x \mapsto x^{2}$ on the interval $[x_{0}; x_{0}+1]$. We distinguish several cases based on the possible values of $x_{0}$.

1. case: $x_{0} \geq 0$. In this case, the function is strictly increasing on the interval $[x_{0}; x_{0}+1]$, taking its minimum at $x_{0}$ and its maximum at $(x_{0}+1)$.

$$
M_{x_{0}} - m_{x_{0}} = (x_{0}+1)^{2} - x_{0}^{2} = 2 x_{0} + 1 \geq 1
$$

2. case: $x_{0} \leq -1$. In this case, the function is strictly decreasing on the interval $[x_{0}; x_{0}+1]$, taking its maximum at $x_{0}$ and its minimum at $(x_{0}+1)$.

$$
M_{x_{0}} - m_{x_{0}} = x_{0}^{2} - (x_{0}+1)^{2} = -2 x_{0} - 1 \geq 1
$$

3. case: $-1 < x_{0} < 0$. Here, the function has a minimum at $x = 0$ and a maximum at either $x_{0}$ or $x_{0}+1$, depending on which is farther from 0. We need to check the difference between the maximum and minimum values:

- If $x_{0} \geq -\frac{1}{2}$, the maximum is at $x_{0}+1$ and the minimum is at 0.
- If $x_{0} < -\frac{1}{2}$, the maximum is at $x_{0}$ and the minimum is at 0.

For $x_{0} \geq -\frac{1}{2}$:

$$
M_{x_{0}} - m_{x_{0}} = (x_{0}+1)^{2} - 0 = (x_{0}+1)^{2} \leq \frac{1}{4} \quad \text{if} \quad x_{0} = -\frac{1}{2}
$$

For $x_{0} < -\frac{1}{2}$:

$$
M_{x_{0}} - m_{x_{0}} = x_{0}^{2} - 0 = x_{0}^{2} \leq \frac{1}{4} \quad \text{if} \quad x_{0} = -\frac{1}{2}
$$

Thus, $x_{0} = -\frac{1}{2}$ is the only value for which the variation of the function $x \mapsto x^{2}$ on the interval $[x_{0}; x_{0}+1]$ is at most $\frac{1}{4}$, and exactly this much. Therefore, both the translation parallel to the $x$-axis and the translation parallel to the $y$-axis are uniquely determined:

$$
f(x) = \left(x - \frac{1}{2}\right)^{2} - \frac{1}{8} = x^{2} - x + \frac{1}{8}
$$

Thus, the given condition is satisfied only for $a = 1$ and $b = -\frac{1}{8}$.

II. solution. Let's introduce the function $f(x) = x^{2} - a x - b$. The problem's condition then becomes $|f(x)| \leq \frac{1}{8}$ for $0 \leq x \leq 1$. The solution shows that the function $f$ is determined by three suitable substitution values, $f(0)$, $f\left(\frac{1}{2}\right)$, and $f(1)$.

$$
f(0) = -b ; \quad f\left(\frac{1}{2}\right) = \frac{1}{4} - \frac{a}{2} - b ; \quad f(1) = 1 - a - b
$$

(1) $|f(0)| \leq \frac{1}{8}$ holds if and only if $-\frac{1}{8} \leq b \leq \frac{1}{8}$.

(2) $\left|f\left(\frac{1}{2}\right)\right| \leq \frac{1}{8}$ holds if and only if $\frac{1}{8} \leq \frac{a}{2} + b \leq \frac{3}{8}$.

(3) $|f(1)| \leq \frac{1}{8}$ holds if and only if $\frac{7}{8} \leq a + b \leq \frac{9}{8}$.

Let's plot the solution sets of the three inequalities in a Cartesian coordinate system.

From the plot, it is clear that the solution sets of the (2) and (3) inequalities are represented by the parallelogram $P Q R S$. The coordinates of the vertex $P$ are $P\left(1; -\frac{1}{8}\right)$, and the rest of the parallelogram is below the line $y = -\frac{1}{8}$. Thus, the only point whose coordinates satisfy all three inequalities is $P$. If the problem has a solution, then only $a = 1$ and $b = -\frac{1}{8}$ are possible.

![](https://cdn.mathpix.com/cropped/2024_05_02_c0ed772b9920622463f1g-2.jpg?height=368&width=570&top_left_y=423&top_left_x=772)

It is immediately clear, for example, by completing the square, that the function $f(x) = x^{2} - x + \frac{1}{8}$ satisfies the problem's condition. Indeed: $f(x) = \left(x - \frac{1}{2}\right)^{2} - \frac{1}{8}$ and if $0 \leq x \leq 1$, then $\left|x - \frac{1}{2}\right| \leq \frac{1}{2}$, so

$$
-\frac{1}{8} \leq f(x) \leq \frac{1}{4} - \frac{1}{8} = \frac{1}{8}
$$

Remarks. 1. It is easy to see that the values $a = 1$ and $b = -\frac{1}{8}$ are also determined by the conditions $f(0) \geq -\frac{1}{8}$, $f\left(\frac{1}{2}\right) \geq -\frac{1}{8}$, and $f(1) \leq \frac{1}{8}$.

2. We can quickly reach the goal if we notice that

$$
\frac{f(0) + f(1)}{2} = \frac{1}{2} - \frac{a}{2} - b = \frac{1}{4} + f\left(\frac{1}{2}\right)
$$

from which, using the condition, we get

$$
0 \leq \frac{1}{8} + f\left(\frac{1}{2}\right) = \frac{f(0) - \frac{1}{8} + f(1) - \frac{1}{8}}{2} \leq 0
$$

so only $f\left(\frac{1}{2}\right) = -\frac{1}{8}$ and $f(0) = f(1) = \frac{1}{8}$ are possible. These values uniquely determine the quadratic polynomial.