# [GAP Forum] cubic equations

Kasper Andersen kksa at math.ku.dk
Thu Feb 28 09:34:17 GMT 2008

Dear Forum,

Some time ago Muniru Asiru asked the following question:

> Dear Forum,
>
>
>> Please assist me in programming Gap to find x(rational
>> number) and y(integer number) so that
>> (y-1)x^3+yx^2+(y+1)x-y=0,  y<>1.
>>
>> The only solutions I got is (x,y)=(1/2,3).  Could
>> anyone help find others?

Nikos Apostolakis noted two more solutions, namely (1,0) and
(56/103,-418488). There are two other trivial solutions namely (0,0) and
(-1,0). I claim that these 5 are the only solutions:

As already noted by Nikos Apostolakis, the equation can be rewritten as

y = (x^3-x)/(x^3+x^2+x-1)

(note that 1 and -1 are not roots of x^3+x^2+x-1, so this polynomial does
not have any rational roots). Following Nikos, we write x=m/n for coprime
integers m and n and get

y = m*(m^2-n^2)/(m^3+m^2 n+m n^2-n^3)

Since y is an integer we must have

\pm m^3+m^2 n+m n^2-n^3 = GCD(m^3+m^2 n+m n^2-n^3, m*(m^2-n^2)),

where \pm denotes plus/minus. However m^3+m^2 n+m n^2-n^3 and m are
coprime since GCD(m,n)=1, so

GCD(m^3+m^2 n+m n^2-n^3, m*(m^2-n^2)) = GCD(m^3+m^2 n+m n^2-n^3, m^2-n^2)

Since (m^3+m^2 n+m n^2-n^3) - (n-m)*(m^2-n^2) = 2 m^3 we get

GCD(m^3+m^2 n+m n^2-n^3, m^2-n^2) = GCD(2 m^3, m^2-n^2)

Now m^3 and m^2-n^2 are coprime so

GCD(2 m^3, m^2-n^2) = GCD(2, m^2-n^2) = 1 or 2.

Combining the equations we finally get

(*) m^3+m^2 n+m n^2-n^3 = d

where d= \pm 1 or \pm 2. This is a socalled Thue equation. These have a
finite number of integer solutions which can be computed efficiently using
Bakers theory of linear forms in logarithms. For details, see the recent
book "Number Theory. Volume II: Analytic and Modern Tools" by Henri Cohen
(GTM 240), section 12.10 and the references there. The procedure has been
implemented in Magma, one finds that the solutions to (*) are

d=1: (m,n) = (-1,-2), (0,-1), (1,0) or (56,103)

d=2: (m,n) = (1,-1) or (1,1)

The solutions for d=-1 and d=-2 are (-m,-n) so we do not get any new
values of x in these cases. Hence

x = 1/2, 0, 56/103, -1 or 1.

Plugging these into the equation y=(x^3-x)/(x^3+x^2+x-1) now gives the 5
solutions above.

best wishes,

Kasper