2.170. $\frac{a^{3}+a^{2}-2 a}{a|a+2|-a^{2}+4}$.
Solution.

Domain of definition: $a \neq-2$.

$$
\frac{a^{3}+a^{2}-2 a}{a|a+2|-a^{2}+4}=\frac{a\left(a^{2}-1\right)+a(a-1)}{a|a+2|-a^{2}+4}=\frac{a(a+2)(a-1)}{a|a+2|-(a-2)(a+2)}
$$

$$
=\left\{\begin{array}{l}
\frac{a(a+2)(a-1)}{-a(a+2)-(a-2)(a+2)}=-\frac{a(a+2)(a-1)}{(a+2)(a+a-2)}=-\frac{a}{2}, \text { if } a<-2 .
\end{array}\right.
$$

Answer: $-\frac{a}{2}$ when $a \in(-\infty ;-2) ; \frac{a(a-1)}{2}$ when $a \in(-2 ; \infty)$.