Question:medium

The function f(x) = |x| + |1 − x| is:

Updated On: Mar 27, 2026
  • continuous and differentiable at x = 0 only
  • continuous at x = 0 but nowhere differentiable
  • continuous everywhere and differentiable at all points except at x = 0
  • continuous but not differentiable at x = 1
Show Solution

The Correct Option is C

Solution and Explanation

The function \( f(x) = |x| + |1 - x| \) requires analysis of absolute value properties to determine its continuity and differentiability across different intervals. The function is evaluated for distinct cases:

For \( x<0 \):

Since \( |x| = -x \) and \( |1-x| = 1-x \) for \( x<0 \), the function simplifies to \( f(x) = -x + (1-x) = 1 - 2x \).

For \( 0 \leq x<1 \):

With \( |x| = x \) and \( |1-x| = 1-x \) in this interval, \( f(x) = x + (1-x) = 1 \).

For \( x \geq 1 \):

As \( |x| = x \) and \( |1-x| = -(1-x) = x-1 \) for \( x \geq 1 \), the function becomes \( f(x) = x + (x-1) = 2x - 1\).

The function can thus be expressed as a piecewise function:

\( f(x) = \begin{cases} 1 - 2x & x<0 \\ 1 & 0 \leq x<1 \\ 2x - 1 & x \geq 1 \end{cases} \)

Continuity Analysis:

Continuity is checked at the boundary points \( x = 0 \) and \( x = 1 \).

At \( x = 0 \):

The left-hand limit is \(\lim_{x \to 0^-} f(x) = 1\), the right-hand limit is \(\lim_{x \to 0^+} f(x) = 1\), and the function value at \( x = 0 \) is \( f(0) = 1 \). Since these are equal, \( f(x) \) is continuous at \( x = 0 \).

At \( x = 1 \):

The left-hand limit is \(\lim_{x \to 1^-} f(x) = 1\), the right-hand limit is \(\lim_{x \to 1^+} f(x) = 1\), and the function value at \( x = 1 \) is \( f(1) = 1 \). Since these are equal, \( f(x) \) is continuous at \( x = 1 \).

Differentiability Analysis:

Differentiability is examined at the boundary points \( x = 0 \) and \( x = 1 \).

The derivatives for each interval are:

For \( x<0 \), \( f'(x) = -2 \).

For \( 0<x<1 \), \( f'(x) = 0 \).

For \( x>1 \), \( f'(x) = 2 \).

At \( x = 0 \):

The left-hand derivative is \(\lim_{h \to 0^-} \frac{f(h) - f(0)}{h} = -2\).

The right-hand derivative is \(\lim_{h \to 0^+} \frac{f(h) - f(0)}{h} = 0\).

As the left-hand and right-hand derivatives are unequal, \( f(x) \) is not differentiable at \( x = 0 \).

At \( x = 1 \):

The left-hand derivative is \(\lim_{h \to 0^-} \frac{f(1+h) - f(1)}{h} = 0\).

The right-hand derivative is \(\lim_{h \to 0^+} \frac{f(1+h) - f(1)}{h} = 2\).

As the left-hand and right-hand derivatives are unequal, \( f(x) \) is not differentiable at \( x = 1 \).

Conclusion: The function \( f(x) \) is continuous for all real numbers but is not differentiable at \( x = 0 \) and \( x = 1 \).

Was this answer helpful?
0