Solution
= Solution
The <product rule> gives
$$
y'=e^{-x}(3x^2-x^3)=x^2e^{-x}(3-x).
$$
For $x>0$, the <derivative> is positive before $3$ and negative after $3$. Also $y(0)=0$ and $x^3e^{-x}\to0$ as $x\to\infty$. Thus the global maximum on the requested range is
$$
\boxed{x=3,\qquad y_{\max}=27e^{-3}.}
$$