How to prove $2x^2 + x + 1$ is injective on the domain and codomain of all integers I need to determine if $2^2++1$ is injective over the domain and codomain of all integers, and if so show a proof of it. Based on what I can tell graphically I have assumed that the claim is true and now need help to prove it.
So I know that to prove a function is injective we assume that:
$∀, ∈ ℤ, ()=() → =$
And this is what I've done thus far:
$2^2++1=2^2++1$
subtracting 1 and factoring:
$(2+1)=(2+1)$
I know I want to show that $=$ and to do that here it seems I need to show the other factors are equivalent so that they vanish and I'm left with just $=$ but I can't seem to figure out how to do that. I've graphed the equation as well and it appears to be injective on integers as far as I can (and have the patience) to manually test but that doesn't really help me write the proof, just that I know I need to end up with $=$ at the end and not a contradiction.
Any help would be greatly appreciated.
 A: If
$$
2x^2+x+1=2y^2+y+1, \tag{1}
$$
then
$$
2(x^2-y^2)+x-y=(x-y)(2x+2y+1)=0, \tag{2}
$$
which implies $x-y=0$ or $2x+2y+1=0$. Since the latter equation has no integer solution, we are forced to conclude that $x=y$.
A: Ricardo Cavalcanti has given a nice and very slick algebraic proof, but here is another and perhaps more intuitive way to see what's going on:
If we forget about "on the integers" for a moment, the function $f(x)=2x^2+x+1$ is a parabola with its apex at $(x,y)=(-\frac14,\frac78)$. This means that its graph is mirror symmetric about the line $x=-\frac14$. So,
$$ f(-1) = f(\tfrac12) \\
f(-2) = f(1\tfrac12) \\
f(-3) = f(2\tfrac12) \\
f(-4) = f(3\tfrac12) $$
and so forth.
Now $f$ is injective on the integers iff the function values
$$ \ldots f(-3), f(-2), f(-1), f(0), f(1), f(2), f(3), \ldots $$
are all different. Because of the symmetry, this is the same as asking whether the points
$$ f(0), f(\tfrac12), f(1), f(1\tfrac12), f(2), f(2\tfrac12), f(3), f(3\tfrac12), \ldots $$
are all different. But these points are all on the part of the parabola that is strictly increasing -- so the function values must be different.
