To determine whether the function \( f(x) \) is differentiable at the points \( x = 0 \) and \( x = 1 \), we first need to check its continuity at these points. The function is defined as follows:
\[
f(x) =
\begin{cases}
-x & \text{if } x < 0 \\
x^2 & \text{if } 0 \leq x \leq 1 \\
x^2 - x + 1 & \text{if } x > 1
\end{cases}
\]
### Step 1: Check continuity at \( x = 0 \)
To check continuity at \( x = 0 \), we need to evaluate the left-hand limit, right-hand limit, and the value of the function at \( x = 0 \).
1. **Left-hand limit**:
\[
\lim_{x \to 0^-} f(x) = \lim_{x \to 0^-} (-x) = 0
\]
2. **Right-hand limit**:
\[
\lim_{x \to 0^+} f(x) = \lim_{x \to 0^+} (x^2) = 0
\]
3. **Value at \( x = 0 \)**:
\[
f(0) = 0^2 = 0
\]
Since the left-hand limit, right-hand limit, and the value of the function at \( x = 0 \) are all equal, we conclude that \( f(x) \) is continuous at \( x = 0 \).
### Step 2: Check continuity at \( x = 1 \)
Now, we check the continuity at \( x = 1 \):
1. **Left-hand limit**:
\[
\lim_{x \to 1^-} f(x) = \lim_{x \to 1^-} (x^2) = 1
\]
2. **Right-hand limit**:
\[
\lim_{x \to 1^+} f(x) = \lim_{x \to 1^+} (x^2 - x + 1) = 1^2 - 1 + 1 = 1
\]
3. **Value at \( x = 1 \)**:
\[
f(1) = 1^2 = 1
\]
Again, since the left-hand limit, right-hand limit, and the value of the function at \( x = 1 \) are all equal, we conclude that \( f(x) \) is continuous at \( x = 1 \).
### Step 3: Check differentiability at \( x = 0 \)
To check differentiability at \( x = 0 \), we need to find the left-hand derivative and the right-hand derivative.
1. **Left-hand derivative**:
\[
f'(0^-) = \lim_{h \to 0^-} \frac{f(0 + h) - f(0)}{h} = \lim_{h \to 0^-} \frac{-h - 0}{h} = -1
\]
2. **Right-hand derivative**:
\[
f'(0^+) = \lim_{h \to 0^+} \frac{f(0 + h) - f(0)}{h} = \lim_{h \to 0^+} \frac{h^2 - 0}{h} = \lim_{h \to 0^+} h = 0
\]
Since \( f'(0^-) \neq f'(0^+) \) (i.e., \(-1 \neq 0\)), the function is not differentiable at \( x = 0 \).
### Step 4: Check differentiability at \( x = 1 \)
Now, we check differentiability at \( x = 1 \):
1. **Left-hand derivative**:
\[
f'(1^-) = \lim_{h \to 0^-} \frac{f(1 + h) - f(1)}{h} = \lim_{h \to 0^-} \frac{(1 + h)^2 - 1}{h} = \lim_{h \to 0^-} \frac{1 + 2h + h^2 - 1}{h} = \lim_{h \to 0^-} (2 + h) = 2
\]
2. **Right-hand derivative**:
\[
f'(1^+) = \lim_{h \to 0^+} \frac{f(1 + h) - f(1)}{h} = \lim_{h \to 0^+} \frac{(1 + h)^2 - (1 + h) + 1 - 1}{h} = \lim_{h \to 0^+} \frac{(1 + 2h + h^2 - 1 - h)}{h} = \lim_{h \to 0^+} (2 - 1) = 1
\]
Since \( f'(1^-) \neq f'(1^+) \) (i.e., \(2 \neq 1\)), the function is not differentiable at \( x = 1 \).
### Conclusion
The function \( f(x) \) is continuous at both \( x = 0 \) and \( x = 1 \), but it is not differentiable at either point.
### Final Answer
The function is not differentiable at both points \( x = 0 \) and \( x = 1 \).
---