## Task B-2.3.

The maximum value of the function $f(x)=-3 x^{2}-2(k-5) x+k-9$ is equal to the minimum value of the function $g(x)=x^{2}-2(k-1) x+k+7$. Determine all such functions $f$ and $g$.
## Solution.

The minimum or maximum value of the quadratic function $f(x)=a x^{2}+b x+c$ is $\frac{4 a c-b^{2}}{4 a}$. Therefore, the maximum value of the function $f$ is

$$
\frac{4 \cdot(-3) \cdot(k-9)-4(k-5)^{2}}{4 \cdot(-3)}=\frac{k^{2}-7 k-2}{3}
$$

and the minimum value of the function $g$ is

$$
\frac{4 \cdot 1 \cdot(k+7)-4(k-1)^{2}}{4}=-k^{2}+3 k+6
$$

Since these values must be equal, we have $\frac{k^{2}-7 k-2}{3}=-k^{2}+3 k+6$. 1 point

By simplifying, we get $k^{2}-4 k-5=0$

so the solutions are $k=-1$ and $k=5$. 1 point

The sought functions are

$$
\begin{array}{cc}
f_{1}(x)=-3 x^{2}+12 x-10, \quad g_{1}(x)=x^{2}+4 x+6, & 1 \text { point } \\
f_{2}(x)=-3 x^{2}-4, \quad g_{2}(x)=x^{2}-8 x+12 . & 1 \text { point }
\end{array}
$$