Step 1: Understanding the function
We are given the function \( f(x) = \frac{|x-1|}{x^2} \), and we are asked to determine where the function is increasing or decreasing.
Step 2: Analyze the behavior of \( f(x) \) for different intervals
Since the function involves an absolute value, we need to consider the behavior of the function in different intervals. The absolute value expression will cause a change in the form of the function at \( x = 1 \). Therefore, we will analyze the function on three intervals: \( (-\infty, 0) \), \( (0, 1) \), and \( (1, \infty) \).
Step 3: Case 1: \( x > 1 \) (Absolute value simplifies)
For \( x > 1 \), we have \( |x - 1| = x - 1 \). Therefore, the function becomes:
\[
f(x) = \frac{x-1}{x^2}
\]
We now take the derivative to determine the nature of the function on this interval.
\[
f'(x) = \frac{d}{dx} \left( \frac{x-1}{x^2} \right)
\]
Using the quotient rule:
\[
f'(x) = \frac{(x^2)(1) - (x-1)(2x)}{x^4} = \frac{x^2 - 2x^2 + 2x}{x^4} = \frac{-x^2 + 2x}{x^4} = \frac{x(2 - x)}{x^4}
\]
Simplify:
\[
f'(x) = \frac{2 - x}{x^3}
\]
For \( x > 1 \), the numerator \( 2 - x \) is negative, and the denominator \( x^3 \) is positive. Hence, \( f'(x) \) is negative, meaning that \( f(x) \) is decreasing in the interval \( (1, \infty) \).
Step 4: Case 2: \( 0 < x < 1 \) (Absolute value simplifies differently)
For \( 0 < x < 1 \), we have \( |x - 1| = 1 - x \). Therefore, the function becomes:
\[
f(x) = \frac{1 - x}{x^2}
\]
Taking the derivative:
\[
f'(x) = \frac{d}{dx} \left( \frac{1 - x}{x^2} \right)
\]
Using the quotient rule:
\[
f'(x) = \frac{x^2(-1) - (1 - x)(2x)}{x^4} = \frac{-x^2 - 2x + 2x^2}{x^4} = \frac{x^2 - 2x}{x^4} = \frac{x(x - 2)}{x^4}
\]
Simplify:
\[
f'(x) = \frac{x - 2}{x^3}
\]
For \( 0 < x < 1 \), the numerator \( x - 2 \) is negative, and the denominator \( x^3 \) is positive. Hence, \( f'(x) \) is negative, meaning that \( f(x) \) is decreasing in the interval \( (0, 1) \).
Step 5: Case 3: \( x = 1 \) (Continuity at \( x = 1 \))
At \( x = 1 \), the function is continuous, but we do not need to analyze its behavior further since we are already considering intervals where \( x \neq 1 \).
Step 6: Conclusion
The function \( f(x) \) is decreasing in the intervals \( (0, 1) \) and \( (2, \infty) \). Therefore, the correct answer is:
Decreasing in \( (0, 1) \cup (2, \infty) \)