Question:

Let \( f(x) = |x| + |x-1| + |x+1| \) be a function defined on \( \mathbb{R} \), then \( f(x) \) is:

Show Hint

A function involving a sum of absolute values, \( \sum |x-a_i| \), will generally be non-differentiable at each point \(x=a_i\). To check, you don't always need to write out the full piecewise function. You can just check if the sum of the derivatives of the arguments changes sign at that point. For example at \(x=1\), the derivatives of \(x, x-1, x+1\) are \(1,1,1\). The signs of the absolute values are \(+, -, +\) just below 1, and \(+,+,+\) just above 1. The derivative just below 1 is \(+1 -1 +1 = 1\). The derivative just above 1 is \(+1+1+1=3\). Since \(1 \neq 3\), it's not differentiable.
Updated On: Jan 17, 2026
  • differentiable for all \( x \in \mathbb{R} \)
  • differentiable for all \( x \in \mathbb{R} \) other than \( x = -1, 0, 1 \)
  • differentiable only for \( x = -1, 0, 1 \)
  • not differentiable at any real point
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

To determine where the function \( f(x) = |x| + |x-1| + |x+1| \) is differentiable, we need to analyze the points of nondifferentiability of each absolute value component.

The given function has three components:

  • \(|x|\), which is nondifferentiable at \(x = 0\).
  • \(|x-1|\), which is nondifferentiable at \(x = 1\).
  • \(|x+1|\), which is nondifferentiable at \(x = -1\).

 

The overall function \( f(x) \) will be nondifferentiable at the points \(x = -1, 0, \text{ and } 1\) because the nondifferentiability of any component at a point makes the entire function nondifferentiable there.

Outside these points, the function is differentiable. This can be verified by checking that the derivative exists and is continuous in the intervals formed by these points:

  • \(( -\infty, -1 )\): Here, \(f(x) = -x + (-x-1) + (-x+1) = -3x\).
  • \(( -1, 0 )\): Here, \(f(x) = -x + (-x-1) + (x+1) = -x\).
  • \(( 0, 1 )\): Here, \(f(x) = x + (-x-1) + (x+1) = x\).
  • \(( 1, \infty )\): Here, \(f(x) = x + (x-1) + (x+1) = 3x\).

In each of these intervals, \( f(x) \) is a linear function, and hence differentiable.

Therefore, the correct answer is: differentiable for all \( x \in \mathbb{R} \) other than \( x = -1, 0, 1 \).

Was this answer helpful?
0
0

Top Questions on Calculus

View More Questions