Proof that a piecewise function is invertible.

1k Views Asked by At

Prove that the following function is invertible: $$g:\mathbb{Z}\rightarrow\mathbb{N}$$

$$ g(x) = \left\{ \begin{array}{lr} -2x & : x\le0\\ 2x-1 & : x>0 \end{array} \right. $$

I'm having an issue proving that it is one-to-one in all cases. The cases where $x_{1},x_{2}\le0$ and $x_{1},x_{2}>0$ both pass proof by contrapostitive where $g(x_{1})=g(x_{2})$. I'm having a problem proving it is also one-to one if $x_{1}\le0$ but $x_{2}>0$ which would result in:

$$ -2x_{1}=2x_{2}-1 $$ $$ x_{1}=-x_{2}+\frac{1}{2} $$

I know I'm going something wrong in my thinking and I have a sneaking suspicion it has something to do with the fact that I'm mapping to $\mathbb{N}$, but I'm completely unsure of where to go from here.

1

There are 1 best solutions below

2
On BEST ANSWER

$-2x$ will always give you a nonnegative, even integer, when $x \leq 0$. And, $-2x$ is strictly decreasing. $2x - 1$ will always give a positive, odd integer, when $x > 0$. And, $2x - 1$ is strictly increasing. That's all you need.