Question:medium

The value of the integral \( \int_{0}^{4} ||x - 2| - x| dx = \)

Show Hint

For nested modulus functions, always work from the "inside out." Once the inner modulus is simplified for a specific range, the resulting expression is much easier to manage.
Updated On: Jun 3, 2026
  • \( 2 \)
  • \( 3 \)
  • \( 6 \)
  • \( 12 \)
Show Solution

The Correct Option is C

Solution and Explanation

Step 1: Understanding the Concept:
The absolute value function \(|u|\) is defined as \(u\) if \(u \geq 0\) and \(-u\) if \(u<0\).
When dealing with nested absolute values, it is best to resolve them from the inside out by splitting the integration range into intervals where the expressions inside the modulus have a constant sign.
The critical points occur where the expressions inside any modulus equal zero.
For \(|x - 2|\), the critical point is \(x = 2\).
For the outer modulus \(||x - 2| - x|\), the critical points are where \(|x - 2| = x\).
Step 2: Key Formula or Approach:
We resolve the function \(f(x) = ||x - 2| - x|\) piecewise over the interval \([0, 4]\).
Step 3: Detailed Explanation:
Interval 1: \(0 \leq x<2\)
In this range, \(x - 2\) is negative, so \(|x - 2| = -(x - 2) = 2 - x\).
The function becomes: \(f(x) = |(2 - x) - x| = |2 - 2x| = 2|1 - x|\).
This further splits at \(x = 1\):
- For \(0 \leq x<1\), \(1 - x\) is positive \(\implies f(x) = 2(1 - x) = 2 - 2x\).
- For \(1 \leq x<2\), \(1 - x\) is negative \(\implies f(x) = 2(x - 1) = 2x - 2\).
Interval 2: \(2 \leq x \leq 4\)
In this range, \(x - 2\) is positive, so \(|x - 2| = x - 2\).
The function becomes: \(f(x) = |(x - 2) - x| = |-2| = 2\).
Now, we split the integral at \(x = 1\) and \(x = 2\):
\[ I = \int_{0}^{1} (2 - 2x) dx + \int_{1}^{2} (2x - 2) dx + \int_{2}^{4} 2 dx \]
\[ I = [2x - x^2]_{0}^{1} + [x^2 - 2x]_{1}^{2} + [2x]_{2}^{4} \]
Calculating values:
Part 1: \((2(1) - 1^2) - 0 = 1\).
Part 2: \((2^2 - 2(2)) - (1^2 - 2(1)) = 0 - (-1) = 1\).
Part 3: \(2(4) - 2(2) = 8 - 4 = 4\).
Total Sum: \(1 + 1 + 4 = 6\).
Step 4: Final Answer:
The definite integral evaluates to 6.
Was this answer helpful?
0