(x+y^2)*(x^2+y)=(x-y)^3
x^3 + xy + (xy)^2 + y^3 = x^3 - 3 x^2 y + 3 x y^2 - y^3
xy + (xy)^2 + y^3 = - 3 x^2 y + 3 x y^2 - y^3
Asking Wolfram Alpha to solve this gives:
If y = -3, x = -9/5
If y <> -3:
x = -(-3 y + sqrt(-(y + 1)^2 (8 y - 1)) + 1)/(2 y + 6)
or
x = (3 y + sqrt(-(y + 1)^2 (8 y - 1)) - 1)/(2 (y + 3))
A map of the continuous curve is at:
but of course we want integers.
So then
For y = -100000 To 100000
If y <> -3 Then
If (-(y + 1) ^ 2 * (8 * y - 1)) >= 0 Then
x = -(-3 * y + Sqr(-(y + 1) ^ 2 * (8 * y - 1)) + 1) / (2 * y + 6)
xr = Int(x + 0.5)
If Abs(x - xr) < 0.00000001 Then Text1.Text = Text1.Text & y & " " & x & crlf
x = (3 * y + Sqr(-(y + 1) ^ 2 * (8 * y - 1)) - 1) / (2 * (y + 3))
xr = Int(x + 0.5)
If Abs(x - xr) < 0.00000001 Then Text1.Text = Text1.Text & y & " " & x & crlf
End If
End If
DoEvents
Next
finds
y x
-21 9
-10 8
-6 9
-1 -1
-1 -1
0 0
Of course we don't count the last set, as the puzzle specifically excludes zeros. (-1,-1) appears to be a double solution.
|
Posted by Charlie
on 2018-06-20 13:22:51 |