4. Find all values of the parameter $a$, for each of which the equation $a|2+x|+\frac{x^{2}+x-12}{x+4}=0$ has exactly one solution
Answer: $a \in(-1 ; 1] \cup\left\{\frac{7}{2}\right\}$.

Solution. Given the condition $x \neq-4$, the equation is equivalent to $a|x+2|=3-x$. The graph of the right side of the equation is the line $y=x-3$. The graph of the left side of the equation is a "V" shape with its vertex at the point $(-2 ; 0)$, and the slope of its branches is determined by the parameter $a$.

The right branch of the "V" intersects the line when $a>-1$, the left branch intersects the line when $a>1$ and $a \neq \frac{7}{2}$ (when $a=\frac{7}{2}$, the right branch passes through the punctured point of the line - the point $\left(-4 ; 7\right)$). Therefore, exactly one solution is obtained when $a \in(-1 ; 1] \cup\left\{\frac{7}{2}\right\}$.