3. Let $g(x)=\frac{2}{x^{2}-8x+17}$. Find all possible values of the parameter $a$ such that the inequality holds for all real $x$. In your answer, write the difference between the largest and smallest possible values of the parameter $a$.

(6 points)
Solution. The function

$$
g(x)=\frac{2}{x^{2}-8 x+17}=\frac{2}{(x-4)^{2}+1}
$$

is defined on the entire number line and takes all values from the interval $(0 ; 2]$. The function $g(x)$ reaches its maximum value at the point $x=4, g_{\max }=g(4)=2$, on the interval $(-\infty ; 4)$ the function $g(x)$ is increasing, on the interval $(4 ;+\infty)_{-}^{\text {decreases. The function }} g^{4}(x)$ takes all values from the interval $(0 ; 16]$, since
$t=g(x) \in(0 ; 2]$, and the function $t^{4}$ is increasing in this interval. To find the set of values of the function $f(x)=g\left(g^{4}(x)\right)$, it is sufficient to find the set of values of the function $g(x)$ on the interval $(0 ; 16]$. On the specified interval, $g(x)$ takes all values from the set $[g(16) ; g(4)]=[2 / 145 ; 2]$

The inequality $a^{2}+6 a+\frac{727}{145} \leq g\left(g^{4}(x)\right) \leq 10 a^{2}+29 a+2$ holds for all real $x$ if $(a+1)(a+5) \leq 0, \quad 0 \leq a(10 a+29), a \in[-5 ;-2.9]$.

Answer: $2.1$.