It is easy to show, with an explicit construction, that a *homogeneous* cubic function $f: mathbb{Z}^2 to mathbb{Z}$ is not injective. I am seeking a proof of the same result without the condition that $f$ is homogeneous.

For homogeneous $f$, if we take a generic point $(x_0,y_0) in mathbb{Z}^2$, the tangent to the curve:

$$f(x,y)-f(x_0,y_0)=0$$

will intersect the curve at a second point, $(x_1, y_1)$, with rational coordinates. To see this, note that we can parameterise the tangent line as:

$$L(lambda) = (x_0,y_0) + lambdaspace (partial_y f(x,y), -partial_x f(x,y))|_{x=x_0,y=y_0}$$

Then the cubic in $lambda$:

$$F(lambda) = f(L(lambda)) – f(x_0,y_0)$$

will have rational coefficients and a double root at $lambda=0$, so its third root $lambda_3$ must be real and rational. So:

$$(x_1,y_1) = L(lambda_3)$$

will have rational coordinates. If we choose any integer $D$ such that:

$$(x_2,y_2) = D space (x_1,y_1) in mathbb{Z}^2$$

we can exploit the homogeneity of $f$ to obtain:

$$(x_3,y_3) = Dspace (x_0,y_0)$$

$$f(x_3,y_3) = D^3 f(x_0,y_0) = D^3 f(x_1,y1) = f(x_2,y_2)$$

My question is: when $f$ is **not** homogeneous, can we construct explicit pairs of distinct points in $mathbb{Z}^2$ that demonstrate $f$ is not injective?