Concept:
Whenever absolute value functions are involved, the real line must be divided at the points where the expressions inside the modulus become zero.
Here,
\[
x-1=0
\quad\Rightarrow\quad
x=1,
\]
and
\[
x+2=0
\quad\Rightarrow\quad
x=-2.
\]
Hence the intervals are
\[
(-\infty,-2),\qquad
(-2,1),\qquad
(1,\infty).
\]
We simplify \(f(x)\) on each interval and examine its derivative.
Step 1: Interval \(x<-2\).
Here,
\[
|x-1|=1-x,
\qquad
|x+2|=-(x+2).
\]
Therefore,
\[
f(x)
=
x(1-x)-x-2.
\]
\[
=
-x^2-2.
\]
Differentiating,
\[
f'(x)
=
-2x.
\]
Since \(x<-2\),
\[
-2x>0.
\]
Hence \(f(x)\) is increasing on \((-\infty,-2)\).
Step 2: Interval \(-2<x<1\).
Again,
\[
|x-1|=1-x,
\qquad
|x+2|=x+2.
\]
Thus,
\[
f(x)
=
x(1-x)+(x+2).
\]
\[
=
-x^2+2x+2.
\]
Differentiating,
\[
f'(x)
=
-2x+2.
\]
Since \(x<1\),
\[
-2x+2>0.
\]
Hence \(f(x)\) is increasing throughout \((-2,1)\).
Step 3: Interval \(x>1\).
Now,
\[
|x-1|=x-1,
\qquad
|x+2|=x+2.
\]
Therefore,
\[
f(x)
=
x(x-1)+x+2.
\]
\[
=
x^2+2.
\]
Differentiating,
\[
f'(x)=2x.
\]
Since \(x>1\),
\[
2x>0.
\]
Hence \(f(x)\) is increasing on \((1,\infty)\).
Step 4: Conclude monotonicity.
The derivative is positive on all three intervals:
\[
(-\infty,-2),\qquad
(-2,1),\qquad
(1,\infty).
\]
Therefore the function never decreases.
Hence,
\[
\boxed{\text{The function is monotonically increasing on } \mathbb{R}.}
\]