Consider the following functions from R to R, where R is the set of real numbers:
(A) \(f(x) = x^{2} + x\)
(B) \(f(x) = x|x|\)
(C) \(f(x) = x^{3} - x\)
(D) \(f(x) = 2x + |x|\)
Which of the above functions are both one-one and onto?
Choose the correct answer from the options given below:
Answer & explanation
Correct answer: option 2
The correct answer is Option (2) → (B) and (D) only
For \(x^{2} + x\) and \(x^{3} - x\), two different inputs give the same output:
\(x^{2} + x\): \(f(0) = 0\) and \(f(-1) = 1 - 1 = 0\)
\(x^{3} - x\): \(f(0) = 0\) and \(f(1) = 1 - 1 = 0\)
So neither of them is one-one.
Writing the other two without the modulus sign:
\(x|x| = x^{2}\) for \(x \ge 0\), and \(x|x| = -x^{2}\) for \(x \lt 0\)
\(2x + |x| = 3x\) for \(x \ge 0\), and \(2x + |x| = x\) for \(x \lt 0\)
In both, inputs \(x \ge 0\) give outputs \(\ge 0\), inputs \(x \lt 0\) give outputs \(\lt 0\), and each piece is increasing, so different inputs give different outputs.
Both are also onto. For any real y, a pre-image is
\(x|x|\): \(x = \sqrt{y}\) if \(y \ge 0\), and \(x = -\sqrt{-y}\) if \(y \lt 0\)
\(2x + |x|\): \(x = y/3\) if \(y \ge 0\), and \(x = y\) if \(y \lt 0\)
So \(x|x|\) and \(2x + |x|\) are one-one and onto, while \(x^{2} + x\) and \(x^{3} - x\) are not one-one.
Checking the statements
(A) \(f(x) = x^{2} + x\) — Incorrect. \(f(0) = f(-1) = 0\).
(B) \(f(x) = x|x|\) — Correct. \(x^{2}\) for \(x \ge 0\), \(-x^{2}\) for \(x \lt 0\): one-one and onto.
(C) \(f(x) = x^{3} - x\) — Incorrect. \(f(0) = f(1) = 0\).
(D) \(f(x) = 2x + |x|\) — Correct. \(3x\) for \(x \ge 0\), \(x\) for \(x \lt 0\): one-one and onto.