# Is this piecewise function bijective

$f\colon R \rightarrow R$

$f(x) = \begin{cases}x^3+1\text{ if} \ x \leq 0\\ \frac{1}{x^2}\ +1 \text{ if}\ x>0 \end{cases}$

Is $f$ a bijection?

Injective:
I graphed the piecewise function

It satisfies the horizontal line test so it is injective

Surjective

$\lim{x\to-\infty} \ f(x) = - \infty$

but because $\lim{x\to+\infty} \ f(x) = 1$ it is not surjective so the function is not bijective.

Is this correct?

• No, it is not correct. Your argument does not work, because $f$ is not continuous. Note that $\lim_{x \to 0^+} f(x)= + \infty$. – Crostul Apr 18 '18 at 18:32

I would look at the image of each piece (for its respective domain) Show that each piece is one to one and onto its respective image.

The two images are disjoint. And the union of the two make the real numbers.

$x^3 + 1$ is one-to-one and onto mapping from $(-\infty,0] \to (-\infty, 1]$

and

$\frac {1}x^2 + 1$ is one to one and onto from $(0,\infty) \to (1,\infty)$

and $\mathbb R = (-\infty, 1]\cup (1,\infty)$

You last suggestion would be valid for $\mathbb{R}\cup\{\pm\infty\}$ (extended reals) as domain. Now there is only one value where 1 is obtained, so it IS bijective.

I would rather suggest observing that $x^3+1$ and $\frac1{x^2}+1$ are strictly monotonic on their subdomains and their ranges are disjoint but their sum is the whole $\mathbb{R}$.

To show that $f$ is surjective: Let $y\in\mathbb{R}$. Try finding an $x\in\mathbb{R}$ such that $f(x)=y$. Hint: Consider the cases $y\le 1$ and $y>1$.

I also suggest you try showing injectivity properly. Start by choosing $x_1,x_2\in\mathbb{R}$ such that $f(x_1)=f(x_2)$. Now consider the two cases $x_1,x_2\le 0$ and $x_1,x_2>0$ and justify why $x_1\le0, x_2>0$ can not occur. For each case it is very easy to check that $f(x_1)=f(x_2)$ implies $x_1=x_2$, which by definition shows that $f$ is injective.

• Do I only need to find one x for each case to show that it is surjective? for example f(2) = 1.25 and f(-1.5) = -2.375 – Wamadahama Apr 18 '18 at 18:49
• Yes! Let me show you the case $y\le 1$ and you can try the other one. So since you know the graph of $f$, you know that you should start by assuming $y=x^3+1$. We want to know how to chose $x$ depending on $y$. It is easy to see that $x=\sqrt[3]{y-1}$. Since $y\le 1$ this $x$ is smaller than 0 which is perfect for what we need. To sum it up: For each $y\le 1$ there is an $x\in\mathbb{R}$ s.t. $f(x)=y$ namely $x=\sqrt[3]{y-1}$. – Vorhang Apr 18 '18 at 18:56

because $\lim{x\to+\infty} \ f(x) = 1$ it is not surjective ...

?? That doesn't follow. Just by pointing out what a function does in the limit does not imply that there are certain values the function does not take on.

Did you maybe mean to say that there is no $x$ for which $f(x)=1$? But that is clearly false, since we have $f(0)=1$

Maybe you were thinking this: "any function from $R$ to $R$ that we already know to be injective needs to either go from $-\infty$ to $\infty$, or from $\infty$ to $-\infty$ in order to be surjective" Well, that is true for functions that are injective and continuous .. but that is not the case here either.