Step 1: Differentiating the function.
The function is \( f(x) = (x-1)^2(x+2) \). To find the critical points, we differentiate \( f(x) \):
\[
f'(x) = 2(x-1)(x+2) + (x-1)^2
\]
Simplifying:
\[
f'(x) = (x-1)[2(x+2) + (x-1)] = (x-1)(3x+3)
\]
Thus, \( f'(x) = (x-1)(3x+3) \).
Step 2: Solving for critical points.
Set \( f'(x) = 0 \):
\[
(x-1)(3x+3) = 0
\]
This gives two solutions:
\[
x-1 = 0 \quad \Rightarrow \quad x = 1
\]
\[
3x+3 = 0 \quad \Rightarrow \quad x = -1
\]
Step 3: Second derivative test.
To determine whether these points are maxima or minima, we compute the second derivative:
\[
f''(x) = 6(x+2) + 3(x-1) = 9x + 15
\]
Evaluating at \( x = 1 \):
\[
f''(1) = 9(1) + 15 = 24 \quad (\text{positive, so a local minimum})
\]
Evaluating at \( x = -1 \):
\[
f''(-1) = 9(-1) + 15 = 6 \quad (\text{positive, so a local maximum})
\]
Step 4: Conclusion.
Therefore, the local maximum occurs at \( x = -1 \) and the local minimum occurs at \( x = 1 \). The correct answer is (1) \( x = 1 \) and \( x = -1 \).