The greatest value of the function f(x)=xe−x in [0,∞), is
f(x)=xe−xf′(x)=e−x−xe−x
At maxima f′(x)=0
⇒e−x−xe−x=0⇒e−x(1−x)=0⇒x=1
By second derivative test
f′′(x)=−e−x−e−x+xe−xf′′(1)=−e−1−e−1+e−1=−e−1f′′(1)<0
So x=1 is the point of maxima
f(1)=(1)e−1=1e
So, option B is correct.