To analyze the function \( f: (0, \infty) \to [0, \infty) \) defined by \( f(x) = |1 - \frac{1}{x}| \), we will determine whether it is injective or surjective.
### Step 1: Define the function based on intervals
The function can be expressed as:
- For \( x < 1 \): \( f(x) = |1 - \frac{1}{x}| = \frac{1}{x} - 1 \) (since \( \frac{1}{x} > 1 \))
- For \( x \geq 1 \): \( f(x) = |1 - \frac{1}{x}| = 1 - \frac{1}{x} \) (since \( \frac{1}{x} \leq 1 \))
### Step 2: Analyze the function in the intervals
1. **For \( x < 1 \)**:
- The function is \( f(x) = \frac{1}{x} - 1 \).
- As \( x \) approaches 0 from the right, \( f(x) \) approaches \( \infty \).
- At \( x = 1 \), \( f(1) = 0 \).
- Thus, in this interval, \( f(x) \) decreases from \( \infty \) to \( 0 \).
2. **For \( x \geq 1 \)**:
- The function is \( f(x) = 1 - \frac{1}{x} \).
- At \( x = 1 \), \( f(1) = 0 \).
- As \( x \) approaches \( \infty \), \( f(x) \) approaches \( 1 \).
- Thus, in this interval, \( f(x) \) increases from \( 0 \) to \( 1 \).
### Step 3: Check for injectivity
To check if \( f(x) \) is injective, we need to see if it is one-to-one:
- In the interval \( (0, 1) \), \( f(x) \) is strictly decreasing.
- In the interval \( [1, \infty) \), \( f(x) \) is strictly increasing.
- However, since both intervals meet at \( f(1) = 0 \) and \( f(x) \) takes the same value (0) at \( x = 1 \) and \( x \to 0 \), the function is not injective.
### Step 4: Check for surjectivity
To check if \( f(x) \) is surjective, we need to see if the range of \( f(x) \) covers the entire codomain \([0, \infty)\):
- As \( x \) approaches \( 0 \), \( f(x) \) approaches \( \infty \).
- As \( x \) approaches \( 1 \), \( f(x) \) reaches \( 0 \).
- As \( x \) approaches \( \infty \), \( f(x) \) approaches \( 1 \).
Thus, the range of \( f(x) \) is \([0, \infty)\), which matches the codomain. Therefore, the function is surjective.
### Conclusion
The function \( f(x) \) is **not injective** but is **surjective**.