The derivative f' (x) = 2xe-x-x2e-x = (2x-x2) e-x.
∵e^-x>; 0
∴ When 2x-x2 >;; 0,f(x)>0
That is, when 0
Ⅶ when 2x-x 2 < 0, f (x)
That is, when x
∴
When x=0, f(x) takes the minimum value, and f(0)=0.
When x=2, f(x) reaches the maximum and f (2) = 4e-2.