Answer
Because \(g\) is both **onto** \((0,1)\) and **one‐to‐one**, it is a **bijection** from \(\mathbb{R}\) onto \((0,1)\). Therefore:
The open interval (0,1) and the entire real line $\mathbb{R}$ have the same cardinality.
This is one more demonstration that infinite sets can “look smaller” (like an interval) yet still match the cardinality of the entire real line.
Work Step by Step
Below is a common way to see that the function
\[
g(x) \;=\; \tfrac12 \,\bigl[\tfrac{x}{\,1 + |x|\,}\bigr] \;+\; \tfrac12
\quad\text{for all real }x
\]
is a **bijection** from \(\mathbb{R}\) onto \((0,1)\). From this bijection, one concludes that \(\mathbb{R}\) and \((0,1)\) (denoted \(S\)) have the same cardinality.
---
## 1. Range of \(g\)
First, observe the inner fraction
\[
h(x) \;=\; \frac{x}{\,1 + |x|\,}.
\]
- For \(x > 0\), \(h(x) = \tfrac{x}{1+x}\) which lies strictly between 0 and 1.
- For \(x < 0\), \(h(x) = \tfrac{x}{1 - x}\) (since \(|x|=-x\)), which lies strictly between \(-1\) and 0.
- As \(x \to +\infty\), \(h(x) \to 1\) (from below), and as \(x \to -\infty\), \(h(x) \to -1\) (from above).
Hence \(h(x)\) takes **all values in \((-1,1)\)** as \(x\) runs over \(\mathbb{R}\).
Multiplying by \(\tfrac12\) puts that range into \(\bigl(-\tfrac12,\tfrac12\bigr)\). Finally, adding \(\tfrac12\) shifts the entire interval to \((0,1)\). So for **every real** \(x\), \(g(x)\) lies in \((0,1)\). In fact, as \(x\) spans \(\mathbb{R}\), \(g(x)\) covers **all** of \((0,1)\).
---
## 2. Surjectivity (Onto)
To see surjectivity more explicitly, let \(y \in (0,1)\). We want to solve \(g(x)=y\) for \(x\). Rewrite:
\[
g(x) \;=\; \tfrac12 \bigl[\tfrac{x}{\,1+|x|\,}\bigr] + \tfrac12
\;=\; y
\;\;\Longrightarrow\;\;
\frac{x}{\,1 + |x|\,}
\;=\;
2y \;-\; 1.
\]
Call \(z = 2y - 1\). Notice \(z \in (-1,1)\) because \(y \in (0,1)\). We must solve
\[
\frac{x}{1 + |x|} \;=\; z.
\]
- If \(z \ge 0\), we expect \(x \ge 0\). Then \(|x|=x\), so \(\tfrac{x}{1+x} = z\). This rearranges to \(x = \tfrac{z}{\,1 - z\,}\) (valid if \(z<1\)).
- If \(z < 0\), we expect \(x < 0\). Then \(|x|=-x\), so \(\tfrac{x}{1-x} = z\). This gives \(x = \tfrac{z}{\,1+z\,}\) (valid if \(z>-1\)).
In each case, we get a unique real \(x\) that satisfies \(g(x)=y\). Hence **every** \(y \in (0,1)\) has some real \(x\) mapping to it.
---
## 3. Injectivity (One‐to‐One)
Suppose \(g(x_1) = g(x_2)\). Then
\[
\tfrac12\Bigl[\tfrac{x_1}{1+|x_1|}\Bigr] + \tfrac12
\;=\;
\tfrac12\Bigl[\tfrac{x_2}{1+|x_2|}\Bigr] + \tfrac12
\;\Longrightarrow\;
\frac{x_1}{1+|x_1|} \;=\; \frac{x_2}{1+|x_2|}.
\]
Define \(h(x) = \tfrac{x}{1+|x|}\). One checks (by separate cases \(x>0\) vs. \(x<0\)) that \(h\) is strictly increasing on each side of 0 and never overlaps values from negative \(x\) to positive \(x\). Thus \(h(x_1)=h(x_2)\) forces \(x_1=x_2\). Therefore, \(g\) is injective.