7. Given the functions $f(x)=x^{2} \mathrm{e}^{x}$ and $g(x)=2 x \mathrm{e}^{x}+a$ have exactly three intersection points, then the range of the real number $a$ is
Solve
$f(x)=g(x) \Rightarrow a=\mathrm{e}^{x}\left(x^{2}-2 x\right)$. Let $h(x)=\mathrm{e}^{x}\left(x^{2}-2 x\right), h^{\prime}(x)=\mathrm{e}^{x}\left(x^{2}-2\right)$, then $h(x)$ is monotonically increasing on $(-\infty,-\sqrt{2}),(\sqrt{2},+\infty)$, and monotonically decreasing on $(-\sqrt{2}, \sqrt{2})$,
Thus, $f(x)_{\text {max }}=f(-\sqrt{2})=(2+2 \sqrt{2}) \mathrm{e}^{-\sqrt{2}}, f(x)_{\text {min }}=f(\sqrt{2})=(2-2 \sqrt{2}) \mathrm{e}^{\sqrt{2}}$, and as $x \rightarrow-\infty$, $h(x) \rightarrow 0 ; x \rightarrow+\infty$, $h(x) \rightarrow+\infty$.
By combining the graph, we know that the range of real number $a$ is $\left(0,(2+2 \sqrt{2}) \mathrm{e}^{-\sqrt{2}}\right)$.