5. Find all values of the parameter $a$ for which the equation

$$
3|x+3 a|+\left|x+a^{2}\right|+2 x=a
$$

has no solution.
Answer: $(-\infty ; 0) \cup(10 ;+\infty)$

Solution. Method I. Consider the function $f(x)=3|x+3 a|+\left|x+a^{2}\right|+2 x-a$. $f^{\prime}(x)=3 \cdot \frac{x+3 a}{|x+3 a|}+\frac{x+a^{2}}{\left|x+a^{2}\right|}+2, x_{1}=-3 a$ and $x_{2}=-a^{2}$ are critical points. When $x<x_{1} x<x_{2} f^{\prime}(x)=-4 \Longrightarrow f \searrow$; when $x_{1}<x<x_{2} f^{\prime}(x)=0 \Longrightarrow f=\text { const }$; when $x>x_{1} x>x_{2} f^{\prime}(x)=6 \Longrightarrow f \nearrow$. The function $f$ is not bounded from above, it is continuous, and the minimum value is reached at the point $-3 a$: if $-3 a<0$; if $-a^{2}<0$. We get the following inequality

$$
\left|a^{2}-3 a\right|>7 a \Longleftrightarrow\left[\begin{array}{l}
a^{2}-3 a>7 a, \\
a^{2}-3 a<7 a
\end{array}\right. \Longleftrightarrow\left[\begin{array}{l}
a^{2}-10 a>0, \\
a^{2}+4 a<0
\end{array}\right. \Longleftrightarrow\left[\begin{array}{l}
a<0, \\
a>10
\end{array}\right.
$$

$x_{1}>x_{2}$ if and only if $a^{2}-3 a>0$, i.e., $a \in(-\infty, 0) \cup(3,+\infty)$.

1) Let $x_{1}>x_{2}$, i.e., $a \in(-\infty, 0) \cup(3,+\infty)$. On the interval $\left(-\infty, x_{1}\right]$ both absolute values are opened with a minus, and $f(x)$ is a linear function with a slope of -4, hence it is decreasing. On the segment $\left[x_{2}, x_{1}\right]$ the first absolute value is opened with a minus, the second with a plus, hence $f(x)$ is a constant function. On the interval $\left[x_{1},+\infty\right)$ the function $f(x)$ is linear with a slope of 6, hence it is increasing. From the above, it follows that for all $x$ the function $f(x) \geqslant f\left(x_{1}\right)$. Therefore, for the equation $f(x)=0$ to have no solution, it is necessary and sufficient that $f\left(x_{1}\right)>0$.

We have $f\left(x_{1}\right)=\left|-3 a+a^{2}\right|-6 a-a=a^{2}-10 a$. The solution to the inequality $a^{2}-10 a>0$ is the set $(-\infty, 0) \cup(10,+\infty)$. All of it is contained in the set $(-\infty, 0) \cup(3,+\infty)$.

2) Let $x_{1}<x_{2}$, i.e., $a \in(0,3)$. In this case, $f\left(x_{1}\right)=\left|-3 a+a^{2}\right|-6 a-a=3 a-a^{2}-7 a=-\left(a^{2}+4 a\right)$. The solution to the inequality $-a(a+4)>0$ is the interval $(-4,0)$. It has an empty intersection with the set $(0,3)$, hence in this case no value of $a$ is a solution to the problem.
3) Let $x_{1}=x_{2}$, i.e., $a \in\{0,3\}$. Note that in this case, similarly to case 2), the point $x=x_{1}$ is a minimum point of the function, and again, $f\left(x_{1}\right)=0+0-7 a$ must be positive, which is not satisfied for $a=0$ and $a=3$.