8. Find all values of the parameter $a$, for each of which the solution set of the inequality $\frac{x^{2}+(a+1) x+a}{x^{2}+5 x+4} \geq 0$ is the union of three non-overlapping intervals. In your answer, specify the sum of the three smallest integer values of $a$ from the obtained interval.
# Solution

Let's factorize the numerator and the denominator of the left part of the inequality, it will take the form: $\frac{(x+1)(x+a)}{(x+1)(x+4)} \geq 0$. There are five possible cases for the placement of the number ($-a$) relative to the numbers (-4) and (-1). In each case, the inequality is solved using the interval method on the number line (see Fig.2). Let's list the results of the investigation: 1 )

$-a > -1 ; a < 4 \quad x \in (-\infty ; -4) \cup (-4 ; -a] \cup (-1 ; +\infty)$ - does not fit. 2 )

$-a = -1 ; a = 1 \quad x \in (-\infty ; -4) \cup (-1 ; +\infty)$ - does not fit. 3 )

$-4 < -a < -1 ; 1 < a < 4 \quad x \in (-\infty ; -4) \cup (-4 ; -a] \cup (-1 ; +\infty)$ - does not fit. 4 )

$-a = -4 ; a = 4 \quad x \in (-\infty ; -4] \cup (-1 ; +\infty)$ - does not fit. 5 )

$-a < -4 ; a > 4 \quad x \in (-\infty ; -a] \cup (-4 ; -1) \cup (-1 ; +\infty)$ - fits. Thus, the answer to the problem satisfies $a \in (1 ; +\infty)$. The smallest integers that fall within this interval are 2, 3, and 4. $2 + 3 + 4 = 9$.

Answer: 9.