题目:若过点 $P(1,m)\ (m\in R)$ 有 $3$ 条直线与函数 $f(x)=x\mathrm{e}^{x}$ 的图象相切,则 $m$ 的取值范围是_____.
【解】由题意可得 $f'(x)=(x+1)\mathrm{e}^{x}$,
设切点坐标为 $\left(x_{0},y_{0}\right)$,则切线斜率 $k=\left(x_{0}+1\right)\cdot\mathrm{e}^{x_{0}}$,
所以切线方程为 $y-x_{0}\mathrm{e}^{x_{0}}=\left(x_{0}+1\right)\cdot\mathrm{e}^{x_{0}}\left(x-x_{0}\right)$,
将 $P(1,m)$ 代入得 $m=\left(-x_{0}^{2}+x_{0}+1\right)\cdot\mathrm{e}^{x_{0}}$.
因为存在三条切线,即方程 $m=\left(-x^{2}+x+1\right)\cdot\mathrm{e}^{x}$ 有三个不等实数根,
则方程 $m=\left(-x^{2}+x+1\right)\cdot\mathrm{e}^{x}$ 有三个不等实数根等价于函数 $y=\left(-x^{2}+x+1\right)\mathrm{e}^{x}$,$y=m$ 的图像有三个交点,
设 $g(x)=\left(-x^{2}+x+1\right)\mathrm{e}^{x}$,则 $g'(x)=-(x-1)(x+2)\mathrm{e}^{x}$,
当 $x\in(-2,1)$ 时,$g'(x)>0$,$g(x)$ 单调递增;
在 $(-\infty,-2)$ 和 $(1,+\infty)$ 上,$g'(x)<0$,$g(x)$ 单调递减,$g(-2)=-\dfrac{5}{\mathrm{e}^{2}}$,
当 $x<\dfrac{1-\sqrt{5}}{2}$ 或 $x>\dfrac{1+\sqrt{5}}{2}$ 时,$g(x)<0$,
画出 $g(x)=\left(-x^{2}+x+1\right)\mathrm{e}^{x}$ 的图象如图,
要使函数 $y=\left(-x^{2}+x+1\right)\mathrm{e}^{x}$,$y=m$ 的图像有三个交点,需 $g(-2)<m<0$,
即 $-\dfrac{5}{\mathrm{e}^{2}}<m<0$,即 $m$ 的取值范围是 $\left(-\dfrac{5}{\mathrm{e}^{2}},0\right)$,
故答案为:$\left(-\dfrac{5}{\mathrm{e}^{2}},0\right)$