We are given a function f:R→R defined by f(x)=∣x∣+1∣x∣−1. We need to determine if this function is one-one (injective), onto (surjective), both, or neither. A function is one-one if different inputs always give different outputs, meaning if f(a)=f(b), then a=b. A function is onto if every element in the codomain is mapped to by some element in the domain, meaning for every real number y, there exists some x such that f(x)=y. The codomain here is all real numbers, R.
First, we check if the function is one-one. Notice that the expression depends on ∣x∣, which is always non-negative. For any x, ∣x∣=∣−x∣, so let us compute f(−x):
f(−x)=∣−x∣+1∣−x∣−1=∣x∣+1∣x∣−1=f(x).
This shows that f(−x)=f(x) for all x. Therefore, for any x=0, we have f(x)=f(−x), but x and −x are different if x=0. For example, let x=1:
f(1)=∣1∣+1∣1∣−1=1+11−1=20=0.
Now, f(−1)=∣−1∣+1∣−1∣−1=1+11−1=20=0. So f(1)=f(−1)=0, but 1=−1. Since two different inputs (1 and −1) give the same output (0), the function is not one-one.
Next, we check if the function is onto. To be onto, for every real number y, there must be some x such that f(x)=y. Since f(x) depends only on ∣x∣, we set t=∣x∣≥0. Then the function becomes:
g(t)=t+1t−1,t≥0.
We need to find the range of g(t) as t varies from 0 to infinity. This range will be the same as the range of f(x), because for each t≥0, there is at least one x (for example, x=t or x=−t) such that ∣x∣=t.
Evaluate g(t) at key points:
- When t=0: g(0)=0+10−1=1−1=−1.
- When t=1: g(1)=1+11−1=20=0.
- As t→∞: g(t)=t+1t−1=1+t11−t1→1+01−0=1.
Now, check if g(t) can equal 1: set t+1t−1=1. Then t−1=t+1, which simplifies to −1=1, a contradiction. So g(t)=1 for any t≥0.
To see how g(t) behaves, compute its derivative. Let g(t)=t+1t−1. Using the quotient rule:
g′(t)=(t+1)2(1)(t+1)−(t−1)(1)=(t+1)2t+1−(t−1)=(t+1)2t+1−t+1=(t+1)22.
Since (t+1)2>0 for all t≥0, we have g′(t)>0, so g(t) is strictly increasing for t≥0.
As t increases from 0 to infinity, g(t) increases continuously from g(0)=−1 to the limit 1 (but never reaches 1). Therefore, the range of g(t) is all real numbers from -1 inclusive to 1 exclusive, denoted as [−1,1).
Since f(x) has the same range [−1,1), we can see that:
- y=−1 is achieved when x=0 (since f(0)=∣0∣+1∣0∣−1=1−1=−1).
- Values between -1 and 1 are achieved; for example, for y=0.5, solve t+1t−1=0.5:
t−1=0.5(t+1)⟹t−1=0.5t+0.5⟹t−0.5t=0.5+1⟹0.5t=1.5⟹t=3.
So ∣x∣=3, meaning x=3 or x=−3, and f(3)=∣3∣+1∣3∣−1=3+13−1=42=0.5.
- But y=1 is not achieved, as shown earlier.
Now, consider values outside [−1,1). For example, y=2:
Set f(x)=2: ∣x∣+1∣x∣−1=2⟹∣x∣−1=2(∣x∣+1)⟹∣x∣−1=2∣x∣+2⟹−1−2=2∣x∣−∣x∣⟹−3=∣x∣. But ∣x∣≥0, so ∣x∣=−3 is impossible. Similarly, for y=−2: ∣x∣+1∣x∣−1=−2⟹∣x∣−1=−2(∣x∣+1)⟹∣x∣−1=−2∣x∣−2⟹∣x∣+2∣x∣=−2+1⟹3∣x∣=−1, again impossible.
Thus, the range of f is [−1,1), which is a proper subset of the codomain R. For instance, y=1 and y=2 are in R but not in the range. Therefore, f is not onto.
Since f is not one-one and not onto, it is neither injective nor surjective.
Hence, the correct answer is Option B.