prove that $f(x)=\frac{1+|4x+1|}{2}$ is injective or not, thanks. I can think of counterexamples of it being not injective, but only with non-integers, but $x,y$ must be integers.
Suppose that f(x)=f(y), then prove that x=y
prove that $f(x)=\frac{1+|4x+1|}{2}$ is injective or not, thanks. I can think of counterexamples of it being not injective, but only with non-integers, but $x,y$ must be integers.
Suppose that f(x)=f(y), then prove that x=y
On
If $x\ge 0$ then $f(x)=2x+1$ is odd; if $x<0$ then $f(x)=-2x$ is even. Hence conflicts with injectivity can occur only between two nonnegative $x$ or between two negative $x$. But both $x\mapsto 2x+1$ and $x\mapsto -2x$ are injective.
More explicitly: Suppose $f(x_1)=f(x_2)$.
We conclude that $x_1=x_2$.
Let $$f(x) = \frac{1 + |4x + 1|}{2}$$ be defined on the domain $\mathbb{Z}$.
If $f(x) = f(y)$, then \begin{align*} \frac{1 + |4x + 1|}{2} & = \frac{1 + |4y + 1|}{2}\\ 1 + |4x + 1| & = 1 + |4y + 1|\\ |4x + 1| & = |4y + 1|\\ (4x + 1)^2 & = (4y + 1)^2\\ (4x + 1)^2 - (4y + 1)^2 & = 0\\ [(4x + 1) + (4y - 1)][(4x + 1) - (4y + 1)] & = 0\\ (4x + 4y + 2)(4x - 4y) = 0 \end{align*} Setting each factor equal to zero yields \begin{align*} 4x + 4y + 2 & = 0 & 4x - 4y & = 0\\ 4x + 4y & = -2 & 4x & = 4y\\ x + y & = -\frac{1}{2} & x & = y \end{align*} The equation $x + y = -1/2$ has no solutions in the integers. Hence, $x = y$. Thus, $f$ is injective over the domain $\mathbb{Z}$.