12. Let (x,y) be the integer solution of the equation, then when x=0, y2(y+2)=0, we get y= 0 or -2. When y=0, x6=0, we get x=0. It is known that when x,y have one equal to zero, the solutions are (x,y)=(0,0) or (0,−2).
Below, we discuss the case where xy=0. For any prime factor p of y, let pm∥y, then p∣x6, hence p∣x. Suppose pn∥x, there are two possibilities.
(1) p is an odd prime, then p2m∥(y3+2y2). And x6+x3y=x3(x3+y). If 3n≤m, then we get 3n+m=2m, which implies m=3n. Therefore, we always have m=3n.
(2) p=2, if m⩾2, then 22m+1∥(y3+2y2), similarly to (1) we get m=3n or 3n−1.
Using the conclusions from (1) and (2), we can set (x,y)=(ab,2b3),(ab,b3) or (ab,2b3), where a,b∈Z. Substituting into the original equation, we get
1∘a6+a3=b3+2,
2∘a6+2a3=8b3+8,
3∘8a6+4a3=b3+4.
For equation 1∘, if a>1, then
(a2+1)3>b3=a6+a3−2>(a2)3,
no solution. If ab3>(a2−1)3,
also no solution. Hence a=0,x=0 or a=1,b=0,y=0, both contradict xy=0.
For equation 2∘, if a>0, then
(a2+1)3>(2b)3=a6+2a3−8>(a2)3,
no solution. If a(2b)3>(a2−1)3,
also no solution. For a=−2,−1,0, all lead to xy=0.
For equation 3∘, if a>1, then
(2a2+1)3>b3=8a6+4a3−4>(2a2)3.
If ab3>(2a2−1)3
Hence, only a∈{−1,0,1}. Only when a=1,b=2, there is a solution (x,y)=(2,4) such that xy=0.
In summary, the integer solutions of the equation are (x,y)=(0,0),(0,−2) or (2,4).