# Number of nontrivial integral solutions to $f(x)=f(y)$

Let $f(x)\in\mathbb Z[x]$ be a nonconstant polynomial, and let $$g(x,y)=\frac{f(x)-f(y)}{x-y}\in\mathbb Z[x,y].$$ Let $N(B)$ denote the number of pairs of integers $(x_0,y_0)$ such that $1\le x_0,y_0\le B$ and $g(x_0,y_0)=0$. Is it possible to obtain explicit asymptotics for $N(B)$ as $B\to\infty$?

• Outside some interval, $f$ is injective, so you will only get $O(1)$ solutions with $x\neq y$. For $x=y$, we have $g(x,x)=f'(x)$, which also has $O(1)$ roots. Hence $N(B)=O(1)$. Jun 25, 2018 at 15:22
• @PeterMueller We are looking at $x_0,y_0\geq 1$. Jun 25, 2018 at 15:56
• @Wojowu It's probably not hard, but you have to rule out the case that there is a factorization $f(x)-f(y)=(x-y)^2h(x)$, since if there is such a factorization, then the OP's $g(x,y)$ vanishes identically along $y=x$. Jun 25, 2018 at 16:15
• @JoeSilverman As I have already mentioned, $g(x,x)=f'(x)$ (e.g. by taking the limit $y\to x$). Doesn't that already show that $g$ doesn't vanish along the diagonal? Jun 25, 2018 at 16:22
• @Wojowu Good point. I withdraw my objection. A much more interesting question concerns the asymptotics of the number of solutions in rational numbers (ordered by height, for example), since that will depend on whether $g(x,y)$ has factors that define curves of genus 0 and/or 1. There's a large literature on factorization of $g(x,y)$, especially over $\mathbb F_q[x,y]$, but also in characteristic 0. Jun 25, 2018 at 18:13