The function $f(x) = |x| + |x-1|$ can be defined piecewise as follows: If $x < 0$, then $|x| = -x$ and $|x-1| = -(x-1) = 1-x$. So, $f(x) = -x + 1 - x = 1 - 2x$. If $0 \le x < 1$, then $|x| = x$ and $|x-1| = -(x-1) = 1-x$. So, $f(x) = x + 1 - x = 1$. If $x \ge 1$, then $|x| = x$ and $|x-1| = x-1$. So, $f(x) = x + x - 1 = 2x - 1$. Thus, $$f(x) = \begin{cases} 1-2x, & x < 0 \\ 1, & 0 \le x < 1 \\ 2x-1, & x \ge 1 \end{cases}$$
For continuity at $x=0$, we need to check if $\lim_{x \to 0^-} f(x) = \lim_{x \to 0^+} f(x) = f(0)$. $\lim_{x \to 0^-} f(x) = \lim_{x \to 0^-} (1-2x) = 1 - 2(0) = 1$. $\lim_{x \to 0^+} f(x) = \lim_{x \to 0^+} (1) = 1$. $f(0) = 1$. Since $\lim_{x \to 0^-} f(x) = \lim_{x \to 0^+} f(x) = f(0) = 1$, $f(x)$ is continuous at $x=0$.
For differentiability at $x=0$, we need to check if the left-hand derivative (LHD) equals the right-hand derivative (RHD). LHD at $x=0$: $f'(0^-) = \frac{d}{dx}(1-2x) = -2$. RHD at $x=0$: $f'(0^+) = \frac{d}{dx}(1) = 0$. Since $f'(0^-) \ne f'(0^+)$, $f(x)$ is not differentiable at $x=0$.
For continuity at $x=1$, we need to check if $\lim_{x \to 1^-} f(x) = \lim_{x \to 1^+} f(x) = f(1)$. $\lim_{x \to 1^-} f(x) = \lim_{x \to 1^-} (1) = 1$. $\lim_{x \to 1^+} f(x) = \lim_{x \to 1^+} (2x-1) = 2(1) - 1 = 1$. $f(1) = 2(1) - 1 = 1$. Since $\lim_{x \to 1^-} f(x) = \lim_{x \to 1^+} f(x) = f(1) = 1$, $f(x)$ is continuous at $x=1$.
For differentiability at $x=1$, we need to check if the left-hand derivative (LHD) equals the right-hand derivative (RHD). LHD at $x=1$: $f'(1^-) = \frac{d}{dx}(1) = 0$. RHD at $x=1$: $f'(1^+) = \frac{d}{dx}(2x-1) = 2$. Since $f'(1^-) \ne f'(1^+)$, $f(x)$ is not differentiable at $x=1$.
$f(x)$ is continuous but not differentiable at both $x=0$ and $x=1$.
Final Answer: f(x) is continuous but not differentiable, at x=0 and x=1.
AI generated content. Review strictly for academic accuracy.