how do i find the critical points of the function g(x)=xe^-x

i think the derivative is xe^-x*-x^2e???

No on derivative...

f=xe^-x

f'= e^-x - xe^-x

The first term is not the same as yours.