Solution:
We have
x2−y2=max(x,y)−min(x,y)=∣x−y∣
Now if x=y, we can divide by x−y to obtain x+y=±1. Thus x=y or x+y=±1.
If x=y, we see that 2019>x2+y2=2x2, so we see that −31≤x≤31. There are 63 ordered pairs in this case.
In the second case, note that ∣x∣≥∣y∣ since x2−y2=∣x−y∣≥0. Since x+y=±1, we cannot have xy>0, so either x≥0,y≤0, or x≤0,y≥0. In the first case, x+y=1; in the second case, x+y=−1. Thus, the solutions for (x,y) are of the form (k,1−k) or (−k,k−1) for some k>0. In either case, we must have k2+(k−1)2<2019, which holds true for any 1≤k≤32 but fails for k=33. There are a total of 32⋅2=64 solutions in this case.
In summary, there are a total of 63+64=127 integer solutions to the equation x2+min(x,y)=y2+max(x,y) with x2+y2<2019.