Let f(x)=xex(1−x) then f(x) is:
Now f(x)=xex(1−x)
Differentiating both side w.r.t x we get,
f′(x)=xex(1−x)(1−2x)+ex(1−x)
=−ex(1−x)(2x2−x−1)
=−ex(1−x)(2x+1)(x−1)
Now finding critical point by equating f′(x)=0
We get, x=\frac{-1}{2}&x=1
∴f(x) is decreasing in (−∞,−21)∪(1,∞)
And increasing in (−21,1)