Let $y=x e^{-x}\,\,\,\,\,$
On differentiating w.r.t. ' $x$ ', we get
$\frac{d y}{d x}=x e^{-x}(-1)+e^{-x} $
$\frac{d y}{d x}=e^{-x}(1-x)$
For maximum or minimum,
$\frac{dy}{dx}=0$
$\Rightarrow e^{-x}(1-x)=0$
$\Rightarrow 1-x=0$
$\because e^{-x} \ne 0)$
$\Rightarrow x=1$
From E (ii), we get
$\frac{d^{2} y}{d x^{2}}=e^{-x}(-1)+(1-x) e^{-x}(-1) $
$=-e^{-x}-e^{-x}+x e^{-x} $
$=-2 e^{-x}+x e^{-x} $
$\frac{d^{2} y}{d x^{2}}=e^{-x}(x-2) $
$\left(\frac{d^{2} y}{d x^{2}}\right)_{\text {at } x=1} =e^{-1}(1-2)=\frac{1}{e}(-1) $
Negative value
$\therefore$ At $x=1, \,y$ is maximum and maximum value $=1 e^{-1}$
$=\frac{1}{e}$