Prove this inequality $m-(mx^2-x+m)e^{-x}x\ge 0,\forall x\in (0,1+\frac{1}{m}]$ Let $m>0$ show that
$$m-(mx^2-x+m)e^{-x}x\ge 0,\forall x\in (0,1+\dfrac{1}{m}]$$
It suffices to prove that 
$$m(1-x^3e^{-x}-xe^{-x})+x\ge 0,x\in(0,1+\frac{1}{m}]$$

Idea $1$:,if we Let $f(m)=m(1-x^3e^{-x}-xe^{-x})+x$ it is clear $f(0)=x>0$,but why $f(m)\ge 0,\forall m>0$

Idea 2: if we let $$g(x)=m-(mx^2-x+m)e^{-x}x$$ Consider
$$\begin{align*}g'(x)&=-(2mx-1)e^{-x}x+(mx^2-x+m)e^{-x}x-(mx^2-x+m)e^{-x}\\
&=e^{-x}(mx^3-x^2+mx-2mx^2+x-mx^2+x-m)\\
&=e^{-x}(mx^3-(3m+1)x^2+(m+2)x-m)\end{align*}$$ following is hard to prove it
so maybe this inequality have other methods to solve it?

Since $mx\le m+1$,$$m-(mx^2-x+m)e^{-x}x\ge m-((m+1)x-x+m)e^{-x}x=m(1-e^{-x}x(x+1))$$Therefore, we only need to prove $1-e^{-x}x(x+1) \ge 0$ for positive $x$. Here, we know that $e^{-x}\le 1/(1+x+\frac{1}{2}x^2+\frac{1}{6}x^3)$. Appplying this, we get$$1-e^{-x}x(x+1)\ge1-\frac{6x^2+6x}{x^3+3x^2+6x+6}$$
Now it's left to prive $x^3+3x^2+6x+6\ge 6x^2+6x$, or $x^3-3x^2+6\ge0$ for positive $x$.
$x^3-3x^2+6=(x-2)^2(x+1)+2>0$, so the inequality is proved.
The equality does not hold, because the inequality $x^3-3x^2+6>0$ is strict.
