The function \( f(x) = |x| + |1 - x| \) involves absolute values, necessitating careful consideration of different intervals for continuity and differentiability. First, evaluate it for various cases:
For \( x < 0 \):
\(|x| = -x \) and \(|1-x| = 1-x\). Thus, \( f(x) = -x + 1 - x = 1 - 2x \).
For \( 0 \leq x < 1 \):
\(|x| = x \) and \(|1-x| = 1-x\). Thus, \( f(x) = x + 1 - x = 1 \).
For \( x \geq 1 \):
\(|x| = x \) and \(|1-x| = x-1\). Thus, \( f(x) = x + x - 1 = 2x - 1\).
The piecewise function becomes:
\( f(x) = \begin{cases} 1 - 2x & x < 0 \\ 1 & 0 \leq x < 1 \\ 2x - 1 & x \geq 1 \end{cases} \)
Continuity:
Check continuity at critical points \( x = 0 \), \( x = 1 \).
At \( x = 0 \):
\(\lim_{x \to 0^-} f(x) = 1\), \(\lim_{x \to 0^+} f(x) = 1\), and \( f(0) = 1 \), so \( f(x) \) is continuous.
At \( x = 1 \):
\(\lim_{x \to 1^-} f(x) = 1\), \(\lim_{x \to 1^+} f(x) = 1\), and \( f(1) = 1 \), so \( f(x) \) is continuous.
Differentiability:
Check differentiability at critical points \( x = 0 \), \( x = 1 \).
For \( x < 0 \), derivative \( f'(x) = -2 \).
For \( 0 < x < 1 \), derivative \( f'(x) = 0 \).
For \( x > 1 \), derivative \( f'(x) = 2 \).
At \( x = 0 \):
Left-hand derivative \(\lim_{h \to 0^-} \frac{f(h) - f(0)}{h} = -2\).
Right-hand derivative \(\lim_{h \to 0^+} \frac{f(h) - f(0)}{h} = 0\).
Since left-hand and right-hand derivatives are not equal, \( f(x) \) is not differentiable at \( x = 0 \).
At \( x = 1 \):
Left-hand derivative \(\lim_{h \to 0^-} \frac{f(1+h) - f(1)}{h} = 0\).
Right-hand derivative \(\lim_{h \to 0^+} \frac{f(1+h) - f(1)}{h} = 2\).
Since left-hand and right-hand derivatives are not equal, \( f(x) \) is not differentiable at \( x = 1 \).
Conclusion: The function is continuous everywhere but differentiable at all points except \( x = 0 \). Thus, the correct answer is:
Continuous everywhere and differentiable at all points except at \( x = 0 \).
The function \( f(x) = |x| + |1 - x| \) is the sum of two absolute value functions, which are continuous everywhere. However, absolute value functions are not differentiable at the points where their arguments are zero. Specifically:
Thus, \(f(x)\) is continuous everywhere but differentiable at all points except at \(x = 0\) and \(x = 1\).