# Solving system of polynomial equations over rationals

I have to solve lots of systems of polynomial equations like the one bellow. There are 6 polynomials in 6 variables $$a1, a2, b1, b2, b3, b4$$. All polynomials should be equal to $$0$$. I need only rational solutions. I tried to solve it in Mathematica by Solve then tried to compute Groebner Basis both in Mathematica and in SageMath but neither is able to compute it. I let them to run about a day without any output.

What are other methods that would be efficient to solve such problems?

{-272853213601 + 114339252960*a2 - 4841413740*a2^2 + 296664007680*b2 - 25123011840*a2*b2 -
32592015360*b2^2 - 4907531205*b3 + 6155208630*b3^2 - 3860046090*b3^3 + 1210353435*b3^4 -
151807041*b3^5 + 312814245280*b4 - 97612876080*a2*b4 + 1518070410*a2^2*b4 -
253265840640*b2*b4 + 7877554560*a2*b2*b4 + 10219530240*b2^2*b4 - 146051082720*b4^2 +
29048482440*a2*b4^2 + 75369035520*b2*b4^2 + 35852138640*b4^3 - 3036140820*a2*b4^3 -
7877554560*b2*b4^3 - 4841413740*b4^4 + 303614082*b4^5,
-121828703201 - 1128406464*a1 + 303614082*a1^2 + 24547177584*a2 - 303614082*a2^2 -
2927757312*b1 + 1575510912*a1*b1 + 2043906048*b1^2 + 123022775808*b2 - 6600113280*a2*b2 -
15080712192*b2^2 + 1480577211*b3 + 146055798*b3^2 - 1347744906*b3^3 + 816475707*b3^4 -
151807041*b3^5 + 171636450272*b4 - 32717479104*a2*b4 + 303614082*a2^2*b4 -
135541762560*b2*b4 + 3151021824*a2*b2*b4 + 6131718144*b2^2*b4 - 95005523376*b4^2 +
13441077468*a2*b4^2 + 49947954048*b2*b4^2 + 26959925088*b4^3 - 1821684492*a2*b4^3 -
6302043648*b2*b4^3 - 4176745074*b4^4 + 303614082*b4^5,
-157794053 - 2365632*a1 - 20339456*a2 + 2907756*a2^2 - 10533888*b1 + 2365632*a1*b1 +
6137856*b1^2 + 131946240*b2 + 5178816*a2*b2 - 15925248*b2^2 + 219303*b3 - 2925810*b3^2 +
428238*b3^3 + 1269063*b3^4 - 455877*b3^5 + 273722192*b4 + 5853992*a2*b4 -
911754*a2^2*b4 - 188327424*b2*b4 + 9206784*b2^2*b4 - 178267752*b4^2 + 5470524*a2*b4^2 +
89190720*b2*b4^2 + 58666164*b4^3 - 1823508*a2*b4^3 - 14193792*b2*b4^3 - 10546776*b4^4 +
911754*b4^5, 1838593 + 3492*a1 + 24642*a1^2 + 946868*a2 - 24642*a2^2 + 293760*b1 +
63936*a1*b1 - 82944*b1^2 - 1109376*b2 - 267840*a2*b2 + 82944*b2^2 + 54693*b3 -
11574*b3^2 - 49590*b3^3 - 2331*b3^4 + 12321*b3^5 - 3856016*b4 - 1229144*a2*b4 +
24642*a2^2*b4 + 1900800*b2*b4 + 127872*a2*b2*b4 - 82944*b2^2*b4 + 2909904*b4^2 +
471528*a2*b4^2 - 1187136*b2*b4^2 - 1102172*b4^3 - 49284*a2*b4^3 + 255744*b2*b4^3 +
231102*b4^4 - 24642*b4^5, 1829 - 384*a1 + 2272*a2 + 236*a2^2 + 768*b1 + 384*a1*b1 -
768*b2 - 384*a2*b2 - 199*b3 - 206*b3^2 - 14*b3^3 + 89*b3^4 + 37*b3^5 - 5904*b4 -
3808*a2*b4 - 74*a2^2*b4 + 1536*b2*b4 + 384*a2*b2*b4 + 5168*b4^2 + 2304*a2*b4^2 -
1152*b2*b4^2 - 2216*b4^3 - 444*a2*b4^3 + 384*b2*b4^3 + 532*b4^4 - 74*b4^5,
-1 + 40*a1 + 10*a1^2 - 40*a2 - 10*a2^2 - 5*b3 - 10*b3^2 - 10*b3^3 - 5*b3^4 - b3^5 +
80*b4 + 80*a2*b4 + 10*a2^2*b4 - 80*b4^2 - 60*a2*b4^2 + 40*b4^3 + 20*a2*b4^3 - 10*b4^4 +
2*b4^5}

• Can you explain the background. Why do you only want rational solutions? Is there some physics or engineering behind this? Commented Dec 2, 2019 at 9:04
• It is a pure mathematical problem of solving some Diophantine equations. There are lots of possibilities to check whether some underdetermined equation has rational solution. Each possibility yields to a system of equations (sometimes overdetermined). Then most of them have no rational solution and few of them have one or two rational solutions. Commented Dec 2, 2019 at 9:26

## 1 Answer

By Resultant and Factor:

$$a1 = -1008/1369, a2 = -11792/12321,b1 = 1, b2 = 1, b3 = 59/37, b4 = 118/37$$

• Can you explain in more detail, how you computed it? Which resultant you computed and with respect to what variable? And also is it the only solution? Or you just gave the first you found? Commented Dec 2, 2019 at 12:28
• First step: Resultant[{eq_1,eq_2,eq_3,eq_4,eq_5},eq_6,a1]//Factor we get system {new_eq_1,new_eq_2,new_eq_3,new_eq_4,new_eq_5} without variable a1. Second step: Resultant[{new_eq_1,new_eq_2,new_eq_3,new_eq_4},new_eq_5,a2]//Factor we get factor (-118 + 37 b4). And etc. Commented Dec 2, 2019 at 12:51
• How long did it take for you? For me the first step was computed in a second and now I am at second step and it is still running without any output. Commented Dec 2, 2019 at 13:18
• Try Resultant[{new_eq_2,new_eq_3,new_eq_4,new_eq_5},new_eq_1,a2]//Factor. Second parametr of Resultant need try minimal polynomial from system. All integer factors need deleted, and also deleted power of polynomial. Commented Dec 2, 2019 at 13:42