<s>[INST] Solve in integers $ (y^3+xy-1)(x^2+x-y)=(x^3-xy+1)(y^2+x-y)$ Solve in integers: $$ (y^3+xy-1)(x^2+x-y)=(x^3-xy+1)(y^2+x-y)$$   
My idea:
$$\Longleftrightarrow  (y^3+xy-1)(x^2+x-y)-(x^3-xy+1)(y^2+x-y)=0$$
$$\Longleftrightarrow  -x^4-x^3y^2+2x^3y+x^2y^3+2x^2y-x^2+2xy^3-2xy^2-2x-y^4-y^2+2y=0$$
$$\Longleftrightarrow  2xy(x^2+y^2)+2y(x^2+1)+x^2y^3+2y=x^4+y^4+x^3y^2+x^2+y^2+2x$$
following I can't work.
 [/INST] We first note that if $(x,y)$ is a solution then so is $(-y,-x)$.Consider the term 
$$
\frac{x^3-xy+1}{x^2+x-y}
$$
This can be expanded as 
$$
x-1+\frac{x+1-y}{x^2+x-y}
$$
For the latter term to be integral implies that $x^2+x-y <= x+1-y$ which implies that $|x|<=1$. This gives us 3 possible values for $x$ namely $0,\pm1$. 
Case 1. $x=0$ . 
        The original equation becomes $$(y^3−1)(−y)=(+1)(y^2−y)$$ So $y=0$ is a solution. Reducing the equation further gives us $$ y^3-1=-(y-1)$$ So $y=1$ is also a solution. This can be reduced further to $$y^2+y+1=-1 \Rightarrow y^2+y+2=0$$ This does not have an real integral solutions so we can ignore. 
Case 2. $x=1$ The original equation reduces to $$(y^3+y-1)(2-y)=(2-y)(y^2+1-y)$$
So $y=2$ is a solution. Reducing further gives us $$y^3-y^2+2y-2=0\Rightarrow(y^2+1)(y-2)=0$$ No other new solution can be got from this
Case 3. $x=-1$ The original equation reduces to $$(y^3-y-1)(-y)=(y)(y^2-1-y)$$
So $y=0$ is a solution. Reducing further gives us $$y^3+y^2-2y-2=0\Rightarrow(y^2-2)(y+1)=0$$ So $y=-1$ is a solution
Combining the solutions from above 3 cases we get


*

*$(0,0)$

*$(0,1)$

*$(1,2)$

*$(-1,-1)$


Using the original observation that $(x,y)\implies(-y,-x)$ is a solution too we obtain the following solutions for this 


*

*$(0,0)$

*$(0,1)$, $(-1,0)$

*$(1,2)$, $(-2,-1)$

*$(-1,-1)$, $(1,1)$


Now consider $(x,y)$ such that $x^2+x-y=0$. Solving the quadratic and substituting for discriminant we can show that $(k,k(k+1))$ and $(-(k+1),k(k+1))$ satisfies this for all values of $k$. We then see if any of the terms in RHS also vanish for the same $(x,y)$ for some $k$ that might give us additional solutions. 
case 1. $(k,k(k+1))$.   The RHS term becomes 
$$(k^3-k^2(k+1)+1)(k^2(k+1)^2+k-k(k+1)) \to (-k^2+1)k(k^3+k^2+1). 
$$
which vanishes for $k=0,\pm1$. We can verify that these values of $k$ give known existing solutions above
case 2.  $(-(k+1),k(k+1))$.   The RHS term becomes
$$(-(k+1)^3+k(k+1)^2+1)(k^2(k+1)^2-(k+1)-k(k+1)) \to -(k^2+2k)(k+1)(k^3+k^2-k-1) \to -k(k+2)(k+1)^2(k^2-1). 
$$
which vanishes for $k=0,\pm1,-2$. We can verify that these values of $k$ give known existing solutions above including a new solution for $k=1$ i.e $(-2,2)$
Hence entire solution set can be give by 


*

*$(0,0)$

*$(0,1)$, $(-1,0)$

*$(1,2)$, $(-2,-1)$

*$(-1,-1)$, $(1,1)$

*$(-2,2)$


Some notes: 


*

*This is not as rigorous as I'd like it to be. For example $x^2+x-y$ needn't divide $x^3-xy+1$ it should divide the product $(x^3-xy+1)(y^2+x-y)$

*It is curious that all obtained solutions involve atleast one term on each side vanishing. Is it possible that for certain values of $(x,y)$ none of the terms vanish but LHS = RHS ? Certainly @chubakueno tests show that this is not the case

*Where did you obtain this equation from ? The equation is non-homogenous and hence cannot be factored into quadratic and cubic forms. 

</s>