5. Solve the inequality $\sqrt{x+2-|x+1|} \leq x+5-|2 x+3|$.

#
# Solution:

$$
\left\{\begin{array} { c } 
{ x + 5 - | 2 x + 3 | \geq 0 , } \\
{ x + 2 - | x + 1 | \geq 0 , } \\
{ x + 2 - | x + 1 | \leq ( x + 5 - | 2 x + 3 | ) ^ { 2 } , }
\end{array} \Leftrightarrow \left\{\begin{array}{c}
|2 x+3| \leq x+5 \\
|x+1| \leq x+2, \\
x+2-|x+1| \leq(x+5-|2 x+3|)^{2}
\end{array} \Leftrightarrow\right.\right.
$$

$$
\begin{aligned}
& \left\{\begin{array} { c } 
{ - x - 5 \leq 2 x + 3 \leq x + 5 , } \\
{ - x - 2 \leq x + 1 \leq x + 2 , } \\
{ x + 2 - | x + 1 | \leq ( x + 5 - | 2 x + 3 | ) ^ { 2 } , }
\end{array} \Leftrightarrow \left\{\begin{array}{c}
-x-8 \leq 2 x \leq x+2 \\
x \geq-1.5 \\
x+2-|x+1| \leq(x+5-|2 x+3|)^{2}
\end{array} \Leftrightarrow\right.\right. \\
& \left\{\begin{array} { c } 
{ x \leq 2 , } \\
{ - 8 \leq 3 x , } \\
{ x \geq - 1.5 , } \\
{ x + 2 - | x + 1 | \leq ( x + 5 - | 2 x + 3 | ) ^ { 2 } , }
\end{array} \Leftrightarrow \left\{\begin{array}{c}
-1.5 \leq x \leq 2 \\
x+2-|x+1| \leq(-x+2)^{2}
\end{array} \Leftrightarrow\right.\right. \\
& \left\{\begin{array} { c } 
{ - 1.5 \leq x \leq 2 } \\
{ | x + 1 | \geq - x ^ { 2 } + 5 x - 2 }
\end{array} \Leftrightarrow \left\{\begin{array} { c } 
{ - 1.5 \leq x \leq 2 } \\
{ [ \begin{array} { c } 
{ x + 1 \geq - x ^ { 2 } + 5 x - 2 } \\
{ x + 1 \leq x ^ { 2 } - 5 x + 2 }
\end{array} }
\end{array} \Leftrightarrow \left\{\begin{array}{c}
-1.5 \leq x \leq 2 \\
{\left[\begin{array}{c}
x^{2}-4 x+3 \geq 0 \\
x^{2}-6 x+1 \geq 0
\end{array}\right.}
\end{array}\right.\right.\right. \\
& \Leftrightarrow\left\{\begin{array}{c}
-1.5 \leq x \leq 2 \\
(x-1)(x-3) \geq 0, \\
(x-3+2 \sqrt{2})(x-3-2 \sqrt{2}) \geq 0
\end{array} \Leftrightarrow x \in[-1.5 ; 1]\right.
\end{aligned}
$$

Answer: $x \in[-1.5 ; 1]$.