I'm very new to proving that a function is injective, surjective, bijective, invertible etc.

So I'm supposed to prove that the function below is not injective.

$$f(x) = \frac{(-1)^x (2x-1) +1}{4}$$

Where $f:\Bbb N\to\Bbb Z$.

Well, I tried to consider: $$f(a) = f(b)$$

Which gives:

$$\frac{(-1)^a (2a-1) +1}{4} = \frac{(-1)^b (2b-1) +1}{4}$$

Then

$$(-1)^a (2a-1) = (-1)^b (2b-1)$$

And using log base $-1$:

$$a(2a-1) = b(2b-1)$$

Annnd finally:

$$2a^2 -a = 2b^2 -b$$

I know that if $a=0$ and $b=1/2$ they both get $0$ as the answer, but $b= 1/2$ isn't a natural number so I can't use that right?

So I guess I'm stuck here. Is there a way to break it down further to show that $a\neq b$?

## Best Answer

First of all, $\log_{-1}$ is not a well defined operation. Thus your solving starts to go wrong there. Instead, note that the $(-1)^x$ terms have no effect on the magnitude of the values, so we get

$$|2a-1|=|2b-1|$$

Now if the $a\neq b$, then it must be the case that $2a-1\neq2b-1$. By the above relation, we get that

$$2a-1=-(2b-1)$$ $$\Rightarrow a+b=1$$

From here, it seems that the injectivity of $f$ depends on the domain--specifically how $\mathbb N$ is defined. If in your class $0\in\mathbb N$, then we have the solution $a=1,b=0$. If $0\not\in\mathbb N$, as is more common, then this equation has no solution, and $f$

isinjective.Since your question seems to tell you that $f$ is not injective, we will assume the former.

Let $a=1,b=0$. Then $a\neq b$. Note:

$$f(a)=f(1)=\frac{(-1)^1 (2(1)-1) +1}{4}=0$$

$$f(b)=f(0)=\frac{(-1)^0 (2(0)-1) +1}{4}=0$$