Question:

The function \[ f(x)=x|x-1|+|x+2| \] is

Show Hint

For absolute value functions, always locate the critical points where the expressions inside the modulus become zero. Break the real line into intervals and simplify the function separately on each interval.
Updated On: Jun 17, 2026
  • Increasing in \((-\infty,-2)\cup(1,\infty)\) and decreasing in \((-2,1)\)
  • Decreasing in \((-\infty,-2)\cup(1,\infty)\) and increasing in \((-2,1)\)
  • Monotonically decreasing on \(\mathbb{R}\)
  • Monotonically increasing on \(\mathbb{R}\)
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

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}.} \]
Was this answer helpful?
0
0