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

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

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