Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Solving a system of 18 polynomial equations in sagemath

Solving a system of 18 polynomial equations in sagemath

I'm trying to solve a system of 18 polynomial equations in sage. The system is for sure solvable since I already solved it in Maple and got ALL the possible solutions (only real solutions). In most cases I got between 10 to 20 solutions. But since Maple is not an open source I cannot really use it. I'm trying to solve the same equations in sage. but so far I did not succeed.

Since it's the first time I write here, I'm not allowed to attach the Maple and Sage code (two files) that I wanted to attach. Instead, I copied them bellow. It took Maple 25 minutes to solve the equations (in the code bellow). and it found 12 solutions to the equations (I wrote below all the 12 solutions that Maple found). I used the command 'Isolate' in Maple to solve the equations (this command is used for solving polynomial equations). Unfortunately I cannot know how the 'Isolate' command is implemented (I can use the command 'showstat' in Maple and see partial implementation of 'Isolate' since some of the commands that are used inside 'Isolate' are compiled). But I could see that 'Isolate' uses 'Groebner basis' in order to solve the equations. Therefore I tried to convert the 18 polynomial equations in sage to groebner basis using many implementations of groebner. None of them worked (they all never finished the running). Can anyone think of any way of solving these equations in sage? The goal is to get all the possible solutions (only real solutions not complex solutions) just like Maple did (meaning, I should get 12 solutions in this example).

In addition to Maple code, I also copied the commands I used for sage (that don't work). I used the same equations that Maple solved but only converted the coeffients to rational coeffients. I had to convert the coeffients to rational coeffients otherwise I could not use the groebner_basis command (got an error from sage: "Cannot allocate memory"). with rational coefficients I didn't get any error, but sage didn't return anything (it ran all night). Since I'm very new with sage, I hope that I'm probably missing other possible commands that can solve the 18 polynomial equations. Can anyone suggest any idea?

Thanks

Here is Maple code: (and below the code I copied sage's code)

restart;

g1_1_1:=r1__1_1^2+r1__1_2^2+r1__1_3^2-1;

g1_1_2:=r1__1_1r1__2_1+r1__1_2r1__2_2+r1__1_3*r1__2_3;

g1_1_3:=r1__1_1r1__3_1+r1__1_2r1__3_2+r1__1_3*r1__3_3;

g1_2_2:=r1__2_1^2+r1__2_2^2+r1__2_3^2-1;

g1_2_3:=r1__2_1r1__3_1+r1__2_2r1__3_2+r1__2_3*r1__3_3;

g1_3_3:=r1__3_1^2+r1__3_2^2+r1__3_3^2-1;

diff_t11 := -3.542721406t13-3.724912516t12+10.49897373t11-126.0393573r1__3_3+38.92287358r1__3_2+41.58300396r1__3_1-115.7405279r1__2_3+18.37256417r1__2_2+12.44112743r1__2_1+312.5409456r1__1_3-32.14549799r1__1_2-51.60300031r1__1_1-85.16810712;

diff_t12 := -3.303190071t13+9.263303829t12-3.724912516t11-98.27068398r1__3_3-3.873365259r1__3_2+35.21985498r1__3_1+361.3041416r1__2_3-65.50632175r1__2_2-106.2503999r1__2_1-115.7405279r1__1_3+18.37256416r1__1_2+12.44112745r1__1_1+144.3153710;

diff_t13 := 12.23772244t13-3.303190071t12-3.542721406t11+25.14808453+368.9870707r1__3_3-94.90259936r1__3_2-41.17769572r1__3_1-98.27068398r1__2_3-3.873365259r1__2_2+35.21985495r1__2_1-126.0393573r1__1_3+38.92287357r1__1_2+41.58300396r1__1_1;

diff_r1__1_1 := 590.8703008+2b1__1_1r1__1_1+b1__1_2r1__2_1+b1__1_3r1__3_1+41.58300396t13+12.44112745t12-51.60300031t11+2102.554697r1__3_3-152.3287859r1__3_2-1043.099659r1__3_1+314.8874850r1__2_3+319.0237491r1__2_2-1200.302066r1__2_1-3746.497095r1__1_3-1648.667254r1__1_2+3410.304581r1__1_1;

diff_r1__2_1 := -3819.984156+b1__1_2r1__1_1+2b1__2_2r1__2_1+b1__2_3r1__3_1+35.21985495t13-106.2503999t12+12.44112743t11+1815.507541r1__3_3+666.8724957r1__3_2-1327.574321r1__3_1-5256.947355r1__2_3-28.73393065r1__2_2+2746.374847r1__2_1+314.8874851r1__1_3+319.0237489r1__1_2-1200.302066r1__1_1;

diff_r1__3_1 := 4060.313965+b1__1_3r1__1_1+b1__2_3r1__2_1+2b1__3_3r1__3_1-41.17769572t13+35.21985498t12+41.58300396t11-2918.129645r1__3_3-741.4079842r1__3_2+3407.268818r1__3_1+1815.507541r1__2_3+666.8724958r1__2_2-1327.574321r1__2_1+2102.554696r1__1_3-152.3287858r1__1_2-1043.099659r1__1_1;

diff_r1__1_2 := -691.6096740+2b1__1_1r1__1_2+b1__1_2r1__2_2+b1__1_3r1__3_2+38.92287357t13+18.37256416t12-32.14549799t11+1087.842575r1__3_3-981.8708336r1__3_2-152.3287858r1__3_1-210.0268075r1__2_3-601.4685459r1__2_2+319.0237489r1__2_1+1514.592175r1__1_3+2302.700825r1__1_2-1648.667254r1__1_1;

diff_r1__2_2 := -2365.895439+b1__1_2r1__1_2+2b1__2_2r1__2_2+b1__2_3r1__3_2-3.873365259t13-65.50632175t12+18.37256417t11-1068.477762r1__3_3-748.7401234r1__3_2+666.8724958r1__3_1-1303.778788r1__2_3+2481.505981r1__2_2-28.73393065r1__2_1-210.0268079r1__1_3-601.4685459r1__1_2+319.0237491r1__1_1;

diff_r1__3_2 := -91.67373642+b1__1_3r1__1_2+b1__2_3r1__2_2+2b1__3_3r1__3_2-94.90259936t13-3.873365259t12+38.92287358t11-945.1329593r1__3_3+2520.662892r1__3_2-741.4079842r1__3_1-1068.477762r1__2_3-748.7401234r1__2_2+666.8724957r1__2_1+1087.842575r1__1_3-981.8708336r1__1_2-152.3287859r1__1_1;

diff_r1__1_3 := 4702.012620+2b1__1_1r1__1_3+b1__1_2r1__2_3+b1__1_3r1__3_3-126.0393573t13-115.7405279t12+312.5409456t11-9148.480288r1__3_3+1087.842575r1__3_2+2102.554696r1__3_1-7724.631334r1__2_3-210.0268079r1__2_2+314.8874851r1__2_1+19057.83604r1__1_3+1514.592175r1__1_2-3746.497095r1__1_1;

diff_r1__2_3 := 6918.119675+b1__1_2r1__1_3+2b1__2_2r1__2_3+b1__2_3r1__3_3-98.27068398t13+361.3041416t12-115.7405279t11-5656.776960r1__3_3-1068.477762r1__3_2+1815.507541r1__3_1+25288.40206r1__2_3-1303.778788r1__2_2-5256.947355r1__2_1-7724.631334r1__1_3-210.0268075r1__1_2+314.8874850r1__1_1;

diff_r1__3_3 := -6160.643413+b1__1_3r1__1_3+b1__2_3r1__2_3+2b1__3_3r1__3_3+368.9870707t13-98.27068398t12-126.0393573t11+25503.13466r1__3_3-945.1329593r1__3_2-2918.129645r1__3_1-5656.776960r1__2_3-1068.477762r1__2_2+1815.507541r1__2_1-9148.480288r1__1_3+1087.842575r1__1_2+2102.554697r1__1_1;

vars := [op(indets(h, And(name, Non(constant))))];

polysys:={g1_1_1,g1_1_2,g1_1_3,g1_2_2,g1_2_3,g1_3_3,diff_t11,diff_t12,diff_t13,diff_r1__1_1,diff_r1__1_2,diff_r1__1_3,diff_r1__2_1,diff_r1__2_2,diff_r1__2_3,diff_r1__3_1,diff_r1__3_2,diff_r1__3_3};

sols := CodeTools:-Usage(RootFinding:-Isolate(polysys, vars, output = numeric, method = RS));

And this is sage code (that couldn't find the groebner basis):

P.<b1__1_1, b1__1_2,="" b1__1_3,="" b1__2_2,="" b1__2_3,="" b1__3_3,="" r1__1_1,="" r1__1_2,="" r1__1_3,="" r1__2_1,="" r1__2_2,="" r1__2_3,="" r1__3_1,="" r1__3_2,="" r1__3_3,="" t11,="" t12,="" t13="">=PolynomialRing(QQ,order='degrevlex')

g1_1_1 = r1__1_1^2+r1__1_2^2+r1__1_3^2-1

g1_1_2 = r1__1_1r1__2_1+r1__1_2r1__2_2+r1__1_3*r1__2_3

g1_1_3 = r1__1_1r1__3_1+r1__1_2r1__3_2+r1__1_3*r1__3_3

g1_2_2 = r1__2_1^2+r1__2_2^2+r1__2_3^2-1

g1_2_3 = r1__2_1r1__3_1+r1__2_2r1__3_2+r1__2_3*r1__3_3

g1_3_3 = r1__3_1^2+r1__3_2^2+r1__3_3^2-1

diff_t11 = 74597r1__2_1(1/5996)-32999t12(1/8859)-47724t13(1/13471)-285739/3355+51151t11(1/4872)-227375r1__3_3(1/1804)+250313r1__3_2(1/6431)+21041r1__3_1(1/506)-946989r1__2_3(1/8182)+95225r1__2_2(1/5183)+270973r1__1_3(1/867)-201713r1__1_2(1/6275)-333665r1__1_1(1/6466)

diff_t12 = -132813r1__2_1(1/1250)+86862t12(1/9377)-49495t13(1/14984)-32999t11(1/8859)-205484r1__3_3(1/2091)-101885r1__3_2(1/26304)+77695r1__3_1(1/2206)+305302r1__2_3(1/845)-336768r1__2_2(1/5141)-946989r1__1_3(1/8182)+95225r1__1_2(1/5183)+74597r1__1_1(1/5996)+163365/1132

diff_t13 = 77695r1__2_1(1/2206)-49495t12(1/14984)+17194t13(1/1405)-47724t11(1/13471)+827638r1__3_3(1/2243)-303024r1__3_2(1/3193)-189788r1__3_1(1/4609)-205484r1__2_3(1/2091)-71971r1__2_2(1/18581)-227375r1__1_3(1/1804)+338629r1__1_2(1/8700)+21041r1__1_1(1/506)+43984/1749

diff_r1__1_1 = -(754990/629)r1__2_1+(74597/5996)t12+(21041/506)t13-(333665/6466)t11+(1364558/649)r1__3_3-(111657/733)r1__3_2-(1224599/1174)r1__3_1+(249076/791)r1__2_3+(376129/1179)r1__2_2-(1288795/344)r1__1_3-(936443/568)r1__1_2+(1265223/371)r1__1_1+1084247/1835+2b1__1_1r1__1_1+b1__1_2r1__2_1+b1__1_3r1__3_1

diff_r1__2_1 = (2227310/811)r1__2_1-(132813/1250)t12+(77695/2206)t13-1929092/505+(74597/5996)t11+b1__1_2r1__1_1+2b1__2_2r1__2_1+b1__2_3r1__3_1+(2046077/1127)r1__3_3+(366113/549)r1__3_2-(1509452/1137)r1__3_1-(20570435/3913)r1__2_3-(240503/8370)r1__2_2+(772419/2453)r1__1_3+(376129/1179)r1__1_2-(754990/629)r1__1_1

diff_r1__3_1 = b1__1_3r1__1_1+b1__2_3r1__2_1+2b1__3_3r1__3_1-(1509452/1137)r1__2_1+(77695/2206)t12-(189788/4609)t13+3284794/809+(21041/506)t11-(3218697/1103)r1__3_3-(761426/1027)r1__3_2+(316876/93)r1__3_1+(2046077/1127)r1__2_3+(366113/549)r1__2_2+(1364558/649)r1__1_3-(111657/733)r1__1_2-(1224599/1174)r1__1_1

diff_r1__1_2 = (376129/1179)r1__2_1+(95225/5183)t12+(338629/8700)t13-614841/889+2b1__1_1r1__1_2+b1__1_2r1__2_2+b1__1_3r1__3_2-(201713/6275)t11+(608104/559)r1__3_3-(235649/240)r1__3_2-(111657/733)r1__3_1-(258543/1231)r1__2_3-(1749672/2909)r1__2_2+(2012893/1329)r1__1_3+(3640570/1581)r1__1_2-(936443/568)r1__1_1

diff_r1__2_2 = b1__1_2r1__1_2+2b1__2_2r1__2_2+b1__2_3r1__3_2-(240503/8370)r1__2_1-(336768/5141)t12-(71971/18581)t13-1244461/526+(95225/5183)t11-(744729/697)r1__3_3-(852815/1139)r1__3_2+(366113/549)r1__3_1-(430247/330)r1__2_3+(1451681/585)r1__2_2-(336883/1604)r1__1_3-(1749672/2909)r1__1_2+(376129/1179)r1__1_1

diff_r1__3_2 = (366113/549)r1__2_1-(101885/26304)t12-(303024/3193)t13+b1__1_3r1__1_2+b1__2_3r1__2_2+2b1__3_3r1__3_2+(250313/6431)t11-(1350595/1429)r1__3_3+(889794/353)r1__3_2-(761426/1027)r1__3_1-(744729/697)r1__2_3-(852815/1139)r1__2_2+(608104/559)r1__1_3-(235649/240)r1__1_2-(111657/733)r1__1_1-203149/2216

diff_r1__1_3 = (772419/2453)r1__2_1-(946989/8182)t12-(227375/1804)t13+(270973/867)t11-(2552426/279)r1__3_3+(608104/559)r1__3_2+(1364558/649)r1__3_1-(1676245/217)r1__2_3-(336883/1604)r1__2_2+(1162528/61)r1__1_3+(2012893/1329)r1__1_2-(1288795/344)r1__1_1+1490538/317+2b1__1_1r1__1_3+b1__1_2r1__2_3+b1__1_3r1__3_3

diff_r1__2_3 = -(20570435/3913)r1__2_1+(305302/845)t12-(205484/2091)t13-(946989/8182)t11-(2307965/408)r1__3_3-(744729/697)r1__3_2+(2046077/1127)r1__3_1+(2452975/97)r1__2_3-(430247/330)r1__2_2-(1676245/217)r1__1_3-(258543/1231)r1__1_2+(249076/791)r1__1_1+2601213/376+b1__1_2r1__1_3+2b1__2_2r1__2_3+b1__2_3r1__3_3

diff_r1__3_3 = (2046077/1127)r1__2_1-(205484/2091)t12+(827638/2243)t13-794723/129-(227375/1804)t11+b1__1_3r1__1_3+b1__2_3r1__2_3+2b1__3_3r1__3_3+(7574431/297)r1__3_3-(1350595/1429)r1__3_2-(3218697/1103)r1__3_1-(2307965/408)r1__2_3-(744729/697)r1__2_2-(2552426/279)r1__1_3+(608104/559)r1__1_2+(1364558/649)r1__1_1

I=Ideal(g1_1_1, g1_1_2, g1_1_3, g1_2_2, g1_2_3, g1_3_3, diff_t11, diff_t12, diff_t13, diff_r1__1_1, diff_r1__2_1, diff_r1__3_1, diff_r1__1_2, diff_r1__2_2, diff_r1__3_2, diff_r1__1_3, diff_r1__2_3, diff_r1__3_3)

I.groebner_basis()

I.variety(RR)

And these are the 12 solutions the Maple found (all the real solutions that solve the equations): The goal is to get the same solutions from sage.

[[b1__1_1 = -899.5942504, b1__1_2 = 3037.238105, b1__1_3 = -3600.559806, b1__2_2 = -1064.022119, b1__2_3 = 889.3168953, b1__3_3 = -2555.002632, r1__1_1 = .7481491832, r1__1_2 = .6388182437, r1__1_3 = .1793991396, r1__2_1 = -.6472289487, r1__2_2 = .7621522200, r1__2_3 = -0.1478788196e-1, r1__3_1 = -.1461762213, r1__3_2 = -.1050487747, r1__3_3 = .9836652211, t11 = .1547590859, t12 = -20.00614350, t13 = -39.11689082],

[b1__1_1 = -2536.737834, b1__1_2 = -384.6438623, b1__1_3 = 2968.302582, b1__2_2 = 206.1653350, b1__2_3 = -4119.641687, b1__3_3 = -2528.112061, r1__1_1 = .3433731644, r1__1_2 = -.9364692403, r1__1_3 = -0.7155579556e-1, r1__2_1 = .8767823107, r1__2_2 = .2923108835, r1__2_3 = .3818469942, r1__3_1 = -.3366714267, r1__3_2 = -.1938548665, r1__3_3 = .9214513775, t11 = 8.655455565, t12 = -14.90305773, t13 = -32.28108776],

[b1__1_1 = -2672.661895, b1__1_2 = 5518.566630, b1__1_3 = 194.0920868, b1__2_2 = -1264.096636, b1__2_3 = -39.30164061, b1__3_3 = -3167.161180, r1__1_1 = .6407595964, r1__1_2 = .1199696331, r1__1_3 = -.7583102444, r1__2_1 = -.1297813989, r1__2_2 = .9904267144, r1__2_3 = 0.4702884205e-1, r1__3_1 = .7566927568, r1__3_2 = 0.6828038249e-1, r1__3_3 = .6501952485, t11 = 21.88635414, t12 = -19.14986568, t13 = -26.72096477],

[b1__1_1 = -2415.819809, b1__1_2 = -247.8725031, b1__1_3 = -81.80497732, b1__2_2 = 578.5002146, b1__2_3 = -3308.869199, b1__3_3 = -632.2913675, r1__1_1 = .5855751733, r1__1_2 = -.6602102503, r1__1_3 = .4703447053, r1__2_1 = .5367090123, r1__2_2 = .7506041613, r1__2_3 = .3854047601, r1__3_1 = -.6074908662, r1__3_2 = 0.2675478306e-1, r1__3_3 = .7938759532, t11 = -4.150377642, t12 = -12.85905997, t13 = -25.75853354],

[b1__1_1 = 305.8128664, b1__1_2 = 1219.200904, b1__1_3 = -4379.467945, b1__2_2 = -1232.280299, b1__2_3 = 1920.610983, b1__3_3 = -1454.259739, r1__1_1 = .4050262785, r1__1_2 = .2045666996, r1__1_3 = -.8911263542, r1__2_1 = -.7397436412, r1__2_2 = -.4994839335, r1__2_3 = -.4508826294, r1__3_1 = .5373388680, r1__3_2 = -.8418243674, r1__3_3 = 0.5097720352e-1, t11 = 19.84743424, t12 = -23.75250545, t13 = -21.83242508],

[b1__1_1 = -2561.237930, b1__1_2 = 5363.493736, b1__1_3 = -370.0386489, b1__2_2 = -1179.131772, b1__2_3 = 977.8467630, b1__3_3 = -2792.263176, r1__1_1 = .4494018895, r1__1_2 = 0.2797468228e-1, r1__1_3 = -.8928915717, r1__2_1 = -.2109820307, r1__2_2 = .9745577061, r1__2_3 = -0.7565619745e-1, r1__3_1 = .8680579038, r1__3_2 = .2223841151, r1__3_3 = .4438702298, t11 = 24.07022969, t12 = -15.38154019, t13 = -18.48056832],

[b1__1_1 = 549.2162023, b1__1_2 = 87.77137600, b1__1_3 = -1198.811469, b1__2_2 = -495.0197371, b1__2_3 = -1765.778607, b1__3_3 = 676.3321754, r1__1_1 = -.3382824498, r1__1_2 = .1447284170, r1__1_3 = -.9298487347, r1__2_1 = .8458105804, r1__2_2 = -.3863831243, r1__2_3 = -.3678485331, r1__3_1 = -.4125159951, r1__3_2 = -.9109126010, r1__3_3 = 0.8293803447e-2, t11 = 30.93253221, t12 = 2.460529285, t13 = -15.53626680],

[b1__1_1 = -1223.590670, b1__1_2 = 1841.223573, b1__1_3 = 4119.421790, b1__2_2 = 671.1576084, b1__2_3 = -1371.054802, b1__3_3 = -903.8038187, r1__1_1 = -.4128628600, r1__1_2 = -0.7780371756e-1, r1__1_3 = -.9074639609, r1__2_1 = .2440176361, r1__2_2 = .9504710646, r1__2_3 = -.1925101259, r1__3_1 = -.8774962405, r1__3_2 = .3009174918, r1__3_3 = .3734287229, t11 = 34.69684826, t12 = 8.155443592, t13 = -11.33088510],

[b1__1_1 = -6327.273294, b1__1_2 = 1759.073834, b1__1_3 = 11207.90070, b1__2_2 = -1890.858242, b1__2_3 = 1891.950907, b1__3_3 = -9760.176346, r1__1_1 = .3766394529, r1__1_2 = -.6180780439, r1__1_3 = .6900161260, r1__2_1 = -.7796490396, r1__2_2 = -.6137728279, r1__2_3 = -.1242187218, r1__3_1 = .5002900135, r1__3_2 = -.4911847385, r1__3_3 = -.7130550154, t11 = -29.31512316, t12 = -33.00946996, t13 = 8.767454469],

[b1__1_1 = -3304.385960, b1__1_2 = -4044.369886, b1__1_3 = 10477.87582, b1__2_2 = -1108.617283, b1__2_3 = 5826.342875, b1__3_3 = -9844.297818, r1__1_1 = -.5741762462, r1__1_2 = -.7368503356, r1__1_3 = .3568938514, r1__2_1 = .7828801205, r1__2_2 = -.3665428545, r1__2_3 = .5027375585, r1__3_1 = .2396254476, r1__3_2 = -.5680650656, r1__3_3 = -.7873256798, t11 = -18.36435913, t12 = -34.30593158, t13 = 13.14730960],

[b1__1_1 = -6612.907618, b1__1_2 = 2424.756675, b1__1_3 = 12384.95493, b1__2_2 = -1691.366479, b1__2_3 = 2578.504868, b1__3_3 = -9210.975576, r1__1_1 = .5157887216, r1__1_2 = .4217561249, r1__1_3 = .7457102425, r1__2_1 = -.4865104064, r1__2_2 = .8606564397, r1__2_3 = -.1502601654, r1__3_1 = .7051734674, r1__3_2 = .2852932946, r1__3_3 = -.6491056285, t11 = -24.37008827, t12 = -14.94325716, t13 = 16.06559316],

[b1__1_1 = -4846.263193, b1__1_2 = -3105.528126, b1__1_3 = 12948.69518, b1__2_2 = -279.0100568, b1__2_3 = 4363.645053, b1__3_3 = -9431.494358, r1__1_1 = -.8785017929, r1__1_2 = .3491284937, r1__1_3 = .3261041166, r1__2_1 = .4347305027, r1__2_2 = .8672555961, r1__2_3 = .2426460819, r1__3_1 = -.1981009589, r1__3_2 = .3549324245, r1__3_3 = -.9136624016, t11 = -11.20139735, t12 = -13.01981734, t13 = 27.02745538]]

Solving a system of 18 polynomial equations in sagemath

Solving a system of 18 polynomial equations in sagemath

I'm trying to solve a system of 18 polynomial equations in sage. The system is for sure solvable since I already solved it in Maple and got ALL the possible solutions (only real solutions). In most cases I got between 10 to 20 solutions. But since Maple is not an open source I cannot really use it. I'm trying to solve the same equations in sage. but so far I did not succeed.

Since it's the first time I write here, I'm not allowed to attach the Maple and Sage code (two files) that I wanted to attach. Instead, I copied them bellow. It took Maple 25 minutes to solve the equations (in the code bellow). and it found 12 solutions to the equations (I wrote below all the 12 solutions that Maple found). I used the command 'Isolate' in Maple to solve the equations (this command is used for solving polynomial equations). Unfortunately I cannot know how the 'Isolate' command is implemented (I can use the command 'showstat' in Maple and see partial implementation of 'Isolate' since some of the commands that are used inside 'Isolate' are compiled). But I could see that 'Isolate' uses 'Groebner basis' in order to solve the equations. Therefore I tried to convert the 18 polynomial equations in sage to groebner basis using many implementations of groebner. None of them worked (they all never finished the running). Can anyone think of any way of solving these equations in sage? The goal is to get all the possible solutions (only real solutions not complex solutions) just like Maple did (meaning, I should get 12 solutions in this example).

In addition to Maple code, I also copied the commands I used for sage (that don't work). I used the same equations that Maple solved but only converted the coeffients to rational coeffients. I had to convert the coeffients to rational coeffients otherwise I could not use the groebner_basis command (got an error from sage: "Cannot allocate memory"). with rational coefficients I didn't get any error, but sage didn't return anything (it ran all night). Since I'm very new with sage, I hope that I'm probably missing other possible commands that can solve the 18 polynomial equations. Can anyone suggest any idea?

Thanks

Here is Maple code: (and below the code I copied sage's code)

restart;

g1_1_1:=r1__1_1^2+r1__1_2^2+r1__1_3^2-1;

g1_1_2:=r1__1_1r1__2_1+r1__1_2r1__2_2+r1__1_3*r1__2_3;

g1_1_3:=r1__1_1r1__3_1+r1__1_2r1__3_2+r1__1_3*r1__3_3;

g1_2_2:=r1__2_1^2+r1__2_2^2+r1__2_3^2-1;

g1_2_3:=r1__2_1r1__3_1+r1__2_2r1__3_2+r1__2_3*r1__3_3;

g1_3_3:=r1__3_1^2+r1__3_2^2+r1__3_3^2-1;

diff_t11 := -3.542721406t13-3.724912516t12+10.49897373t11-126.0393573r1__3_3+38.92287358r1__3_2+41.58300396r1__3_1-115.7405279r1__2_3+18.37256417r1__2_2+12.44112743r1__2_1+312.5409456r1__1_3-32.14549799r1__1_2-51.60300031r1__1_1-85.16810712;

diff_t12 := -3.303190071t13+9.263303829t12-3.724912516t11-98.27068398r1__3_3-3.873365259r1__3_2+35.21985498r1__3_1+361.3041416r1__2_3-65.50632175r1__2_2-106.2503999r1__2_1-115.7405279r1__1_3+18.37256416r1__1_2+12.44112745r1__1_1+144.3153710;

diff_t13 := 12.23772244t13-3.303190071t12-3.542721406t11+25.14808453+368.9870707r1__3_3-94.90259936r1__3_2-41.17769572r1__3_1-98.27068398r1__2_3-3.873365259r1__2_2+35.21985495r1__2_1-126.0393573r1__1_3+38.92287357r1__1_2+41.58300396r1__1_1;

diff_r1__1_1 := 590.8703008+2b1__1_1r1__1_1+b1__1_2r1__2_1+b1__1_3r1__3_1+41.58300396t13+12.44112745t12-51.60300031t11+2102.554697r1__3_3-152.3287859r1__3_2-1043.099659r1__3_1+314.8874850r1__2_3+319.0237491r1__2_2-1200.302066r1__2_1-3746.497095r1__1_3-1648.667254r1__1_2+3410.304581r1__1_1;

diff_r1__2_1 := -3819.984156+b1__1_2r1__1_1+2b1__2_2r1__2_1+b1__2_3r1__3_1+35.21985495t13-106.2503999t12+12.44112743t11+1815.507541r1__3_3+666.8724957r1__3_2-1327.574321r1__3_1-5256.947355r1__2_3-28.73393065r1__2_2+2746.374847r1__2_1+314.8874851r1__1_3+319.0237489r1__1_2-1200.302066r1__1_1;

diff_r1__3_1 := 4060.313965+b1__1_3r1__1_1+b1__2_3r1__2_1+2b1__3_3r1__3_1-41.17769572t13+35.21985498t12+41.58300396t11-2918.129645r1__3_3-741.4079842r1__3_2+3407.268818r1__3_1+1815.507541r1__2_3+666.8724958r1__2_2-1327.574321r1__2_1+2102.554696r1__1_3-152.3287858r1__1_2-1043.099659r1__1_1;

diff_r1__1_2 := -691.6096740+2b1__1_1r1__1_2+b1__1_2r1__2_2+b1__1_3r1__3_2+38.92287357t13+18.37256416t12-32.14549799t11+1087.842575r1__3_3-981.8708336r1__3_2-152.3287858r1__3_1-210.0268075r1__2_3-601.4685459r1__2_2+319.0237489r1__2_1+1514.592175r1__1_3+2302.700825r1__1_2-1648.667254r1__1_1;

diff_r1__2_2 := -2365.895439+b1__1_2r1__1_2+2b1__2_2r1__2_2+b1__2_3r1__3_2-3.873365259t13-65.50632175t12+18.37256417t11-1068.477762r1__3_3-748.7401234r1__3_2+666.8724958r1__3_1-1303.778788r1__2_3+2481.505981r1__2_2-28.73393065r1__2_1-210.0268079r1__1_3-601.4685459r1__1_2+319.0237491r1__1_1;

diff_r1__3_2 := -91.67373642+b1__1_3r1__1_2+b1__2_3r1__2_2+2b1__3_3r1__3_2-94.90259936t13-3.873365259t12+38.92287358t11-945.1329593r1__3_3+2520.662892r1__3_2-741.4079842r1__3_1-1068.477762r1__2_3-748.7401234r1__2_2+666.8724957r1__2_1+1087.842575r1__1_3-981.8708336r1__1_2-152.3287859r1__1_1;

diff_r1__1_3 := 4702.012620+2b1__1_1r1__1_3+b1__1_2r1__2_3+b1__1_3r1__3_3-126.0393573t13-115.7405279t12+312.5409456t11-9148.480288r1__3_3+1087.842575r1__3_2+2102.554696r1__3_1-7724.631334r1__2_3-210.0268079r1__2_2+314.8874851r1__2_1+19057.83604r1__1_3+1514.592175r1__1_2-3746.497095r1__1_1;

diff_r1__2_3 := 6918.119675+b1__1_2r1__1_3+2b1__2_2r1__2_3+b1__2_3r1__3_3-98.27068398t13+361.3041416t12-115.7405279t11-5656.776960r1__3_3-1068.477762r1__3_2+1815.507541r1__3_1+25288.40206r1__2_3-1303.778788r1__2_2-5256.947355r1__2_1-7724.631334r1__1_3-210.0268075r1__1_2+314.8874850r1__1_1;

diff_r1__3_3 := -6160.643413+b1__1_3r1__1_3+b1__2_3r1__2_3+2b1__3_3r1__3_3+368.9870707t13-98.27068398t12-126.0393573t11+25503.13466r1__3_3-945.1329593r1__3_2-2918.129645r1__3_1-5656.776960r1__2_3-1068.477762r1__2_2+1815.507541r1__2_1-9148.480288r1__1_3+1087.842575r1__1_2+2102.554697r1__1_1;

vars := [op(indets(h, And(name, Non(constant))))];

polysys:={g1_1_1,g1_1_2,g1_1_3,g1_2_2,g1_2_3,g1_3_3,diff_t11,diff_t12,diff_t13,diff_r1__1_1,diff_r1__1_2,diff_r1__1_3,diff_r1__2_1,diff_r1__2_2,diff_r1__2_3,diff_r1__3_1,diff_r1__3_2,diff_r1__3_3};

sols := CodeTools:-Usage(RootFinding:-Isolate(polysys, vars, output = numeric, method = RS));

And this is sage code (that couldn't find the groebner basis):

P.<b1__1_1, b1__1_2,="" b1__1_3,="" b1__2_2,="" b1__2_3,="" b1__3_3,="" r1__1_1,="" r1__1_2,="" r1__1_3,="" r1__2_1,="" r1__2_2,="" r1__2_3,="" r1__3_1,="" r1__3_2,="" r1__3_3,="" t11,="" t12,="" t13="">=PolynomialRing(QQ,order='degrevlex')

g1_1_1 = r1__1_1^2+r1__1_2^2+r1__1_3^2-1

g1_1_2 = r1__1_1r1__2_1+r1__1_2r1__2_2+r1__1_3*r1__2_3

g1_1_3 = r1__1_1r1__3_1+r1__1_2r1__3_2+r1__1_3*r1__3_3

g1_2_2 = r1__2_1^2+r1__2_2^2+r1__2_3^2-1

g1_2_3 = r1__2_1r1__3_1+r1__2_2r1__3_2+r1__2_3*r1__3_3

g1_3_3 = r1__3_1^2+r1__3_2^2+r1__3_3^2-1

diff_t11 = 74597r1__2_1(1/5996)-32999t12(1/8859)-47724t13(1/13471)-285739/3355+51151t11(1/4872)-227375r1__3_3(1/1804)+250313r1__3_2(1/6431)+21041r1__3_1(1/506)-946989r1__2_3(1/8182)+95225r1__2_2(1/5183)+270973r1__1_3(1/867)-201713r1__1_2(1/6275)-333665r1__1_1(1/6466)

diff_t12 = -132813r1__2_1(1/1250)+86862t12(1/9377)-49495t13(1/14984)-32999t11(1/8859)-205484r1__3_3(1/2091)-101885r1__3_2(1/26304)+77695r1__3_1(1/2206)+305302r1__2_3(1/845)-336768r1__2_2(1/5141)-946989r1__1_3(1/8182)+95225r1__1_2(1/5183)+74597r1__1_1(1/5996)+163365/1132

diff_t13 = 77695r1__2_1(1/2206)-49495t12(1/14984)+17194t13(1/1405)-47724t11(1/13471)+827638r1__3_3(1/2243)-303024r1__3_2(1/3193)-189788r1__3_1(1/4609)-205484r1__2_3(1/2091)-71971r1__2_2(1/18581)-227375r1__1_3(1/1804)+338629r1__1_2(1/8700)+21041r1__1_1(1/506)+43984/1749

diff_r1__1_1 = -(754990/629)r1__2_1+(74597/5996)t12+(21041/506)t13-(333665/6466)t11+(1364558/649)r1__3_3-(111657/733)r1__3_2-(1224599/1174)r1__3_1+(249076/791)r1__2_3+(376129/1179)r1__2_2-(1288795/344)r1__1_3-(936443/568)r1__1_2+(1265223/371)r1__1_1+1084247/1835+2b1__1_1r1__1_1+b1__1_2r1__2_1+b1__1_3r1__3_1

diff_r1__2_1 = (2227310/811)r1__2_1-(132813/1250)t12+(77695/2206)t13-1929092/505+(74597/5996)t11+b1__1_2r1__1_1+2b1__2_2r1__2_1+b1__2_3r1__3_1+(2046077/1127)r1__3_3+(366113/549)r1__3_2-(1509452/1137)r1__3_1-(20570435/3913)r1__2_3-(240503/8370)r1__2_2+(772419/2453)r1__1_3+(376129/1179)r1__1_2-(754990/629)r1__1_1

diff_r1__3_1 = b1__1_3r1__1_1+b1__2_3r1__2_1+2b1__3_3r1__3_1-(1509452/1137)r1__2_1+(77695/2206)t12-(189788/4609)t13+3284794/809+(21041/506)t11-(3218697/1103)r1__3_3-(761426/1027)r1__3_2+(316876/93)r1__3_1+(2046077/1127)r1__2_3+(366113/549)r1__2_2+(1364558/649)r1__1_3-(111657/733)r1__1_2-(1224599/1174)r1__1_1

diff_r1__1_2 = (376129/1179)r1__2_1+(95225/5183)t12+(338629/8700)t13-614841/889+2b1__1_1r1__1_2+b1__1_2r1__2_2+b1__1_3r1__3_2-(201713/6275)t11+(608104/559)r1__3_3-(235649/240)r1__3_2-(111657/733)r1__3_1-(258543/1231)r1__2_3-(1749672/2909)r1__2_2+(2012893/1329)r1__1_3+(3640570/1581)r1__1_2-(936443/568)r1__1_1

diff_r1__2_2 = b1__1_2r1__1_2+2b1__2_2r1__2_2+b1__2_3r1__3_2-(240503/8370)r1__2_1-(336768/5141)t12-(71971/18581)t13-1244461/526+(95225/5183)t11-(744729/697)r1__3_3-(852815/1139)r1__3_2+(366113/549)r1__3_1-(430247/330)r1__2_3+(1451681/585)r1__2_2-(336883/1604)r1__1_3-(1749672/2909)r1__1_2+(376129/1179)r1__1_1

diff_r1__3_2 = (366113/549)r1__2_1-(101885/26304)t12-(303024/3193)t13+b1__1_3r1__1_2+b1__2_3r1__2_2+2b1__3_3r1__3_2+(250313/6431)t11-(1350595/1429)r1__3_3+(889794/353)r1__3_2-(761426/1027)r1__3_1-(744729/697)r1__2_3-(852815/1139)r1__2_2+(608104/559)r1__1_3-(235649/240)r1__1_2-(111657/733)r1__1_1-203149/2216

diff_r1__1_3 = (772419/2453)r1__2_1-(946989/8182)t12-(227375/1804)t13+(270973/867)t11-(2552426/279)r1__3_3+(608104/559)r1__3_2+(1364558/649)r1__3_1-(1676245/217)r1__2_3-(336883/1604)r1__2_2+(1162528/61)r1__1_3+(2012893/1329)r1__1_2-(1288795/344)r1__1_1+1490538/317+2b1__1_1r1__1_3+b1__1_2r1__2_3+b1__1_3r1__3_3

diff_r1__2_3 = -(20570435/3913)r1__2_1+(305302/845)t12-(205484/2091)t13-(946989/8182)t11-(2307965/408)r1__3_3-(744729/697)r1__3_2+(2046077/1127)r1__3_1+(2452975/97)r1__2_3-(430247/330)r1__2_2-(1676245/217)r1__1_3-(258543/1231)r1__1_2+(249076/791)r1__1_1+2601213/376+b1__1_2r1__1_3+2b1__2_2r1__2_3+b1__2_3r1__3_3

diff_r1__3_3 = (2046077/1127)r1__2_1-(205484/2091)t12+(827638/2243)t13-794723/129-(227375/1804)t11+b1__1_3r1__1_3+b1__2_3r1__2_3+2b1__3_3r1__3_3+(7574431/297)r1__3_3-(1350595/1429)r1__3_2-(3218697/1103)r1__3_1-(2307965/408)r1__2_3-(744729/697)r1__2_2-(2552426/279)r1__1_3+(608104/559)r1__1_2+(1364558/649)r1__1_1

I=Ideal(g1_1_1, g1_1_2, g1_1_3, g1_2_2, g1_2_3, g1_3_3, diff_t11, diff_t12, diff_t13, diff_r1__1_1, diff_r1__2_1, diff_r1__3_1, diff_r1__1_2, diff_r1__2_2, diff_r1__3_2, diff_r1__1_3, diff_r1__2_3, diff_r1__3_3)

I.groebner_basis()

I.variety(RR)

And these are the 12 solutions the Maple found (all the real solutions that solve the equations): The goal is to get the same solutions from sage.

[[b1__1_1 = -899.5942504, b1__1_2 = 3037.238105, b1__1_3 = -3600.559806, b1__2_2 = -1064.022119, b1__2_3 = 889.3168953, b1__3_3 = -2555.002632, r1__1_1 = .7481491832, r1__1_2 = .6388182437, r1__1_3 = .1793991396, r1__2_1 = -.6472289487, r1__2_2 = .7621522200, r1__2_3 = -0.1478788196e-1, r1__3_1 = -.1461762213, r1__3_2 = -.1050487747, r1__3_3 = .9836652211, t11 = .1547590859, t12 = -20.00614350, t13 = -39.11689082],

[b1__1_1 = -2536.737834, b1__1_2 = -384.6438623, b1__1_3 = 2968.302582, b1__2_2 = 206.1653350, b1__2_3 = -4119.641687, b1__3_3 = -2528.112061, r1__1_1 = .3433731644, r1__1_2 = -.9364692403, r1__1_3 = -0.7155579556e-1, r1__2_1 = .8767823107, r1__2_2 = .2923108835, r1__2_3 = .3818469942, r1__3_1 = -.3366714267, r1__3_2 = -.1938548665, r1__3_3 = .9214513775, t11 = 8.655455565, t12 = -14.90305773, t13 = -32.28108776],

[b1__1_1 = -2672.661895, b1__1_2 = 5518.566630, b1__1_3 = 194.0920868, b1__2_2 = -1264.096636, b1__2_3 = -39.30164061, b1__3_3 = -3167.161180, r1__1_1 = .6407595964, r1__1_2 = .1199696331, r1__1_3 = -.7583102444, r1__2_1 = -.1297813989, r1__2_2 = .9904267144, r1__2_3 = 0.4702884205e-1, r1__3_1 = .7566927568, r1__3_2 = 0.6828038249e-1, r1__3_3 = .6501952485, t11 = 21.88635414, t12 = -19.14986568, t13 = -26.72096477],

[b1__1_1 = -2415.819809, b1__1_2 = -247.8725031, b1__1_3 = -81.80497732, b1__2_2 = 578.5002146, b1__2_3 = -3308.869199, b1__3_3 = -632.2913675, r1__1_1 = .5855751733, r1__1_2 = -.6602102503, r1__1_3 = .4703447053, r1__2_1 = .5367090123, r1__2_2 = .7506041613, r1__2_3 = .3854047601, r1__3_1 = -.6074908662, r1__3_2 = 0.2675478306e-1, r1__3_3 = .7938759532, t11 = -4.150377642, t12 = -12.85905997, t13 = -25.75853354],

[b1__1_1 = 305.8128664, b1__1_2 = 1219.200904, b1__1_3 = -4379.467945, b1__2_2 = -1232.280299, b1__2_3 = 1920.610983, b1__3_3 = -1454.259739, r1__1_1 = .4050262785, r1__1_2 = .2045666996, r1__1_3 = -.8911263542, r1__2_1 = -.7397436412, r1__2_2 = -.4994839335, r1__2_3 = -.4508826294, r1__3_1 = .5373388680, r1__3_2 = -.8418243674, r1__3_3 = 0.5097720352e-1, t11 = 19.84743424, t12 = -23.75250545, t13 = -21.83242508],

[b1__1_1 = -2561.237930, b1__1_2 = 5363.493736, b1__1_3 = -370.0386489, b1__2_2 = -1179.131772, b1__2_3 = 977.8467630, b1__3_3 = -2792.263176, r1__1_1 = .4494018895, r1__1_2 = 0.2797468228e-1, r1__1_3 = -.8928915717, r1__2_1 = -.2109820307, r1__2_2 = .9745577061, r1__2_3 = -0.7565619745e-1, r1__3_1 = .8680579038, r1__3_2 = .2223841151, r1__3_3 = .4438702298, t11 = 24.07022969, t12 = -15.38154019, t13 = -18.48056832],

[b1__1_1 = 549.2162023, b1__1_2 = 87.77137600, b1__1_3 = -1198.811469, b1__2_2 = -495.0197371, b1__2_3 = -1765.778607, b1__3_3 = 676.3321754, r1__1_1 = -.3382824498, r1__1_2 = .1447284170, r1__1_3 = -.9298487347, r1__2_1 = .8458105804, r1__2_2 = -.3863831243, r1__2_3 = -.3678485331, r1__3_1 = -.4125159951, r1__3_2 = -.9109126010, r1__3_3 = 0.8293803447e-2, t11 = 30.93253221, t12 = 2.460529285, t13 = -15.53626680],

[b1__1_1 = -1223.590670, b1__1_2 = 1841.223573, b1__1_3 = 4119.421790, b1__2_2 = 671.1576084, b1__2_3 = -1371.054802, b1__3_3 = -903.8038187, r1__1_1 = -.4128628600, r1__1_2 = -0.7780371756e-1, r1__1_3 = -.9074639609, r1__2_1 = .2440176361, r1__2_2 = .9504710646, r1__2_3 = -.1925101259, r1__3_1 = -.8774962405, r1__3_2 = .3009174918, r1__3_3 = .3734287229, t11 = 34.69684826, t12 = 8.155443592, t13 = -11.33088510],

[b1__1_1 = -6327.273294, b1__1_2 = 1759.073834, b1__1_3 = 11207.90070, b1__2_2 = -1890.858242, b1__2_3 = 1891.950907, b1__3_3 = -9760.176346, r1__1_1 = .3766394529, r1__1_2 = -.6180780439, r1__1_3 = .6900161260, r1__2_1 = -.7796490396, r1__2_2 = -.6137728279, r1__2_3 = -.1242187218, r1__3_1 = .5002900135, r1__3_2 = -.4911847385, r1__3_3 = -.7130550154, t11 = -29.31512316, t12 = -33.00946996, t13 = 8.767454469],

[b1__1_1 = -3304.385960, b1__1_2 = -4044.369886, b1__1_3 = 10477.87582, b1__2_2 = -1108.617283, b1__2_3 = 5826.342875, b1__3_3 = -9844.297818, r1__1_1 = -.5741762462, r1__1_2 = -.7368503356, r1__1_3 = .3568938514, r1__2_1 = .7828801205, r1__2_2 = -.3665428545, r1__2_3 = .5027375585, r1__3_1 = .2396254476, r1__3_2 = -.5680650656, r1__3_3 = -.7873256798, t11 = -18.36435913, t12 = -34.30593158, t13 = 13.14730960],

[b1__1_1 = -6612.907618, b1__1_2 = 2424.756675, b1__1_3 = 12384.95493, b1__2_2 = -1691.366479, b1__2_3 = 2578.504868, b1__3_3 = -9210.975576, r1__1_1 = .5157887216, r1__1_2 = .4217561249, r1__1_3 = .7457102425, r1__2_1 = -.4865104064, r1__2_2 = .8606564397, r1__2_3 = -.1502601654, r1__3_1 = .7051734674, r1__3_2 = .2852932946, r1__3_3 = -.6491056285, t11 = -24.37008827, t12 = -14.94325716, t13 = 16.06559316],

[b1__1_1 = -4846.263193, b1__1_2 = -3105.528126, b1__1_3 = 12948.69518, b1__2_2 = -279.0100568, b1__2_3 = 4363.645053, b1__3_3 = -9431.494358, r1__1_1 = -.8785017929, r1__1_2 = .3491284937, r1__1_3 = .3261041166, r1__2_1 = .4347305027, r1__2_2 = .8672555961, r1__2_3 = .2426460819, r1__3_1 = -.1981009589, r1__3_2 = .3549324245, r1__3_3 = -.9136624016, t11 = -11.20139735, t12 = -13.01981734, t13 = 27.02745538]]

Solving a system of 18 polynomial equations in sagemath

Solving a system of 18 polynomial equations in sagemath

I'm trying to solve a system of 18 polynomial equations in sage. The system is for sure solvable since I already solved it in Maple and got ALL the possible solutions (only real solutions). In most cases I got between 10 to 20 solutions. But since Maple is not an open source I cannot really use it. I'm trying to solve the same equations in sage. but so far I did not succeed.

Since it's the first time I write here, I'm not allowed to attach the Maple and Sage code (two files) that I wanted to attach. Instead, I copied them bellow. It took Maple 25 minutes to solve the equations (in the code bellow). and it found 12 solutions to the equations (I wrote below all the 12 solutions that Maple found). I used the command 'Isolate' in Maple to solve the equations (this command is used for solving polynomial equations). Unfortunately I cannot know how the 'Isolate' command is implemented (I can use the command 'showstat' in Maple and see partial implementation of 'Isolate' since some of the commands that are used inside 'Isolate' are compiled). But I could see that 'Isolate' uses 'Groebner basis' in order to solve the equations. Therefore I tried to convert the 18 polynomial equations in sage to groebner basis using many implementations of groebner. None of them worked (they all never finished the running). Can anyone think of any way of solving these equations in sage? The goal is to get all the possible solutions (only real solutions not complex solutions) just like Maple did (meaning, I should get 12 solutions in this example).

In addition to Maple code, I also copied the commands I used for sage (that don't work). I used the same equations that Maple solved but only converted the coeffients to rational coeffients. I had to convert the coeffients to rational coeffients otherwise I could not use the groebner_basis command (got an error from sage: "Cannot allocate memory"). with rational coefficients I didn't get any error, but sage didn't return anything (it ran all night). Since I'm very new with sage, I hope that I'm probably missing other possible commands that can solve the 18 polynomial equations. Can anyone suggest any idea?

Thanks

Here is Maple code: (and below the code I copied sage's code)

restart;

g1_1_1:=r1__1_1^2+r1__1_2^2+r1__1_3^2-1;

g1_1_2:=r1__1_1r1__2_1+r1__1_2r1__2_2+r1__1_3*r1__2_3;

g1_1_3:=r1__1_1r1__3_1+r1__1_2r1__3_2+r1__1_3*r1__3_3;

g1_2_2:=r1__2_1^2+r1__2_2^2+r1__2_3^2-1;

g1_2_3:=r1__2_1r1__3_1+r1__2_2r1__3_2+r1__2_3*r1__3_3;

g1_3_3:=r1__3_1^2+r1__3_2^2+r1__3_3^2-1;

restart;

g1_1_1:=r1__1_1^2+r1__1_2^2+r1__1_3^2-1;

g1_1_2:=r1__1_1*r1__2_1+r1__1_2*r1__2_2+r1__1_3*r1__2_3;

g1_1_3:=r1__1_1*r1__3_1+r1__1_2*r1__3_2+r1__1_3*r1__3_3;

g1_2_2:=r1__2_1^2+r1__2_2^2+r1__2_3^2-1;

g1_2_3:=r1__2_1*r1__3_1+r1__2_2*r1__3_2+r1__2_3*r1__3_3;

g1_3_3:=r1__3_1^2+r1__3_2^2+r1__3_3^2-1;

diff_t11 := -3.542721406t13-3.724912516t12+10.49897373t11-126.0393573r1__3_3+38.92287358r1__3_2+41.58300396r1__3_1-115.7405279r1__2_3+18.37256417r1__2_2+12.44112743r1__2_1+312.5409456r1__1_3-32.14549799r1__1_2-51.60300031r1__1_1-85.16810712;

-3.542721406*t13-3.724912516*t12+10.49897373*t11-126.0393573*r1__3_3+38.92287358*r1__3_2+41.58300396*r1__3_1-115.7405279*r1__2_3+18.37256417*r1__2_2+12.44112743*r1__2_1+312.5409456*r1__1_3-32.14549799*r1__1_2-51.60300031*r1__1_1-85.16810712; diff_t12 := -3.303190071t13+9.263303829t12-3.724912516t11-98.27068398r1__3_3-3.873365259r1__3_2+35.21985498r1__3_1+361.3041416r1__2_3-65.50632175r1__2_2-106.2503999r1__2_1-115.7405279r1__1_3+18.37256416r1__1_2+12.44112745r1__1_1+144.3153710;

-3.303190071*t13+9.263303829*t12-3.724912516*t11-98.27068398*r1__3_3-3.873365259*r1__3_2+35.21985498*r1__3_1+361.3041416*r1__2_3-65.50632175*r1__2_2-106.2503999*r1__2_1-115.7405279*r1__1_3+18.37256416*r1__1_2+12.44112745*r1__1_1+144.3153710; diff_t13 := 12.23772244t13-3.303190071t12-3.542721406t11+25.14808453+368.9870707r1__3_3-94.90259936r1__3_2-41.17769572r1__3_1-98.27068398r1__2_3-3.873365259r1__2_2+35.21985495r1__2_1-126.0393573r1__1_3+38.92287357r1__1_2+41.58300396r1__1_1;

12.23772244*t13-3.303190071*t12-3.542721406*t11+25.14808453+368.9870707*r1__3_3-94.90259936*r1__3_2-41.17769572*r1__3_1-98.27068398*r1__2_3-3.873365259*r1__2_2+35.21985495*r1__2_1-126.0393573*r1__1_3+38.92287357*r1__1_2+41.58300396*r1__1_1; diff_r1__1_1 := 590.8703008+2b1__1_1r1__1_1+b1__1_2r1__2_1+b1__1_3r1__3_1+41.58300396t13+12.44112745t12-51.60300031t11+2102.554697r1__3_3-152.3287859r1__3_2-1043.099659r1__3_1+314.8874850r1__2_3+319.0237491r1__2_2-1200.302066r1__2_1-3746.497095r1__1_3-1648.667254r1__1_2+3410.304581r1__1_1;

590.8703008+2*b1__1_1*r1__1_1+b1__1_2*r1__2_1+b1__1_3*r1__3_1+41.58300396*t13+12.44112745*t12-51.60300031*t11+2102.554697*r1__3_3-152.3287859*r1__3_2-1043.099659*r1__3_1+314.8874850*r1__2_3+319.0237491*r1__2_2-1200.302066*r1__2_1-3746.497095*r1__1_3-1648.667254*r1__1_2+3410.304581*r1__1_1; diff_r1__2_1 := -3819.984156+b1__1_2r1__1_1+2b1__2_2r1__2_1+b1__2_3r1__3_1+35.21985495t13-106.2503999t12+12.44112743t11+1815.507541r1__3_3+666.8724957r1__3_2-1327.574321r1__3_1-5256.947355r1__2_3-28.73393065r1__2_2+2746.374847r1__2_1+314.8874851r1__1_3+319.0237489r1__1_2-1200.302066r1__1_1;

-3819.984156+b1__1_2*r1__1_1+2*b1__2_2*r1__2_1+b1__2_3*r1__3_1+35.21985495*t13-106.2503999*t12+12.44112743*t11+1815.507541*r1__3_3+666.8724957*r1__3_2-1327.574321*r1__3_1-5256.947355*r1__2_3-28.73393065*r1__2_2+2746.374847*r1__2_1+314.8874851*r1__1_3+319.0237489*r1__1_2-1200.302066*r1__1_1; diff_r1__3_1 := 4060.313965+b1__1_3r1__1_1+b1__2_3r1__2_1+2b1__3_3r1__3_1-41.17769572t13+35.21985498t12+41.58300396t11-2918.129645r1__3_3-741.4079842r1__3_2+3407.268818r1__3_1+1815.507541r1__2_3+666.8724958r1__2_2-1327.574321r1__2_1+2102.554696r1__1_3-152.3287858r1__1_2-1043.099659r1__1_1;

4060.313965+b1__1_3*r1__1_1+b1__2_3*r1__2_1+2*b1__3_3*r1__3_1-41.17769572*t13+35.21985498*t12+41.58300396*t11-2918.129645*r1__3_3-741.4079842*r1__3_2+3407.268818*r1__3_1+1815.507541*r1__2_3+666.8724958*r1__2_2-1327.574321*r1__2_1+2102.554696*r1__1_3-152.3287858*r1__1_2-1043.099659*r1__1_1; diff_r1__1_2 := -691.6096740+2b1__1_1r1__1_2+b1__1_2r1__2_2+b1__1_3r1__3_2+38.92287357t13+18.37256416t12-32.14549799t11+1087.842575r1__3_3-981.8708336r1__3_2-152.3287858r1__3_1-210.0268075r1__2_3-601.4685459r1__2_2+319.0237489r1__2_1+1514.592175r1__1_3+2302.700825r1__1_2-1648.667254r1__1_1;

-691.6096740+2*b1__1_1*r1__1_2+b1__1_2*r1__2_2+b1__1_3*r1__3_2+38.92287357*t13+18.37256416*t12-32.14549799*t11+1087.842575*r1__3_3-981.8708336*r1__3_2-152.3287858*r1__3_1-210.0268075*r1__2_3-601.4685459*r1__2_2+319.0237489*r1__2_1+1514.592175*r1__1_3+2302.700825*r1__1_2-1648.667254*r1__1_1; diff_r1__2_2 := -2365.895439+b1__1_2r1__1_2+2b1__2_2r1__2_2+b1__2_3r1__3_2-3.873365259t13-65.50632175t12+18.37256417t11-1068.477762r1__3_3-748.7401234r1__3_2+666.8724958r1__3_1-1303.778788r1__2_3+2481.505981r1__2_2-28.73393065r1__2_1-210.0268079r1__1_3-601.4685459r1__1_2+319.0237491r1__1_1;

-2365.895439+b1__1_2*r1__1_2+2*b1__2_2*r1__2_2+b1__2_3*r1__3_2-3.873365259*t13-65.50632175*t12+18.37256417*t11-1068.477762*r1__3_3-748.7401234*r1__3_2+666.8724958*r1__3_1-1303.778788*r1__2_3+2481.505981*r1__2_2-28.73393065*r1__2_1-210.0268079*r1__1_3-601.4685459*r1__1_2+319.0237491*r1__1_1; diff_r1__3_2 := -91.67373642+b1__1_3r1__1_2+b1__2_3r1__2_2+2b1__3_3r1__3_2-94.90259936t13-3.873365259t12+38.92287358t11-945.1329593r1__3_3+2520.662892r1__3_2-741.4079842r1__3_1-1068.477762r1__2_3-748.7401234r1__2_2+666.8724957r1__2_1+1087.842575r1__1_3-981.8708336r1__1_2-152.3287859r1__1_1;

-91.67373642+b1__1_3*r1__1_2+b1__2_3*r1__2_2+2*b1__3_3*r1__3_2-94.90259936*t13-3.873365259*t12+38.92287358*t11-945.1329593*r1__3_3+2520.662892*r1__3_2-741.4079842*r1__3_1-1068.477762*r1__2_3-748.7401234*r1__2_2+666.8724957*r1__2_1+1087.842575*r1__1_3-981.8708336*r1__1_2-152.3287859*r1__1_1; diff_r1__1_3 := 4702.012620+2b1__1_1r1__1_3+b1__1_2r1__2_3+b1__1_3r1__3_3-126.0393573t13-115.7405279t12+312.5409456t11-9148.480288r1__3_3+1087.842575r1__3_2+2102.554696r1__3_1-7724.631334r1__2_3-210.0268079r1__2_2+314.8874851r1__2_1+19057.83604r1__1_3+1514.592175r1__1_2-3746.497095r1__1_1;

4702.012620+2*b1__1_1*r1__1_3+b1__1_2*r1__2_3+b1__1_3*r1__3_3-126.0393573*t13-115.7405279*t12+312.5409456*t11-9148.480288*r1__3_3+1087.842575*r1__3_2+2102.554696*r1__3_1-7724.631334*r1__2_3-210.0268079*r1__2_2+314.8874851*r1__2_1+19057.83604*r1__1_3+1514.592175*r1__1_2-3746.497095*r1__1_1; diff_r1__2_3 := 6918.119675+b1__1_2r1__1_3+2b1__2_2r1__2_3+b1__2_3r1__3_3-98.27068398t13+361.3041416t12-115.7405279t11-5656.776960r1__3_3-1068.477762r1__3_2+1815.507541r1__3_1+25288.40206r1__2_3-1303.778788r1__2_2-5256.947355r1__2_1-7724.631334r1__1_3-210.0268075r1__1_2+314.8874850r1__1_1;

6918.119675+b1__1_2*r1__1_3+2*b1__2_2*r1__2_3+b1__2_3*r1__3_3-98.27068398*t13+361.3041416*t12-115.7405279*t11-5656.776960*r1__3_3-1068.477762*r1__3_2+1815.507541*r1__3_1+25288.40206*r1__2_3-1303.778788*r1__2_2-5256.947355*r1__2_1-7724.631334*r1__1_3-210.0268075*r1__1_2+314.8874850*r1__1_1; diff_r1__3_3 := -6160.643413+b1__1_3r1__1_3+b1__2_3r1__2_3+2b1__3_3r1__3_3+368.9870707t13-98.27068398t12-126.0393573t11+25503.13466r1__3_3-945.1329593r1__3_2-2918.129645r1__3_1-5656.776960r1__2_3-1068.477762r1__2_2+1815.507541r1__2_1-9148.480288r1__1_3+1087.842575r1__1_2+2102.554697r1__1_1;

-6160.643413+b1__1_3*r1__1_3+b1__2_3*r1__2_3+2*b1__3_3*r1__3_3+368.9870707*t13-98.27068398*t12-126.0393573*t11+25503.13466*r1__3_3-945.1329593*r1__3_2-2918.129645*r1__3_1-5656.776960*r1__2_3-1068.477762*r1__2_2+1815.507541*r1__2_1-9148.480288*r1__1_3+1087.842575*r1__1_2+2102.554697*r1__1_1; vars := [op(indets(h, And(name, Non(constant))))];

polysys:={g1_1_1,g1_1_2,g1_1_3,g1_2_2,g1_2_3,g1_3_3,diff_t11,diff_t12,diff_t13,diff_r1__1_1,diff_r1__1_2,diff_r1__1_3,diff_r1__2_1,diff_r1__2_2,diff_r1__2_3,diff_r1__3_1,diff_r1__3_2,diff_r1__3_3};

Non(constant))))]; polysys:={g1_1_1,g1_1_2,g1_1_3,g1_2_2,g1_2_3,g1_3_3,diff_t11,diff_t12,diff_t13,diff_r1__1_1,diff_r1__1_2,diff_r1__1_3,diff_r1__2_1,diff_r1__2_2,diff_r1__2_3,diff_r1__3_1,diff_r1__3_2,diff_r1__3_3}; sols := CodeTools:-Usage(RootFinding:-Isolate(polysys, vars, output = numeric, method = RS));

RS));

And this is sage code (that couldn't find the groebner basis):

P.<b1__1_1, b1__1_2,="" b1__1_3,="" b1__2_2,="" b1__2_3,="" b1__3_3,="" r1__1_1,="" r1__1_2,="" r1__1_3,="" r1__2_1,="" r1__2_2,="" r1__2_3,="" r1__3_1,="" r1__3_2,="" r1__3_3,="" t11,="" t12,="" t13="">=PolynomialRing(QQ,order='degrevlex')

b1__1_2, b1__1_3, b1__2_2, b1__2_3, b1__3_3, r1__1_1, r1__1_2, r1__1_3, r1__2_1, r1__2_2, r1__2_3, r1__3_1, r1__3_2, r1__3_3, t11, t12, t13>=PolynomialRing(QQ,order='degrevlex') g1_1_1 = r1__1_1^2+r1__1_2^2+r1__1_3^2-1

r1__1_1^2+r1__1_2^2+r1__1_3^2-1 g1_1_2 = r1__1_1r1__2_1+r1__1_2r1__2_2+r1__1_3*r1__2_3

r1__1_1*r1__2_1+r1__1_2*r1__2_2+r1__1_3*r1__2_3 g1_1_3 = r1__1_1r1__3_1+r1__1_2r1__3_2+r1__1_3*r1__3_3

r1__1_1*r1__3_1+r1__1_2*r1__3_2+r1__1_3*r1__3_3 g1_2_2 = r1__2_1^2+r1__2_2^2+r1__2_3^2-1

r1__2_1^2+r1__2_2^2+r1__2_3^2-1 g1_2_3 = r1__2_1r1__3_1+r1__2_2r1__3_2+r1__2_3*r1__3_3

r1__2_1*r1__3_1+r1__2_2*r1__3_2+r1__2_3*r1__3_3 g1_3_3 = r1__3_1^2+r1__3_2^2+r1__3_3^2-1

r1__3_1^2+r1__3_2^2+r1__3_3^2-1 diff_t11 = 74597r1__2_1(1/5996)-32999t12(1/8859)-47724t13(1/13471)-285739/3355+51151t11(1/4872)-227375r1__3_3(1/1804)+250313r1__3_2(1/6431)+21041r1__3_1(1/506)-946989r1__2_3(1/8182)+95225r1__2_2(1/5183)+270973r1__1_3(1/867)-201713r1__1_2(1/6275)-333665r1__1_1(1/6466)

74597*r1__2_1*(1/5996)-32999*t12*(1/8859)-47724*t13*(1/13471)-285739/3355+51151*t11*(1/4872)-227375*r1__3_3*(1/1804)+250313*r1__3_2*(1/6431)+21041*r1__3_1*(1/506)-946989*r1__2_3*(1/8182)+95225*r1__2_2*(1/5183)+270973*r1__1_3*(1/867)-201713*r1__1_2*(1/6275)-333665*r1__1_1*(1/6466) diff_t12 = -132813r1__2_1(1/1250)+86862t12(1/9377)-49495t13(1/14984)-32999t11(1/8859)-205484r1__3_3(1/2091)-101885r1__3_2(1/26304)+77695r1__3_1(1/2206)+305302r1__2_3(1/845)-336768r1__2_2(1/5141)-946989r1__1_3(1/8182)+95225r1__1_2(1/5183)+74597r1__1_1(1/5996)+163365/1132

-132813*r1__2_1*(1/1250)+86862*t12*(1/9377)-49495*t13*(1/14984)-32999*t11*(1/8859)-205484*r1__3_3*(1/2091)-101885*r1__3_2*(1/26304)+77695*r1__3_1*(1/2206)+305302*r1__2_3*(1/845)-336768*r1__2_2*(1/5141)-946989*r1__1_3*(1/8182)+95225*r1__1_2*(1/5183)+74597*r1__1_1*(1/5996)+163365/1132 diff_t13 = 77695r1__2_1(1/2206)-49495t12(1/14984)+17194t13(1/1405)-47724t11(1/13471)+827638r1__3_3(1/2243)-303024r1__3_2(1/3193)-189788r1__3_1(1/4609)-205484r1__2_3(1/2091)-71971r1__2_2(1/18581)-227375r1__1_3(1/1804)+338629r1__1_2(1/8700)+21041r1__1_1(1/506)+43984/1749

77695*r1__2_1*(1/2206)-49495*t12*(1/14984)+17194*t13*(1/1405)-47724*t11*(1/13471)+827638*r1__3_3*(1/2243)-303024*r1__3_2*(1/3193)-189788*r1__3_1*(1/4609)-205484*r1__2_3*(1/2091)-71971*r1__2_2*(1/18581)-227375*r1__1_3*(1/1804)+338629*r1__1_2*(1/8700)+21041*r1__1_1*(1/506)+43984/1749 diff_r1__1_1 = -(754990/629)r1__2_1+(74597/5996)t12+(21041/506)t13-(333665/6466)t11+(1364558/649)r1__3_3-(111657/733)r1__3_2-(1224599/1174)r1__3_1+(249076/791)r1__2_3+(376129/1179)r1__2_2-(1288795/344)r1__1_3-(936443/568)r1__1_2+(1265223/371)r1__1_1+1084247/1835+2b1__1_1r1__1_1+b1__1_2r1__2_1+b1__1_3r1__3_1

-(754990/629)*r1__2_1+(74597/5996)*t12+(21041/506)*t13-(333665/6466)*t11+(1364558/649)*r1__3_3-(111657/733)*r1__3_2-(1224599/1174)*r1__3_1+(249076/791)*r1__2_3+(376129/1179)*r1__2_2-(1288795/344)*r1__1_3-(936443/568)*r1__1_2+(1265223/371)*r1__1_1+1084247/1835+2*b1__1_1*r1__1_1+b1__1_2*r1__2_1+b1__1_3*r1__3_1 diff_r1__2_1 = (2227310/811)r1__2_1-(132813/1250)t12+(77695/2206)t13-1929092/505+(74597/5996)t11+b1__1_2r1__1_1+2b1__2_2r1__2_1+b1__2_3r1__3_1+(2046077/1127)r1__3_3+(366113/549)r1__3_2-(1509452/1137)r1__3_1-(20570435/3913)r1__2_3-(240503/8370)r1__2_2+(772419/2453)r1__1_3+(376129/1179)r1__1_2-(754990/629)r1__1_1

(2227310/811)*r1__2_1-(132813/1250)*t12+(77695/2206)*t13-1929092/505+(74597/5996)*t11+b1__1_2*r1__1_1+2*b1__2_2*r1__2_1+b1__2_3*r1__3_1+(2046077/1127)*r1__3_3+(366113/549)*r1__3_2-(1509452/1137)*r1__3_1-(20570435/3913)*r1__2_3-(240503/8370)*r1__2_2+(772419/2453)*r1__1_3+(376129/1179)*r1__1_2-(754990/629)*r1__1_1 diff_r1__3_1 = b1__1_3r1__1_1+b1__2_3r1__2_1+2b1__3_3r1__3_1-(1509452/1137)r1__2_1+(77695/2206)t12-(189788/4609)t13+3284794/809+(21041/506)t11-(3218697/1103)r1__3_3-(761426/1027)r1__3_2+(316876/93)r1__3_1+(2046077/1127)r1__2_3+(366113/549)r1__2_2+(1364558/649)r1__1_3-(111657/733)r1__1_2-(1224599/1174)r1__1_1

b1__1_3*r1__1_1+b1__2_3*r1__2_1+2*b1__3_3*r1__3_1-(1509452/1137)*r1__2_1+(77695/2206)*t12-(189788/4609)*t13+3284794/809+(21041/506)*t11-(3218697/1103)*r1__3_3-(761426/1027)*r1__3_2+(316876/93)*r1__3_1+(2046077/1127)*r1__2_3+(366113/549)*r1__2_2+(1364558/649)*r1__1_3-(111657/733)*r1__1_2-(1224599/1174)*r1__1_1 diff_r1__1_2 = (376129/1179)r1__2_1+(95225/5183)t12+(338629/8700)t13-614841/889+2b1__1_1r1__1_2+b1__1_2r1__2_2+b1__1_3r1__3_2-(201713/6275)t11+(608104/559)r1__3_3-(235649/240)r1__3_2-(111657/733)r1__3_1-(258543/1231)r1__2_3-(1749672/2909)r1__2_2+(2012893/1329)r1__1_3+(3640570/1581)r1__1_2-(936443/568)r1__1_1

(376129/1179)*r1__2_1+(95225/5183)*t12+(338629/8700)*t13-614841/889+2*b1__1_1*r1__1_2+b1__1_2*r1__2_2+b1__1_3*r1__3_2-(201713/6275)*t11+(608104/559)*r1__3_3-(235649/240)*r1__3_2-(111657/733)*r1__3_1-(258543/1231)*r1__2_3-(1749672/2909)*r1__2_2+(2012893/1329)*r1__1_3+(3640570/1581)*r1__1_2-(936443/568)*r1__1_1 diff_r1__2_2 = b1__1_2r1__1_2+2b1__2_2r1__2_2+b1__2_3r1__3_2-(240503/8370)r1__2_1-(336768/5141)t12-(71971/18581)t13-1244461/526+(95225/5183)t11-(744729/697)r1__3_3-(852815/1139)r1__3_2+(366113/549)r1__3_1-(430247/330)r1__2_3+(1451681/585)r1__2_2-(336883/1604)r1__1_3-(1749672/2909)r1__1_2+(376129/1179)r1__1_1

b1__1_2*r1__1_2+2*b1__2_2*r1__2_2+b1__2_3*r1__3_2-(240503/8370)*r1__2_1-(336768/5141)*t12-(71971/18581)*t13-1244461/526+(95225/5183)*t11-(744729/697)*r1__3_3-(852815/1139)*r1__3_2+(366113/549)*r1__3_1-(430247/330)*r1__2_3+(1451681/585)*r1__2_2-(336883/1604)*r1__1_3-(1749672/2909)*r1__1_2+(376129/1179)*r1__1_1 diff_r1__3_2 = (366113/549)r1__2_1-(101885/26304)t12-(303024/3193)t13+b1__1_3r1__1_2+b1__2_3r1__2_2+2b1__3_3r1__3_2+(250313/6431)t11-(1350595/1429)r1__3_3+(889794/353)r1__3_2-(761426/1027)r1__3_1-(744729/697)r1__2_3-(852815/1139)r1__2_2+(608104/559)r1__1_3-(235649/240)r1__1_2-(111657/733)r1__1_1-203149/2216

(366113/549)*r1__2_1-(101885/26304)*t12-(303024/3193)*t13+b1__1_3*r1__1_2+b1__2_3*r1__2_2+2*b1__3_3*r1__3_2+(250313/6431)*t11-(1350595/1429)*r1__3_3+(889794/353)*r1__3_2-(761426/1027)*r1__3_1-(744729/697)*r1__2_3-(852815/1139)*r1__2_2+(608104/559)*r1__1_3-(235649/240)*r1__1_2-(111657/733)*r1__1_1-203149/2216 diff_r1__1_3 = (772419/2453)r1__2_1-(946989/8182)t12-(227375/1804)t13+(270973/867)t11-(2552426/279)r1__3_3+(608104/559)r1__3_2+(1364558/649)r1__3_1-(1676245/217)r1__2_3-(336883/1604)r1__2_2+(1162528/61)r1__1_3+(2012893/1329)r1__1_2-(1288795/344)r1__1_1+1490538/317+2b1__1_1r1__1_3+b1__1_2r1__2_3+b1__1_3r1__3_3

(772419/2453)*r1__2_1-(946989/8182)*t12-(227375/1804)*t13+(270973/867)*t11-(2552426/279)*r1__3_3+(608104/559)*r1__3_2+(1364558/649)*r1__3_1-(1676245/217)*r1__2_3-(336883/1604)*r1__2_2+(1162528/61)*r1__1_3+(2012893/1329)*r1__1_2-(1288795/344)*r1__1_1+1490538/317+2*b1__1_1*r1__1_3+b1__1_2*r1__2_3+b1__1_3*r1__3_3 diff_r1__2_3 = -(20570435/3913)r1__2_1+(305302/845)t12-(205484/2091)t13-(946989/8182)t11-(2307965/408)r1__3_3-(744729/697)r1__3_2+(2046077/1127)r1__3_1+(2452975/97)r1__2_3-(430247/330)r1__2_2-(1676245/217)r1__1_3-(258543/1231)r1__1_2+(249076/791)r1__1_1+2601213/376+b1__1_2r1__1_3+2b1__2_2r1__2_3+b1__2_3r1__3_3

-(20570435/3913)*r1__2_1+(305302/845)*t12-(205484/2091)*t13-(946989/8182)*t11-(2307965/408)*r1__3_3-(744729/697)*r1__3_2+(2046077/1127)*r1__3_1+(2452975/97)*r1__2_3-(430247/330)*r1__2_2-(1676245/217)*r1__1_3-(258543/1231)*r1__1_2+(249076/791)*r1__1_1+2601213/376+b1__1_2*r1__1_3+2*b1__2_2*r1__2_3+b1__2_3*r1__3_3 diff_r1__3_3 = (2046077/1127)r1__2_1-(205484/2091)t12+(827638/2243)t13-794723/129-(227375/1804)t11+b1__1_3r1__1_3+b1__2_3r1__2_3+2b1__3_3r1__3_3+(7574431/297)r1__3_3-(1350595/1429)r1__3_2-(3218697/1103)r1__3_1-(2307965/408)r1__2_3-(744729/697)r1__2_2-(2552426/279)r1__1_3+(608104/559)r1__1_2+(1364558/649)r1__1_1

(2046077/1127)*r1__2_1-(205484/2091)*t12+(827638/2243)*t13-794723/129-(227375/1804)*t11+b1__1_3*r1__1_3+b1__2_3*r1__2_3+2*b1__3_3*r1__3_3+(7574431/297)*r1__3_3-(1350595/1429)*r1__3_2-(3218697/1103)*r1__3_1-(2307965/408)*r1__2_3-(744729/697)*r1__2_2-(2552426/279)*r1__1_3+(608104/559)*r1__1_2+(1364558/649)*r1__1_1 I=Ideal(g1_1_1, g1_1_2, g1_1_3, g1_2_2, g1_2_3, g1_3_3, diff_t11, diff_t12, diff_t13, diff_r1__1_1, diff_r1__2_1, diff_r1__3_1, diff_r1__1_2, diff_r1__2_2, diff_r1__3_2, diff_r1__1_3, diff_r1__2_3, diff_r1__3_3)

I.groebner_basis()

I.variety(RR)

diff_r1__3_3) I.groebner_basis() I.variety(RR)

And these are the 12 solutions the Maple found (all the real solutions that solve the equations): The goal is to get the same solutions from sage.

[[b1__1_1 = -899.5942504, b1__1_2 = 3037.238105, b1__1_3 = -3600.559806, b1__2_2 = -1064.022119, b1__2_3 = 889.3168953, b1__3_3 = -2555.002632, r1__1_1 = .7481491832, r1__1_2 = .6388182437, r1__1_3 = .1793991396, r1__2_1 = -.6472289487, r1__2_2 = .7621522200, r1__2_3 = -0.1478788196e-1, r1__3_1 = -.1461762213, r1__3_2 = -.1050487747, r1__3_3 = .9836652211, t11 = .1547590859, t12 = -20.00614350, t13 = -39.11689082],

-39.11689082], [b1__1_1 = -2536.737834, b1__1_2 = -384.6438623, b1__1_3 = 2968.302582, b1__2_2 = 206.1653350, b1__2_3 = -4119.641687, b1__3_3 = -2528.112061, r1__1_1 = .3433731644, r1__1_2 = -.9364692403, r1__1_3 = -0.7155579556e-1, r1__2_1 = .8767823107, r1__2_2 = .2923108835, r1__2_3 = .3818469942, r1__3_1 = -.3366714267, r1__3_2 = -.1938548665, r1__3_3 = .9214513775, t11 = 8.655455565, t12 = -14.90305773, t13 = -32.28108776],

[b1__1_1 = -2672.661895, b1__1_2 = 5518.566630, b1__1_3 = 194.0920868, b1__2_2 = -1264.096636, b1__2_3 = -39.30164061, b1__3_3 = -3167.161180, r1__1_1 = .6407595964, r1__1_2 = .1199696331, r1__1_3 = -.7583102444, r1__2_1 = -.1297813989, r1__2_2 = .9904267144, r1__2_3 = 0.4702884205e-1, r1__3_1 = .7566927568, r1__3_2 = 0.6828038249e-1, r1__3_3 = .6501952485, t11 = 21.88635414, t12 = -19.14986568, t13 = -26.72096477],

[b1__1_1 = -2415.819809, b1__1_2 = -247.8725031, b1__1_3 = -81.80497732, b1__2_2 = 578.5002146, b1__2_3 = -3308.869199, b1__3_3 = -632.2913675, r1__1_1 = .5855751733, r1__1_2 = -.6602102503, r1__1_3 = .4703447053, r1__2_1 = .5367090123, r1__2_2 = .7506041613, r1__2_3 = .3854047601, r1__3_1 = -.6074908662, r1__3_2 = 0.2675478306e-1, r1__3_3 = .7938759532, t11 = -4.150377642, t12 = -12.85905997, t13 = -25.75853354],

[b1__1_1 = 305.8128664, b1__1_2 = 1219.200904, b1__1_3 = -4379.467945, b1__2_2 = -1232.280299, b1__2_3 = 1920.610983, b1__3_3 = -1454.259739, r1__1_1 = .4050262785, r1__1_2 = .2045666996, r1__1_3 = -.8911263542, r1__2_1 = -.7397436412, r1__2_2 = -.4994839335, r1__2_3 = -.4508826294, r1__3_1 = .5373388680, r1__3_2 = -.8418243674, r1__3_3 = 0.5097720352e-1, t11 = 19.84743424, t12 = -23.75250545, t13 = -21.83242508],

[b1__1_1 = -2561.237930, b1__1_2 = 5363.493736, b1__1_3 = -370.0386489, b1__2_2 = -1179.131772, b1__2_3 = 977.8467630, b1__3_3 = -2792.263176, r1__1_1 = .4494018895, r1__1_2 = 0.2797468228e-1, r1__1_3 = -.8928915717, r1__2_1 = -.2109820307, r1__2_2 = .9745577061, r1__2_3 = -0.7565619745e-1, r1__3_1 = .8680579038, r1__3_2 = .2223841151, r1__3_3 = .4438702298, t11 = 24.07022969, t12 = -15.38154019, t13 = -18.48056832],

[b1__1_1 = 549.2162023, b1__1_2 = 87.77137600, b1__1_3 = -1198.811469, b1__2_2 = -495.0197371, b1__2_3 = -1765.778607, b1__3_3 = 676.3321754, r1__1_1 = -.3382824498, r1__1_2 = .1447284170, r1__1_3 = -.9298487347, r1__2_1 = .8458105804, r1__2_2 = -.3863831243, r1__2_3 = -.3678485331, r1__3_1 = -.4125159951, r1__3_2 = -.9109126010, r1__3_3 = 0.8293803447e-2, t11 = 30.93253221, t12 = 2.460529285, t13 = -15.53626680],

[b1__1_1 = -1223.590670, b1__1_2 = 1841.223573, b1__1_3 = 4119.421790, b1__2_2 = 671.1576084, b1__2_3 = -1371.054802, b1__3_3 = -903.8038187, r1__1_1 = -.4128628600, r1__1_2 = -0.7780371756e-1, r1__1_3 = -.9074639609, r1__2_1 = .2440176361, r1__2_2 = .9504710646, r1__2_3 = -.1925101259, r1__3_1 = -.8774962405, r1__3_2 = .3009174918, r1__3_3 = .3734287229, t11 = 34.69684826, t12 = 8.155443592, t13 = -11.33088510],

[b1__1_1 = -6327.273294, b1__1_2 = 1759.073834, b1__1_3 = 11207.90070, b1__2_2 = -1890.858242, b1__2_3 = 1891.950907, b1__3_3 = -9760.176346, r1__1_1 = .3766394529, r1__1_2 = -.6180780439, r1__1_3 = .6900161260, r1__2_1 = -.7796490396, r1__2_2 = -.6137728279, r1__2_3 = -.1242187218, r1__3_1 = .5002900135, r1__3_2 = -.4911847385, r1__3_3 = -.7130550154, t11 = -29.31512316, t12 = -33.00946996, t13 = 8.767454469],

[b1__1_1 = -3304.385960, b1__1_2 = -4044.369886, b1__1_3 = 10477.87582, b1__2_2 = -1108.617283, b1__2_3 = 5826.342875, b1__3_3 = -9844.297818, r1__1_1 = -.5741762462, r1__1_2 = -.7368503356, r1__1_3 = .3568938514, r1__2_1 = .7828801205, r1__2_2 = -.3665428545, r1__2_3 = .5027375585, r1__3_1 = .2396254476, r1__3_2 = -.5680650656, r1__3_3 = -.7873256798, t11 = -18.36435913, t12 = -34.30593158, t13 = 13.14730960],

[b1__1_1 = -6612.907618, b1__1_2 = 2424.756675, b1__1_3 = 12384.95493, b1__2_2 = -1691.366479, b1__2_3 = 2578.504868, b1__3_3 = -9210.975576, r1__1_1 = .5157887216, r1__1_2 = .4217561249, r1__1_3 = .7457102425, r1__2_1 = -.4865104064, r1__2_2 = .8606564397, r1__2_3 = -.1502601654, r1__3_1 = .7051734674, r1__3_2 = .2852932946, r1__3_3 = -.6491056285, t11 = -24.37008827, t12 = -14.94325716, t13 = 16.06559316],

[b1__1_1 = -4846.263193, b1__1_2 = -3105.528126, b1__1_3 = 12948.69518, b1__2_2 = -279.0100568, b1__2_3 = 4363.645053, b1__3_3 = -9431.494358, r1__1_1 = -.8785017929, r1__1_2 = .3491284937, r1__1_3 = .3261041166, r1__2_1 = .4347305027, r1__2_2 = .8672555961, r1__2_3 = .2426460819, r1__3_1 = -.1981009589, r1__3_2 = .3549324245, r1__3_3 = -.9136624016, t11 = -11.20139735, t12 = -13.01981734, t13 = 27.02745538]]

27.02745538]]

Solving a system of 18 polynomial equations in sagemath

Solving a system of 18 polynomial equations in sagemath

I'm trying to solve a system of 18 polynomial equations in sage. The system is for sure solvable since I already solved it in Maple and got ALL the possible solutions (only real solutions). In most cases I got between 10 to 20 25 solutions. But since Maple is not an open source I cannot really use it. I'm trying to solve the same equations in sage. but so far I did not succeed.

Since it's the first time I write here, I'm not allowed to attach the Maple and Sage code (two files) that I wanted to attach. Instead, I copied them bellow. It took Maple 25 minutes to solve the equations (in the code bellow). and it found 12 22 solutions to the equations (I wrote below all the 12 22 solutions that Maple found). I used the command 'Isolate' in Maple to solve the equations (this command is used for solving polynomial equations). Unfortunately I cannot know how the 'Isolate' command is implemented (I can use the command 'showstat' in Maple and see partial implementation of 'Isolate' since some of the commands that are used inside 'Isolate' are compiled). But I could see that 'Isolate' uses 'Groebner basis' in order to solve the equations. Therefore I tried to convert the 18 polynomial equations in sage to groebner basis using many implementations but for some reason all I get is a single solution (for groebner basis) which is [1.0000000]. I suspect that the reason for that is that the coefficients are real numbers and not rational numbers. But I did not find any command in sage that converts expression of groebner. None real coefficients into expression of them worked (they all never finished the running). Can anyone think of any way of solving these rational coefficients. Anyone knows how to solve the 18 equations in sage? The goal sagemath (and to get exactly the 22 solutions that Maple found)?

I'm attaching bellow both Maple's code (that succeeded to solve the equations) and Sage's code (that did not succeed). I'd appreciate any idea of how to solve the equations.

If it helps, here's the mathematical problem that I'm trying to solve: given a set of n 3D points P={p_1,p_2,...,p_n} and another set of n 3D lines H={h_1,h_2,...,h_n} (each line h_i is to get represented by a 3D point and a 3D unit vector). I'm trying to find the rotation matrix R=[r1,r2,r3;r4,r5,r6;r7,r8,r9] and a translation vector T=[t1,t2,t3] such that rotating the set P by R and then translating it by T will result in a new set of points PT={pt_1,...,pt_n} such that the sum of square distances between H and PT (sum_{i=1 to n}(dist(h_i,pt_i)^2)) will be minimal. So this is an optimization problem with constraints (the constraints are RR^T=I). so there are 12 variables in R and T. Using Lagrange Multipliers algorithm I added 6 more variables b1,...,b6 (the number of constraints from RR^T=I) and created a new function 'h' with 18 variables. the 18 equations are the derivation of 'h' by all the possible 18 variables (equal to zero). it is gurantee that one of the solutions (only real to the 18 equations is the (global) minimum for R and T. but for that I have to find ALL the solutions not complex solutions) to the equations (22 solutions in this example) just like Maple did (meaning, I should get 12 solutions in this example).

In addition to Maple code, I also copied the commands I used for sage (that don't work). I used the same equations that Maple solved but only converted the coeffients to rational coeffients. I had to convert the coeffients to rational coeffients otherwise I could not use the groebner_basis command (got an error from sage: "Cannot allocate memory"). with rational coefficients I didn't get any error, but sage didn't return anything (it ran all night). Since I'm very new with sage, I hope that I'm probably missing other possible commands that can solve the 18 polynomial equations. Can anyone suggest any idea?did.

Thanks

Here is Maple code: (and below the code I copied sage's code)

restart;

g1_1_1:=r1__1_1^2+r1__1_2^2+r1__1_3^2-1;

g1_1_2:=r1__1_1*r1__2_1+r1__1_2*r1__2_2+r1__1_3*r1__2_3;

g1_1_3:=r1__1_1*r1__3_1+r1__1_2*r1__3_2+r1__1_3*r1__3_3;

g1_2_2:=r1__2_1^2+r1__2_2^2+r1__2_3^2-1;

g1_2_3:=r1__2_1*r1__3_1+r1__2_2*r1__3_2+r1__2_3*r1__3_3;

g1_3_3:=r1__3_1^2+r1__3_2^2+r1__3_3^2-1;

diff_t11 := -3.542721406*t13-3.724912516*t12+10.49897373*t11-126.0393573*r1__3_3+38.92287358*r1__3_2+41.58300396*r1__3_1-115.7405279*r1__2_3+18.37256417*r1__2_2+12.44112743*r1__2_1+312.5409456*r1__1_3-32.14549799*r1__1_2-51.60300031*r1__1_1-85.16810712;

diff_t12 := -3.303190071*t13+9.263303829*t12-3.724912516*t11-98.27068398*r1__3_3-3.873365259*r1__3_2+35.21985498*r1__3_1+361.3041416*r1__2_3-65.50632175*r1__2_2-106.2503999*r1__2_1-115.7405279*r1__1_3+18.37256416*r1__1_2+12.44112745*r1__1_1+144.3153710;

diff_t13 := 12.23772244*t13-3.303190071*t12-3.542721406*t11+25.14808453+368.9870707*r1__3_3-94.90259936*r1__3_2-41.17769572*r1__3_1-98.27068398*r1__2_3-3.873365259*r1__2_2+35.21985495*r1__2_1-126.0393573*r1__1_3+38.92287357*r1__1_2+41.58300396*r1__1_1;

diff_r1__1_1 := 590.8703008+2*b1__1_1*r1__1_1+b1__1_2*r1__2_1+b1__1_3*r1__3_1+41.58300396*t13+12.44112745*t12-51.60300031*t11+2102.554697*r1__3_3-152.3287859*r1__3_2-1043.099659*r1__3_1+314.8874850*r1__2_3+319.0237491*r1__2_2-1200.302066*r1__2_1-3746.497095*r1__1_3-1648.667254*r1__1_2+3410.304581*r1__1_1;

diff_r1__2_1 := -3819.984156+b1__1_2*r1__1_1+2*b1__2_2*r1__2_1+b1__2_3*r1__3_1+35.21985495*t13-106.2503999*t12+12.44112743*t11+1815.507541*r1__3_3+666.8724957*r1__3_2-1327.574321*r1__3_1-5256.947355*r1__2_3-28.73393065*r1__2_2+2746.374847*r1__2_1+314.8874851*r1__1_3+319.0237489*r1__1_2-1200.302066*r1__1_1;

diff_r1__3_1 := 4060.313965+b1__1_3*r1__1_1+b1__2_3*r1__2_1+2*b1__3_3*r1__3_1-41.17769572*t13+35.21985498*t12+41.58300396*t11-2918.129645*r1__3_3-741.4079842*r1__3_2+3407.268818*r1__3_1+1815.507541*r1__2_3+666.8724958*r1__2_2-1327.574321*r1__2_1+2102.554696*r1__1_3-152.3287858*r1__1_2-1043.099659*r1__1_1;

diff_r1__1_2 := -691.6096740+2*b1__1_1*r1__1_2+b1__1_2*r1__2_2+b1__1_3*r1__3_2+38.92287357*t13+18.37256416*t12-32.14549799*t11+1087.842575*r1__3_3-981.8708336*r1__3_2-152.3287858*r1__3_1-210.0268075*r1__2_3-601.4685459*r1__2_2+319.0237489*r1__2_1+1514.592175*r1__1_3+2302.700825*r1__1_2-1648.667254*r1__1_1;

diff_r1__2_2 := -2365.895439+b1__1_2*r1__1_2+2*b1__2_2*r1__2_2+b1__2_3*r1__3_2-3.873365259*t13-65.50632175*t12+18.37256417*t11-1068.477762*r1__3_3-748.7401234*r1__3_2+666.8724958*r1__3_1-1303.778788*r1__2_3+2481.505981*r1__2_2-28.73393065*r1__2_1-210.0268079*r1__1_3-601.4685459*r1__1_2+319.0237491*r1__1_1;

diff_r1__3_2 := -91.67373642+b1__1_3*r1__1_2+b1__2_3*r1__2_2+2*b1__3_3*r1__3_2-94.90259936*t13-3.873365259*t12+38.92287358*t11-945.1329593*r1__3_3+2520.662892*r1__3_2-741.4079842*r1__3_1-1068.477762*r1__2_3-748.7401234*r1__2_2+666.8724957*r1__2_1+1087.842575*r1__1_3-981.8708336*r1__1_2-152.3287859*r1__1_1;

diff_r1__1_3 := 4702.012620+2*b1__1_1*r1__1_3+b1__1_2*r1__2_3+b1__1_3*r1__3_3-126.0393573*t13-115.7405279*t12+312.5409456*t11-9148.480288*r1__3_3+1087.842575*r1__3_2+2102.554696*r1__3_1-7724.631334*r1__2_3-210.0268079*r1__2_2+314.8874851*r1__2_1+19057.83604*r1__1_3+1514.592175*r1__1_2-3746.497095*r1__1_1;

diff_r1__2_3 := 6918.119675+b1__1_2*r1__1_3+2*b1__2_2*r1__2_3+b1__2_3*r1__3_3-98.27068398*t13+361.3041416*t12-115.7405279*t11-5656.776960*r1__3_3-1068.477762*r1__3_2+1815.507541*r1__3_1+25288.40206*r1__2_3-1303.778788*r1__2_2-5256.947355*r1__2_1-7724.631334*r1__1_3-210.0268075*r1__1_2+314.8874850*r1__1_1;

diff_r1__3_3 := -6160.643413+b1__1_3*r1__1_3+b1__2_3*r1__2_3+2*b1__3_3*r1__3_3+368.9870707*t13-98.27068398*t12-126.0393573*t11+25503.13466*r1__3_3-945.1329593*r1__3_2-2918.129645*r1__3_1-5656.776960*r1__2_3-1068.477762*r1__2_2+1815.507541*r1__2_1-9148.480288*r1__1_3+1087.842575*r1__1_2+2102.554697*r1__1_1;

g1:=r1^2+r4^2+r7^2-1;
g2:=r1*r2+r4*r5+r7*r8;
g3:=r1*r3+r4*r6+r7*r9;
g4:=r2^2+r5^2+r8^2-1;
g5:=r2*r3+r5*r6+r8*r9;
g6:=r3^2+r6^2+r9^2-1;
sum_sqr_distances:=(-34.5792590705286*r1+17.0635530183776*r4-2.30671047587914*r7+.533429751140582*t1-18.2777571201152+5.34368522421251*r2-2.6369060119417*r5+.356466130795291*r8-.0824332491501039*t2+31.8951297362284*r3-15.7390369840122*r6+2.12765778880161*r9-.492023587996135*t3)^2+(-63.880273658711*r2+31.5224925463221*r5-4.26132023642126*r8+.98543576110074*t2+5.20415366982094+5.34368522429473*r1-2.63690601164137*r4+.356466130730839*r7-.0824332491771907*t1+5.63520538121055*r3-2.78076015494726*r6+.375912834341308*r9-.0869303242748373*t3)^2+(-31.1892504431195*r3+15.3907123123387*r6-2.08057004842228*r9+.481134487803446*t3+16.460313265992+31.8951297380977*r1-15.7390369788429*r4+2.12765778852522*r7-.492023588007365*t1+5.63520538145412*r2-2.78076015435067*r5+.375912834360444*r8-.086930324248257*t2)^2+(-20.1477543311821*r1+7.55350991666248*r4+20.8920429846501*r7+.506802937949341*t1-13.5125935907312+7.82881106057577*r2-2.9350666574299*r5-8.1180192368411*r8-.19692837123503*t2+18.2686582928059*r3-6.84902591482382*r6-18.9435302828672*r9-.459535566231505*t3)^2+(-36.6286508786965*r2+13.7322935856179*r5+37.9817688885839*r8+.921368583909397*t2-34.3325081149272+7.82881105959312*r1-2.93506665641182*r4-8.11801923407865*r7-.196928371252735*t1+7.29448206284227*r3-2.7347436184352*r6-7.56395131161327*r9-.183487691946913*t3)^2+(-22.7328194787774*r3+8.52266582628087*r6+23.5726043680174*r9+.5718284781815*t3+29.2151845257836+18.2686582944502*r1-6.84902591329222*r4-18.9435302865599*r7-.459535566194367*t1+7.2944820644144*r2-2.73474361877224*r5-7.56395131566163*r8-.183487691915587*t2)^2+(-33.7370053449296*r1+38.9258336170637*r4-60.1132663033064*r7+.996042632734926*t1-4.98803179031169+1.08999592941726*r2-1.25763978603382*r5+1.94217639880877*r8-.0321807583045741*t2+1.8259306385537*r3-2.10676292990297*r6+3.25347948355056*r9-.0539083045951421*t3)^2+(-25.0073507347857*r2+28.8535382444551*r5-44.5585943124607*r8+.738310564652533*t2+4.93804814541239+1.08999592907818*r1-1.25763978578301*r4+1.94217639918338*r7-.0321807583046471*t1+14.8482131236429*r3-17.1319021236029*r6+26.4568411007238*r9-.438374809459876*t3)^2+(-8.9977349393474*r3+10.3816070715198*r6-16.0323428536159*r9+.265646802616713*t3-2.58161819993127+1.82593063830369*r1-2.1067629296129*r4+3.25347948341273*r7-.0539083045952243*t1+14.8482131262288*r2-17.1319021246606*r5+26.4568410945*r8-.438374809459549*t2)^2+(-56.6725654800191*r1-43.1813795970078*r4-58.3887310201578*r7+.980525398272198*t1+49.0916863573367+5.78296846451955*r2+4.40630407967054*r5+5.95808902028457*r8-.100054539766321*t2+5.50887455808305*r3+4.19745958942679*r6+5.67569496876523*r9-.0953122798368383*t3)^2+(-28.0870406673401*r2-21.400781038534*r5-28.937575861748*r8+.48595041543225*t2+19.4018945247715+5.78296846409823*r1+4.40630407900952*r4+5.95808902050728*r7-.100054539765808*t1+28.302910438969*r3+21.5652619383799*r6+29.1599826218892*r9-.489685305322089*t3)^2+(-30.836717169852*r3-23.4958833859599*r6-31.7705184032215*r9+.533524186319051*t3-30.3978529558191+5.50887455772671*r1+4.19745958933706*r4+5.67569496903033*r7-.0953122798304703*t1+28.3029104392002*r2+21.5652619411541*r5+29.1599826221612*r8-.489685305291881*t2)^2+(-57.8205382202822*r1-33.3924384768228*r4-34.894277849845*r7+.850839830317679*t1-12.5672620764049+10.7191476042258*r2+6.19050752309509*r5+6.46892827657879*r8-.157734223996209*t2+21.7070640341081*r3+12.5362340547815*r6+13.1000566054682*r9-.319423430626817*t3)^2+(-56.6217108878986*r2-32.7000933511969*r5-34.1707942023208*r8+.833198866184046*t2-1.62153141633832+10.7191476020505*r1+6.19050752434099*r4+6.46892827744991*r7-.15773422401843*t1+22.9548337765416*r3+13.2568443369017*r6+13.8530766468144*r9-.337784591359295*t3)^2+(-21.4717881919623*r3-12.4003578706288*r6-12.9580693345224*r9+.315961303486945*t3+6.66922254237138+21.7070640313443*r1+12.5362340557455*r4+13.1000566039334*r7-.319423430651098*t1+22.9548337782773*r2+13.2568443352531*r5+13.8530766433259*r8-.337784591337385*t2)^2+(-65.9377723150761*r1-12.678533244879*r4-65.0293030974106*r7+.955841723390729*t1+11.5835324790697+7.68982596884022*r2+1.47860188124137*r5+7.5838780437921*r8-.111472624096221*t2+11.9049207597142*r3+2.28908148248606*r6+11.7408986260292*r9-.17257513524552*t3)^2+(-49.571881779333*r2-9.53169524975009*r5-48.8888964859373*r8+.718599844159693*t2+14.0432100287845+7.6898259693682*r1+1.47860188123288*r4+7.58387804187672*r7-.111472624065637*t1+30.0526392395535*r3+5.77852985094098*r6+29.6385837317152*r9-.435646602436962*t3)^2+(-22.4583184276267*r3-4.31829173040524*r6-22.1488950108346*r9+.32555843242268*t3-12.0350031966363+11.904920759546*r1+2.28908148261245*r4+11.7408986234862*r7-.172575135204147*t1+30.0526392370654*r2+5.77852985129325*r5+29.6385837327811*r8-.435646602452044*t2)^2+(-40.2818933934206*r1+37.3415461911863*r4-17.5121421408269*r7+.688992135032061*t1+41.1079956272437+18.3480006638221*r2-17.0087018409058*r5+7.97660607993154*r8-.313829045441664*t2+19.8946971640516*r3-18.4424983689296*r6+8.64901659965967*r9-.340284150555745*t3)^2+(-39.9505168284587*r2+37.0343582140755*r5-17.3680795584234*r8+.68332418286889*t2-19.0229410779165+18.3480006624515*r1-17.0087018386759*r4+7.97660607742464*r7-.313829045473842*t1+20.0751637635565*r3-18.6097919416627*r6+8.72747261243189*r9-.343370898899277*t3)^2+(-36.6974975173012*r3+34.0187906543919*r6-15.9538626068613*r9+.627683682093741*t3-20.0272581058992+19.8946971612448*r1-18.4424983632605*r4+8.64901659883117*r7-.340284150571336*t1+20.0751637622239*r2-18.609791938382*r5+8.72747261433876*r8-.343370898879803*t2)^2+(-19.9003018252227*r1+2.10723968998899*r4-5.99083386660634*r7+.268355364500816*t1-6.36217996635187+32.4452671740533*r2-3.43562400998522*r5+9.76739986562233*r8-.437524092703596*t2+5.19806634264006*r3-.550422390906632*r6+1.56483817002714*r9-.0700958709468267*t3)^2+(-54.7542305404035*r2+5.79791647536792*r5-16.4833428943737*r8+.738360233327084*t2+12.3293109763825+32.4452671726755*r1-3.43562401018043*r4+9.76739986673756*r7-.437524092757061*t1+3.1084479408544*r3-.329153041695288*r6+.935774510511675*r9-.0419173883795401*t3)^2+(-73.6585215390464*r3+7.79968874305612*r6-22.1743353083965*r9+.99328440217389*t3-10.5500615738974+5.19806634229016*r1-.550422390946524*r4+1.5648381697327*r7-.0700958709446797*t1+3.10844794077716*r2-.329153041700441*r5+.935774510228754*r8-.041917388373134*t2)^2;
h:=sum_sqr_distances+g1*b1+g2*b2+g3*b3+g4*b4+g5*b5+g6*b6;
diff_t1:=diff(h,t1);
diff_t2:=diff(h,t2);
diff_t3:=diff(h,t3);
diff_r1:=diff(h,r1);
diff_r2:=diff(h,r2);
diff_r3:=diff(h,r3);
diff_r4:=diff(h,r4);
diff_r5:=diff(h,r5);
diff_r6:=diff(h,r6);
diff_r7:=diff(h,r7);
diff_r8:=diff(h,r8);
diff_r9:=diff(h,r9);
diff_b1:=diff(h,b1);
diff_b2:=diff(h,b2);
diff_b3:=diff(h,b3);
diff_b4:=diff(h,b4);
diff_b5:=diff(h,b5);
diff_b6:=diff(h,b6);
vars := [op(indets(h, And(name, Non(constant))))];

polysys:={g1_1_1,g1_1_2,g1_1_3,g1_2_2,g1_2_3,g1_3_3,diff_t11,diff_t12,diff_t13,diff_r1__1_1,diff_r1__1_2,diff_r1__1_3,diff_r1__2_1,diff_r1__2_2,diff_r1__2_3,diff_r1__3_1,diff_r1__3_2,diff_r1__3_3};

polysys:={diff_t1,diff_t2,diff_t3,diff_r1,diff_r4,diff_r7,diff_r2,diff_r5,diff_r8,diff_r3,diff_r6,diff_r9,diff_b1,diff_b2,diff_b3,diff_b4,diff_b5,diff_b6};
sols := CodeTools:-Usage(RootFinding:-Isolate(polysys, vars, output = numeric, method = RS));

And this is sage code (that couldn't find the groebner basis):

P.<b1__1_1, b1__1_2, b1__1_3, b1__2_2, b1__2_3, b1__3_3, r1__1_1, r1__1_2, r1__1_3, r1__2_1, r1__2_2, r1__2_3, r1__3_1, r1__3_2, r1__3_3, t11, t12, t13>=PolynomialRing(QQ,order='degrevlex')

g1_1_1 = r1__1_1^2+r1__1_2^2+r1__1_3^2-1

g1_1_2 = r1__1_1*r1__2_1+r1__1_2*r1__2_2+r1__1_3*r1__2_3

g1_1_3 = r1__1_1*r1__3_1+r1__1_2*r1__3_2+r1__1_3*r1__3_3

g1_2_2 = r1__2_1^2+r1__2_2^2+r1__2_3^2-1

g1_2_3 = r1__2_1*r1__3_1+r1__2_2*r1__3_2+r1__2_3*r1__3_3

g1_3_3 = r1__3_1^2+r1__3_2^2+r1__3_3^2-1

diff_t11 = 74597*r1__2_1*(1/5996)-32999*t12*(1/8859)-47724*t13*(1/13471)-285739/3355+51151*t11*(1/4872)-227375*r1__3_3*(1/1804)+250313*r1__3_2*(1/6431)+21041*r1__3_1*(1/506)-946989*r1__2_3*(1/8182)+95225*r1__2_2*(1/5183)+270973*r1__1_3*(1/867)-201713*r1__1_2*(1/6275)-333665*r1__1_1*(1/6466)

diff_t12 = -132813*r1__2_1*(1/1250)+86862*t12*(1/9377)-49495*t13*(1/14984)-32999*t11*(1/8859)-205484*r1__3_3*(1/2091)-101885*r1__3_2*(1/26304)+77695*r1__3_1*(1/2206)+305302*r1__2_3*(1/845)-336768*r1__2_2*(1/5141)-946989*r1__1_3*(1/8182)+95225*r1__1_2*(1/5183)+74597*r1__1_1*(1/5996)+163365/1132

diff_t13 = 77695*r1__2_1*(1/2206)-49495*t12*(1/14984)+17194*t13*(1/1405)-47724*t11*(1/13471)+827638*r1__3_3*(1/2243)-303024*r1__3_2*(1/3193)-189788*r1__3_1*(1/4609)-205484*r1__2_3*(1/2091)-71971*r1__2_2*(1/18581)-227375*r1__1_3*(1/1804)+338629*r1__1_2*(1/8700)+21041*r1__1_1*(1/506)+43984/1749

diff_r1__1_1 = -(754990/629)*r1__2_1+(74597/5996)*t12+(21041/506)*t13-(333665/6466)*t11+(1364558/649)*r1__3_3-(111657/733)*r1__3_2-(1224599/1174)*r1__3_1+(249076/791)*r1__2_3+(376129/1179)*r1__2_2-(1288795/344)*r1__1_3-(936443/568)*r1__1_2+(1265223/371)*r1__1_1+1084247/1835+2*b1__1_1*r1__1_1+b1__1_2*r1__2_1+b1__1_3*r1__3_1

diff_r1__2_1 = (2227310/811)*r1__2_1-(132813/1250)*t12+(77695/2206)*t13-1929092/505+(74597/5996)*t11+b1__1_2*r1__1_1+2*b1__2_2*r1__2_1+b1__2_3*r1__3_1+(2046077/1127)*r1__3_3+(366113/549)*r1__3_2-(1509452/1137)*r1__3_1-(20570435/3913)*r1__2_3-(240503/8370)*r1__2_2+(772419/2453)*r1__1_3+(376129/1179)*r1__1_2-(754990/629)*r1__1_1

diff_r1__3_1 = b1__1_3*r1__1_1+b1__2_3*r1__2_1+2*b1__3_3*r1__3_1-(1509452/1137)*r1__2_1+(77695/2206)*t12-(189788/4609)*t13+3284794/809+(21041/506)*t11-(3218697/1103)*r1__3_3-(761426/1027)*r1__3_2+(316876/93)*r1__3_1+(2046077/1127)*r1__2_3+(366113/549)*r1__2_2+(1364558/649)*r1__1_3-(111657/733)*r1__1_2-(1224599/1174)*r1__1_1

diff_r1__1_2 = (376129/1179)*r1__2_1+(95225/5183)*t12+(338629/8700)*t13-614841/889+2*b1__1_1*r1__1_2+b1__1_2*r1__2_2+b1__1_3*r1__3_2-(201713/6275)*t11+(608104/559)*r1__3_3-(235649/240)*r1__3_2-(111657/733)*r1__3_1-(258543/1231)*r1__2_3-(1749672/2909)*r1__2_2+(2012893/1329)*r1__1_3+(3640570/1581)*r1__1_2-(936443/568)*r1__1_1

diff_r1__2_2 = b1__1_2*r1__1_2+2*b1__2_2*r1__2_2+b1__2_3*r1__3_2-(240503/8370)*r1__2_1-(336768/5141)*t12-(71971/18581)*t13-1244461/526+(95225/5183)*t11-(744729/697)*r1__3_3-(852815/1139)*r1__3_2+(366113/549)*r1__3_1-(430247/330)*r1__2_3+(1451681/585)*r1__2_2-(336883/1604)*r1__1_3-(1749672/2909)*r1__1_2+(376129/1179)*r1__1_1

diff_r1__3_2 = (366113/549)*r1__2_1-(101885/26304)*t12-(303024/3193)*t13+b1__1_3*r1__1_2+b1__2_3*r1__2_2+2*b1__3_3*r1__3_2+(250313/6431)*t11-(1350595/1429)*r1__3_3+(889794/353)*r1__3_2-(761426/1027)*r1__3_1-(744729/697)*r1__2_3-(852815/1139)*r1__2_2+(608104/559)*r1__1_3-(235649/240)*r1__1_2-(111657/733)*r1__1_1-203149/2216

diff_r1__1_3 = (772419/2453)*r1__2_1-(946989/8182)*t12-(227375/1804)*t13+(270973/867)*t11-(2552426/279)*r1__3_3+(608104/559)*r1__3_2+(1364558/649)*r1__3_1-(1676245/217)*r1__2_3-(336883/1604)*r1__2_2+(1162528/61)*r1__1_3+(2012893/1329)*r1__1_2-(1288795/344)*r1__1_1+1490538/317+2*b1__1_1*r1__1_3+b1__1_2*r1__2_3+b1__1_3*r1__3_3

diff_r1__2_3 = -(20570435/3913)*r1__2_1+(305302/845)*t12-(205484/2091)*t13-(946989/8182)*t11-(2307965/408)*r1__3_3-(744729/697)*r1__3_2+(2046077/1127)*r1__3_1+(2452975/97)*r1__2_3-(430247/330)*r1__2_2-(1676245/217)*r1__1_3-(258543/1231)*r1__1_2+(249076/791)*r1__1_1+2601213/376+b1__1_2*r1__1_3+2*b1__2_2*r1__2_3+b1__2_3*r1__3_3

diff_r1__3_3 = (2046077/1127)*r1__2_1-(205484/2091)*t12+(827638/2243)*t13-794723/129-(227375/1804)*t11+b1__1_3*r1__1_3+b1__2_3*r1__2_3+2*b1__3_3*r1__3_3+(7574431/297)*r1__3_3-(1350595/1429)*r1__3_2-(3218697/1103)*r1__3_1-(2307965/408)*r1__2_3-(744729/697)*r1__2_2-(2552426/279)*r1__1_3+(608104/559)*r1__1_2+(1364558/649)*r1__1_1

I=Ideal(g1_1_1, g1_1_2, g1_1_3, g1_2_2, g1_2_3, g1_3_3, diff_t11, diff_t12, diff_t13, diff_r1__1_1, diff_r1__2_1, diff_r1__3_1, diff_r1__1_2, diff_r1__2_2, diff_r1__3_2, diff_r1__1_3, diff_r1__2_3, diff_r1__3_3)

P.<r1,r2,r3,r4,r5,r6,r7,r8,r9,t1,t2,t3,b1,b2,b3,b4,b5,b6>=PolynomialRing(QQ,order='degrevlex')
g1=r1^2+r4^2+r7^2-1
g2=r1*r2+r4*r5+r7*r8
g3=r1*r3+r4*r6+r7*r9
g4=r2^2+r5^2+r8^2-1
g5=r2*r3+r5*r6+r8*r9
g6=r3^2+r6^2+r9^2-1
sum_sqr_distances=(-34.5792590705286*r1+17.0635530183776*r4-2.30671047587914*r7+.533429751140582*t1-18.2777571201152+5.34368522421251*r2-2.6369060119417*r5+.356466130795291*r8-.0824332491501039*t2+31.8951297362284*r3-15.7390369840122*r6+2.12765778880161*r9-.492023587996135*t3)^2+(-63.880273658711*r2+31.5224925463221*r5-4.26132023642126*r8+.98543576110074*t2+5.20415366982094+5.34368522429473*r1-2.63690601164137*r4+.356466130730839*r7-.0824332491771907*t1+5.63520538121055*r3-2.78076015494726*r6+.375912834341308*r9-.0869303242748373*t3)^2+(-31.1892504431195*r3+15.3907123123387*r6-2.08057004842228*r9+.481134487803446*t3+16.460313265992+31.8951297380977*r1-15.7390369788429*r4+2.12765778852522*r7-.492023588007365*t1+5.63520538145412*r2-2.78076015435067*r5+.375912834360444*r8-.086930324248257*t2)^2+(-20.1477543311821*r1+7.55350991666248*r4+20.8920429846501*r7+.506802937949341*t1-13.5125935907312+7.82881106057577*r2-2.9350666574299*r5-8.1180192368411*r8-.19692837123503*t2+18.2686582928059*r3-6.84902591482382*r6-18.9435302828672*r9-.459535566231505*t3)^2+(-36.6286508786965*r2+13.7322935856179*r5+37.9817688885839*r8+.921368583909397*t2-34.3325081149272+7.82881105959312*r1-2.93506665641182*r4-8.11801923407865*r7-.196928371252735*t1+7.29448206284227*r3-2.7347436184352*r6-7.56395131161327*r9-.183487691946913*t3)^2+(-22.7328194787774*r3+8.52266582628087*r6+23.5726043680174*r9+.5718284781815*t3+29.2151845257836+18.2686582944502*r1-6.84902591329222*r4-18.9435302865599*r7-.459535566194367*t1+7.2944820644144*r2-2.73474361877224*r5-7.56395131566163*r8-.183487691915587*t2)^2+(-33.7370053449296*r1+38.9258336170637*r4-60.1132663033064*r7+.996042632734926*t1-4.98803179031169+1.08999592941726*r2-1.25763978603382*r5+1.94217639880877*r8-.0321807583045741*t2+1.8259306385537*r3-2.10676292990297*r6+3.25347948355056*r9-.0539083045951421*t3)^2+(-25.0073507347857*r2+28.8535382444551*r5-44.5585943124607*r8+.738310564652533*t2+4.93804814541239+1.08999592907818*r1-1.25763978578301*r4+1.94217639918338*r7-.0321807583046471*t1+14.8482131236429*r3-17.1319021236029*r6+26.4568411007238*r9-.438374809459876*t3)^2+(-8.9977349393474*r3+10.3816070715198*r6-16.0323428536159*r9+.265646802616713*t3-2.58161819993127+1.82593063830369*r1-2.1067629296129*r4+3.25347948341273*r7-.0539083045952243*t1+14.8482131262288*r2-17.1319021246606*r5+26.4568410945*r8-.438374809459549*t2)^2+(-56.6725654800191*r1-43.1813795970078*r4-58.3887310201578*r7+.980525398272198*t1+49.0916863573367+5.78296846451955*r2+4.40630407967054*r5+5.95808902028457*r8-.100054539766321*t2+5.50887455808305*r3+4.19745958942679*r6+5.67569496876523*r9-.0953122798368383*t3)^2+(-28.0870406673401*r2-21.400781038534*r5-28.937575861748*r8+.48595041543225*t2+19.4018945247715+5.78296846409823*r1+4.40630407900952*r4+5.95808902050728*r7-.100054539765808*t1+28.302910438969*r3+21.5652619383799*r6+29.1599826218892*r9-.489685305322089*t3)^2+(-30.836717169852*r3-23.4958833859599*r6-31.7705184032215*r9+.533524186319051*t3-30.3978529558191+5.50887455772671*r1+4.19745958933706*r4+5.67569496903033*r7-.0953122798304703*t1+28.3029104392002*r2+21.5652619411541*r5+29.1599826221612*r8-.489685305291881*t2)^2+(-57.8205382202822*r1-33.3924384768228*r4-34.894277849845*r7+.850839830317679*t1-12.5672620764049+10.7191476042258*r2+6.19050752309509*r5+6.46892827657879*r8-.157734223996209*t2+21.7070640341081*r3+12.5362340547815*r6+13.1000566054682*r9-.319423430626817*t3)^2+(-56.6217108878986*r2-32.7000933511969*r5-34.1707942023208*r8+.833198866184046*t2-1.62153141633832+10.7191476020505*r1+6.19050752434099*r4+6.46892827744991*r7-.15773422401843*t1+22.9548337765416*r3+13.2568443369017*r6+13.8530766468144*r9-.337784591359295*t3)^2+(-21.4717881919623*r3-12.4003578706288*r6-12.9580693345224*r9+.315961303486945*t3+6.66922254237138+21.7070640313443*r1+12.5362340557455*r4+13.1000566039334*r7-.319423430651098*t1+22.9548337782773*r2+13.2568443352531*r5+13.8530766433259*r8-.337784591337385*t2)^2+(-65.9377723150761*r1-12.678533244879*r4-65.0293030974106*r7+.955841723390729*t1+11.5835324790697+7.68982596884022*r2+1.47860188124137*r5+7.5838780437921*r8-.111472624096221*t2+11.9049207597142*r3+2.28908148248606*r6+11.7408986260292*r9-.17257513524552*t3)^2+(-49.571881779333*r2-9.53169524975009*r5-48.8888964859373*r8+.718599844159693*t2+14.0432100287845+7.6898259693682*r1+1.47860188123288*r4+7.58387804187672*r7-.111472624065637*t1+30.0526392395535*r3+5.77852985094098*r6+29.6385837317152*r9-.435646602436962*t3)^2+(-22.4583184276267*r3-4.31829173040524*r6-22.1488950108346*r9+.32555843242268*t3-12.0350031966363+11.904920759546*r1+2.28908148261245*r4+11.7408986234862*r7-.172575135204147*t1+30.0526392370654*r2+5.77852985129325*r5+29.6385837327811*r8-.435646602452044*t2)^2+(-40.2818933934206*r1+37.3415461911863*r4-17.5121421408269*r7+.688992135032061*t1+41.1079956272437+18.3480006638221*r2-17.0087018409058*r5+7.97660607993154*r8-.313829045441664*t2+19.8946971640516*r3-18.4424983689296*r6+8.64901659965967*r9-.340284150555745*t3)^2+(-39.9505168284587*r2+37.0343582140755*r5-17.3680795584234*r8+.68332418286889*t2-19.0229410779165+18.3480006624515*r1-17.0087018386759*r4+7.97660607742464*r7-.313829045473842*t1+20.0751637635565*r3-18.6097919416627*r6+8.72747261243189*r9-.343370898899277*t3)^2+(-36.6974975173012*r3+34.0187906543919*r6-15.9538626068613*r9+.627683682093741*t3-20.0272581058992+19.8946971612448*r1-18.4424983632605*r4+8.64901659883117*r7-.340284150571336*t1+20.0751637622239*r2-18.609791938382*r5+8.72747261433876*r8-.343370898879803*t2)^2+(-19.9003018252227*r1+2.10723968998899*r4-5.99083386660634*r7+.268355364500816*t1-6.36217996635187+32.4452671740533*r2-3.43562400998522*r5+9.76739986562233*r8-.437524092703596*t2+5.19806634264006*r3-.550422390906632*r6+1.56483817002714*r9-.0700958709468267*t3)^2+(-54.7542305404035*r2+5.79791647536792*r5-16.4833428943737*r8+.738360233327084*t2+12.3293109763825+32.4452671726755*r1-3.43562401018043*r4+9.76739986673756*r7-.437524092757061*t1+3.1084479408544*r3-.329153041695288*r6+.935774510511675*r9-.0419173883795401*t3)^2+(-73.6585215390464*r3+7.79968874305612*r6-22.1743353083965*r9+.99328440217389*t3-10.5500615738974+5.19806634229016*r1-.550422390946524*r4+1.5648381697327*r7-.0700958709446797*t1+3.10844794077716*r2-.329153041700441*r5+.935774510228754*r8-.041917388373134*t2)^2
h=sum_sqr_distances+g1*b1+g2*b2+g3*b3+g4*b4+g5*b5+g6*b6
diff_t1=diff(h,t1)
diff_t2=diff(h,t2)
diff_t3=diff(h,t3)
diff_r1=diff(h,r1)
diff_r2=diff(h,r2)
diff_r3=diff(h,r3)
diff_r4=diff(h,r4)
diff_r5=diff(h,r5)
diff_r6=diff(h,r6)
diff_r7=diff(h,r7)
diff_r8=diff(h,r8)
diff_r9=diff(h,r9)
diff_b1=diff(h,b1)
diff_b2=diff(h,b2)
diff_b3=diff(h,b3)
diff_b4=diff(h,b4)
diff_b5=diff(h,b5)
diff_b6=diff(h,b6)
I=Ideal(g1,g2,g3,g4,g5,g6,diff_t1,diff_t2,diff_t3,diff_r1,diff_r2,diff_r3,diff_r4,diff_r5,diff_r6,diff_r7,diff_r8,diff_r9)
I.groebner_basis()
 I.variety(RR)

And these are the 12 22 solutions the Maple found (all the real solutions that solve the equations): The goal is to get the same solutions from sage.

[[b1__1_1 = -899.5942504, b1__1_2 = 3037.238105, b1__1_3 = -3600.559806, b1__2_2 = -1064.022119, b1__2_3 = 889.3168953, b1__3_3 = -2555.002632, r1__1_1 = .7481491832, r1__1_2 = .6388182437, r1__1_3 = .1793991396, r1__2_1 = -.6472289487, r1__2_2 = .7621522200, r1__2_3 = -0.1478788196e-1, r1__3_1 = -.1461762213, r1__3_2 = -.1050487747, r1__3_3 = .9836652211, t11 = .1547590859, t12 = -20.00614350, t13 = -39.11689082],

[b1__1_1 = -2536.737834, b1__1_2 = -384.6438623, b1__1_3 = 2968.302582, b1__2_2 = 206.1653350, b1__2_3 = -4119.641687, b1__3_3 = -2528.112061, r1__1_1 = .3433731644, r1__1_2 = -.9364692403, r1__1_3 = -0.7155579556e-1, r1__2_1 = .8767823107, r1__2_2 = .2923108835, r1__2_3 = .3818469942, r1__3_1 = -.3366714267, r1__3_2 = -.1938548665, r1__3_3 = .9214513775, t11 = 8.655455565, t12 = -14.90305773, t13 = -32.28108776], 

[b1__1_1 = -2672.661895, b1__1_2 = 5518.566630, b1__1_3 = 194.0920868, b1__2_2 = -1264.096636, b1__2_3 = -39.30164061, b1__3_3 = -3167.161180, r1__1_1 = .6407595964, r1__1_2 = .1199696331, r1__1_3 = -.7583102444, r1__2_1 = -.1297813989, r1__2_2 = .9904267144, r1__2_3 = 0.4702884205e-1, r1__3_1 = .7566927568, r1__3_2 = 0.6828038249e-1, r1__3_3 = .6501952485, t11 = 21.88635414, t12 = -19.14986568, t13 = -26.72096477], 

[b1__1_1 = -2415.819809, b1__1_2 = -247.8725031, b1__1_3 = -81.80497732, b1__2_2 = 578.5002146, b1__2_3 = -3308.869199, b1__3_3 = -632.2913675, r1__1_1 = .5855751733, r1__1_2 = -.6602102503, r1__1_3 = .4703447053, r1__2_1 = .5367090123, r1__2_2 = .7506041613, r1__2_3 = .3854047601, r1__3_1 = -.6074908662, r1__3_2 = 0.2675478306e-1, r1__3_3 = .7938759532, t11 = -4.150377642, t12 = -12.85905997, t13 = -25.75853354], 

[b1__1_1 = 305.8128664, b1__1_2 = 1219.200904, b1__1_3 = -4379.467945, b1__2_2 = -1232.280299, b1__2_3 = 1920.610983, b1__3_3 = -1454.259739, r1__1_1 = .4050262785, r1__1_2 = .2045666996, r1__1_3 = -.8911263542, r1__2_1 = -.7397436412, r1__2_2 = -.4994839335, r1__2_3 = -.4508826294, r1__3_1 = .5373388680, r1__3_2 = -.8418243674, r1__3_3 = 0.5097720352e-1, t11 = 19.84743424, t12 = -23.75250545, t13 = -21.83242508], 

[b1__1_1 = -2561.237930, b1__1_2 = 5363.493736, b1__1_3 = -370.0386489, b1__2_2 = -1179.131772, b1__2_3 = 977.8467630, b1__3_3 = -2792.263176, r1__1_1 = .4494018895, r1__1_2 = 0.2797468228e-1, r1__1_3 = -.8928915717, r1__2_1 = -.2109820307, r1__2_2 = .9745577061, r1__2_3 = -0.7565619745e-1, r1__3_1 = .8680579038, r1__3_2 = .2223841151, r1__3_3 = .4438702298, t11 = 24.07022969, t12 = -15.38154019, t13 = -18.48056832], 

[b1__1_1 = 549.2162023, b1__1_2 = 87.77137600, b1__1_3 = -1198.811469, b1__2_2 = -495.0197371, b1__2_3 = -1765.778607, b1__3_3 = 676.3321754, r1__1_1 = -.3382824498, r1__1_2 = .1447284170, r1__1_3 = -.9298487347, r1__2_1 = .8458105804, r1__2_2 = -.3863831243, r1__2_3 = -.3678485331, r1__3_1 = -.4125159951, r1__3_2 = -.9109126010, r1__3_3 = 0.8293803447e-2, t11 = 30.93253221, t12 = 2.460529285, t13 = -15.53626680], 

[b1__1_1 = -1223.590670, b1__1_2 = 1841.223573, b1__1_3 = 4119.421790, b1__2_2 = 671.1576084, b1__2_3 = -1371.054802, b1__3_3 = -903.8038187, r1__1_1 = -.4128628600, r1__1_2 = -0.7780371756e-1, r1__1_3 = -.9074639609, r1__2_1 = .2440176361, r1__2_2 = .9504710646, r1__2_3 = -.1925101259, r1__3_1 = -.8774962405, r1__3_2 = .3009174918, r1__3_3 = .3734287229, t11 = 34.69684826, t12 = 8.155443592, t13 = -11.33088510], 

[b1__1_1 = -6327.273294, b1__1_2 = 1759.073834, b1__1_3 = 11207.90070, b1__2_2 = -1890.858242, b1__2_3 = 1891.950907, b1__3_3 = -9760.176346, r1__1_1 = .3766394529, r1__1_2 = -.6180780439, r1__1_3 = .6900161260, r1__2_1 = -.7796490396, r1__2_2 = -.6137728279, r1__2_3 = -.1242187218, r1__3_1 = .5002900135, r1__3_2 = -.4911847385, r1__3_3 = -.7130550154, t11 = -29.31512316, t12 = -33.00946996, t13 = 8.767454469], 

[b1__1_1 = -3304.385960, b1__1_2 = -4044.369886, b1__1_3 = 10477.87582, b1__2_2 = -1108.617283, b1__2_3 = 5826.342875, b1__3_3 = -9844.297818, r1__1_1 = -.5741762462, r1__1_2 = -.7368503356, r1__1_3 = .3568938514, r1__2_1 = .7828801205, r1__2_2 = -.3665428545, r1__2_3 = .5027375585, r1__3_1 = .2396254476, r1__3_2 = -.5680650656, r1__3_3 = -.7873256798, t11 = -18.36435913, t12 = -34.30593158, t13 = 13.14730960], 

[b1__1_1 = -6612.907618, b1__1_2 = 2424.756675, b1__1_3 = 12384.95493, b1__2_2 = -1691.366479, b1__2_3 = 2578.504868, b1__3_3 = -9210.975576, r1__1_1 = .5157887216, r1__1_2 = .4217561249, r1__1_3 = .7457102425, r1__2_1 = -.4865104064, r1__2_2 = .8606564397, r1__2_3 = -.1502601654, r1__3_1 = .7051734674, r1__3_2 = .2852932946, r1__3_3 = -.6491056285, t11 = -24.37008827, t12 = -14.94325716, t13 = 16.06559316], 

[b1__1_1 = -4846.263193, b1__1_2 = -3105.528126, b1__1_3 = 12948.69518, b1__2_2 = -279.0100568, b1__2_3 = 4363.645053, b1__3_3 = -9431.494358, r1__1_1 = -.8785017929, r1__1_2 = .3491284937, r1__1_3 = .3261041166, r1__2_1 = .4347305027, r1__2_2 = .8672555961, r1__2_3 = .2426460819, r1__3_1 = -.1981009589, r1__3_2 = .3549324245, r1__3_3 = -.9136624016, t11 = -11.20139735, t12 = -13.01981734, t13 = 27.02745538]]
[[b1 = -6405.651236, b2 = 1097.011411, b3 = 6432.603484, b4 = -3486.767199, b5 = 2786.505511, b6 = -2066.461540, r1 = -.2735272365, r2 = -.4584555697, r3 = -.8455775195, r4 = .9594115168, r5 = -0.6729917007e-1, r6 = -.2738619418, r7 = -0.6864686727e-1, r8 = .8861655107, r9 = -.4582557095, t1 = -31.53181188, t2 = -3.035192389, t3 = -64.33835896],

[b1 = -663.0587184, b2 = 1206.645590, b3 = -935.8274112, b4 = -2827.613858, b5 = 1260.996624, b6 = -676.9562322, r1 = .8750945364, r2 = -.1796187040, r3 = -.4493847723, r4 = -.4474525861, r5 = -.6540696330, r6 = -.6099008922, r7 = -.1843793253, r8 = .7347993170, r9 = -.6527436159, t1 = 24.66279957, t2 = 6.035593829, t3 = -55.14919482], 

[b1 = -5334.007938, b2 = -147.4788994, b3 = 6381.507728, b4 = -1654.278431, b5 = 3038.269718, b6 = -2677.888758, r1 = 0.1140465611e-1, r2 = -.8980265159, r3 = -.4397934863, r4 = .8207951804, r5 = .2596099997, r6 = -.5088201253, r7 = -.5711087512, r8 = .3551774554, r9 = -.7400565989, t1 = -38.50311082, t2 = -47.94244185, t3 = -52.00642291], 

[b1 = -3711.964527, b2 = 3878.643381, b3 = -871.0350173, b4 = -4720.758037, b5 = 5739.216423, b6 = -3328.445679, r1 = -.3452025304, r2 = -.5900255619, r3 = -.7298664599, r4 = -.5720856277, r5 = .7487785844, r6 = -.3347367116, r7 = .7440115910, r8 = .3019941520, r9 = -.5960254060, t1 = 4.420063381, t2 = -25.83338983, t3 = -49.39760950], 

[b1 = -6771.196603, b2 = 3126.930183, b3 = 3836.296676, b4 = -2119.174006, b5 = -1053.266216, b6 = -647.0603393, r1 = -0.5288779601e-1, r2 = .2948075346, r3 = -.9540919235, r4 = .9579998211, r5 = -.2546859938, r6 = -.1318005592, r7 = .2818496477, r8 = .9209905331, r9 = .2689557845, t1 = -1.568329794, t2 = 41.81946440, t3 = -47.91552928], 

[b1 = -426.4877331, b2 = 1777.234977, b3 = -1396.594665, b4 = -4704.976941, b5 = 6548.202362, b6 = -2797.527674, r1 = .6772160397, r2 = -.2551001296, r3 = -.6901466217, r4 = -.3808728417, r5 = .6809888166, r6 = -.6254519247, r7 = .6295349982, r8 = .6864241804, r9 = .3640158382, t1 = 51.90734298, t2 = -10.61796786, t3 = -36.65155778], 

[b1 = -8345.957097, b2 = -5992.141964, b3 = 9771.580880, b4 = -9281.942970, b5 = 14067.10170, b6 = -7238.069438, r1 = -.4112595863, r2 = -.5902847582, r3 = -.6945714196, r4 = -.9059223617, r5 = .1803855392, r6 = .3831001589, r7 = .1008475446, r8 = -.7867813937, r9 = .6089374444, t1 = -25.97531493, t2 = -66.23689116, t3 = -31.46159720], 

[b1 = -5343.147703, b2 = 183.2763579, b3 = 5426.240402, b4 = -11788.39198, b5 = 16609.81042, b6 = -7181.846374, r1 = -.2988639430, r2 = -.6827291572, r3 = -.6667542587, r4 = .7307518828, r5 = -.6130817579, r6 = .3002206588, r7 = -.6137442703, r8 = -.3975068000, r9 = .6821336486, t1 = -51.64655336, t2 = -55.45375783, t3 = -29.08482105], 

[b1 = -4075.023103, b2 = 6883.346857, b3 = -1945.068213, b4 = -3311.752332, b5 = 3039.918275, b6 = -921.4062369, r1 = .5825663050, r2 = .8122102291, r3 = 0.3051301418e-1, r4 = -.8079724338, r5 = .5827884450, r6 = -0.8682266235e-1, r7 = 0.8830088656e-1, r8 = -0.2592628327e-1, r9 = -.9957563865, t1 = 23.77615250, t2 = 40.91304243, t3 = -28.03945694], 

[b1 = -6187.757714, b2 = 838.7708899, b3 = 6066.514065, b4 = -441.1250637, b5 = -851.5589307, b6 = -1128.553632, r1 = .2065219306, r2 = .9631666887, r3 = -.1722167877, r4 = .8113374284, r5 = -.2669555392, r6 = -.5200637629, r7 = -.5468823178, r8 = -0.3232135326e-1, r9 = -.8365853576, t1 = -21.72396020, t2 = 62.90274148, t3 = -22.56105906], 

[b1 = -3971.638517, b2 = 5211.591913, b3 = -2909.389068, b4 = -3415.632999, b5 = 2348.040874, b6 = -1624.438321, r1 = -.6376325216, r2 = -.7577247398, r3 = -.1388451874, r4 = -.6573617358, r5 = .6291742407, r6 = -.4147473004, r7 = .4016221056, r8 = -.1731848536, r9 = -.8992812078, t1 = -24.08083201, t2 = -42.77528618, t3 = -16.88667732], 

[b1 = -1107.397052, b2 = -1352.354473, b3 = 559.8732630, b4 = -682.7595891, b5 = 1919.821403, b6 = -459.8284277, r1 = -.5540008534, r2 = .8147846552, r3 = -.1709064659, r4 = .3838720628, r5 = .4321713781, r6 = .8160086638, r7 = .7387322206, r8 = .3864632785, r9 = -.5521963786, t1 = -3.462811975, t2 = 66.31134317, t3 = -11.39008932], 

[b1 = -1858.210974, b2 = -1443.942073, b3 = -117.7029385, b4 = -541.5565807, b5 = 635.7869277, b6 = -1292.459322, r1 = -.6056473654, r2 = .7430910328, r3 = -.2846172619, r4 = -.4570833521, r5 = -.6176622647, r6 = -.6399751058, r7 = .6513571049, r8 = .2575054246, r9 = -.7137400635, t1 = -8.170594439, t2 = 73.18220544, t3 = -5.574473809], 

[b1 = -2879.955409, b2 = -7247.457464, b3 = 7603.360417, b4 = -10386.60081, b5 = 15680.46439, b6 = -7326.146084, r1 = .8898800024, r2 = -.3777475308, r3 = .2557740885, r4 = -.2159488982, r5 = .1450669474, r6 = .9655680474, r7 = -.4018453119, r8 = -.9144738289, r9 = 0.4751801242e-1, t1 = 25.17284844, t2 = -56.81452504, t3 = 4.483386705], 

[b1 = -2594.500775, b2 = -8451.746216, b3 = 8378.142403, b4 = -8445.314669, b5 = 16539.21636, b6 = -7726.257147, r1 = -.8887915121, r2 = .4283658935, r3 = .1629487933, r4 = .2014992422, r5 = 0.4589445400e-1, r6 = .9784128753, r7 = -.4116402597, r8 = -.9024391172, r9 = .1271060041, t1 = -72.41708628, t2 = -1.180372243, t3 = 11.62696253], 

[b1 = -3386.721976, b2 = -9232.755155, b3 = 8735.844228, b4 = -8449.692294, b5 = 14675.00399, b6 = -7470.241638, r1 = .7020126763, r2 = -.7115667558, r3 = -0.2917112402e-1, r4 = -.6916841933, r5 = -.6714995329, r6 = -.2658220344, r7 = -.1695617265, r8 = -.2067876432, r9 = .9635806617, t1 = 22.56779868, t2 = -57.27997094, t3 = 12.66120812], 

[b1 = -2344.035915, b2 = 3947.708934, b3 = -879.5603548, b4 = -4851.200663, b5 = 7270.443175, b6 = -2742.299953, r1 = .4417879292, r2 = .7119951524, r3 = .5457896376, r4 = -.5754568251, r5 = .6916351055, r6 = -.4364519713, r7 = .6882389614, r8 = .1212591594, r9 = -.7152785110, t1 = 49.50818048, t2 = 50.77308450, t3 = 32.05737927], 

[b1 = -4793.592445, b2 = -9508.057512, b3 = 9867.840732, b4 = -7363.405470, b5 = 13671.66420, b6 = -8641.244153, r1 = -.8607833310, r2 = .4979577238, r3 = .1053098401, r4 = -.5071531704, r5 = -.8216734210, r6 = -.2600931582, r7 = -0.4298510042e-1, r8 = -.2772920743, r9 = .9598236227, t1 = -55.37291300, t2 = 22.92886207, t3 = 35.86152727], 

[b1 = -1143.596369, b2 = 1527.374908, b3 = 1286.733075, b4 = -1246.223196, b5 = 880.0474364, b6 = -176.7812153, r1 = .5096005566, r2 = -.5301666308, r3 = .6776655638, r4 = -0.1872847237e-1, r5 = .7805852008, r6 = .6247687481, r7 = .8602072524, r8 = .3310741426, r9 = -.3878574417, t1 = 62.72704338, t2 = -19.19220727, t3 = 40.08281887], 

[b1 = -6277.680746, b2 = -547.8928701, b3 = 6669.122409, b4 = -11168.08424, b5 = 15793.41027, b6 = -8033.605502, r1 = .4599469977, r2 = .3665077232, r3 = .8087773786, r4 = .5464600340, r5 = -.8347594860, r6 = 0.6751319714e-1, r7 = -.6998786970, r8 = -.4109120215, r9 = .5842269422, t1 = -10.38583601, t2 = 10.41107518, t3 = 61.92902662], 

[b1 = -9151.429703, b2 = -6008.117168, b3 = 11049.83952, b4 = -7190.606039, b5 = 13545.27447, b6 = -7223.768017, r1 = 0.7425420274e-1, r2 = .5809660735, r3 = .8105336112, r4 = -.9944330906, r5 = .1040687725, r6 = 0.1650814969e-1, r7 = -0.7476056307e-1, r8 = -.8072472434, r9 = .5854594317, t1 = -4.663325049, t2 = 4.554915592, t3 = 62.58462359], 

[b1 = -1226.728760, b2 = 1147.011945, b3 = -400.7753802, b4 = -4507.321778, b5 = 8005.881456, b6 = -3241.483736, r1 = -0.9032875350e-2, r2 = .7488743127, r3 = .6626504893, r4 = -.2759411564, r5 = .6350798638, r6 = -.7214776814, r7 = .9611320853, r8 = .1893695603, r9 = -.2009086466, t1 = 40.46849908, t2 = 60.56033489, t3 = 65.08406719]]

Solving a system of 18 polynomial equations in sagemath

I'm trying to solve a system of 18 polynomial equations in sage. The system is for sure solvable since I already solved it in Maple and got ALL the possible solutions (only real solutions). In most cases I got between 10 to 25 solutions. But since Maple is not an open source I cannot really use it. I'm trying to solve the same equations in sage. but so far I did not succeed.

Since it's the first time I write here, I'm not allowed to attach the Maple and Sage code (two files) that I wanted to attach. Instead, I copied them bellow. It took Maple 25 minutes to solve the equations (in the code bellow). and it found 22 solutions to the equations (I wrote below all the 22 solutions that Maple found). I used the command 'Isolate' in Maple to solve the equations (this command is used for solving polynomial equations). Unfortunately I cannot know how the 'Isolate' command is implemented (I can use the command 'showstat' in Maple and see partial implementation of 'Isolate' since some of the commands that are used inside 'Isolate' are compiled). But I could see that 'Isolate' uses 'Groebner basis' in order to solve the equations. Therefore I tried to convert the 18 polynomial equations in sage to groebner basis but for some reason all I get is a single solution (for groebner basis) which is [1.0000000]. I suspect that the reason for that is that the coefficients are real numbers and not rational numbers. But I did not find any command in sage that converts expression of real coefficients into expression of rational coefficients. Anyone knows how to solve the 18 equations in sagemath (and to get exactly the 22 solutions that Maple found)?

I'm attaching bellow both Maple's code (that succeeded to solve the equations) and Sage's code (that did not succeed). I'd appreciate any idea of how to solve the equations.

If it helps, here's the mathematical problem that I'm trying to solve: given a set of n 3D points P={p_1,p_2,...,p_n} and another set of n 3D lines H={h_1,h_2,...,h_n} (each line h_i is represented by a 3D point and a 3D unit vector). I'm trying to find the rotation matrix R=[r1,r2,r3;r4,r5,r6;r7,r8,r9] and a translation vector T=[t1,t2,t3] such that rotating the set P by R and then translating it by T will result in a new set of points PT={pt_1,...,pt_n} such that the sum of square distances between H and PT (sum_{i=1 to n}(dist(h_i,pt_i)^2)) will be minimal. So this is an optimization problem with constraints (the constraints are RR^T=I). so there are 12 variables in R and T. Using Lagrange Multipliers algorithm I added 6 more variables b1,...,b6 (the number of constraints from RR^T=I) and created a new function 'h' with 18 variables. the 18 equations are the derivation of 'h' by all the 18 variables (equal to zero). it is gurantee that one of the solutions to the 18 equations is the (global) minimum for R and T. but for that I have to find ALL the solutions to the equations (22 solutions in this example) just like Maple did.

Thanks

Here is Maple code: (and below sage's code)

restart;
g1:=r1^2+r4^2+r7^2-1;
g2:=r1*r2+r4*r5+r7*r8;
g3:=r1*r3+r4*r6+r7*r9;
g4:=r2^2+r5^2+r8^2-1;
g5:=r2*r3+r5*r6+r8*r9;
g6:=r3^2+r6^2+r9^2-1;
sum_sqr_distances:=(-34.5792590705286*r1+17.0635530183776*r4-2.30671047587914*r7+.533429751140582*t1-18.2777571201152+5.34368522421251*r2-2.6369060119417*r5+.356466130795291*r8-.0824332491501039*t2+31.8951297362284*r3-15.7390369840122*r6+2.12765778880161*r9-.492023587996135*t3)^2+(-63.880273658711*r2+31.5224925463221*r5-4.26132023642126*r8+.98543576110074*t2+5.20415366982094+5.34368522429473*r1-2.63690601164137*r4+.356466130730839*r7-.0824332491771907*t1+5.63520538121055*r3-2.78076015494726*r6+.375912834341308*r9-.0869303242748373*t3)^2+(-31.1892504431195*r3+15.3907123123387*r6-2.08057004842228*r9+.481134487803446*t3+16.460313265992+31.8951297380977*r1-15.7390369788429*r4+2.12765778852522*r7-.492023588007365*t1+5.63520538145412*r2-2.78076015435067*r5+.375912834360444*r8-.086930324248257*t2)^2+(-20.1477543311821*r1+7.55350991666248*r4+20.8920429846501*r7+.506802937949341*t1-13.5125935907312+7.82881106057577*r2-2.9350666574299*r5-8.1180192368411*r8-.19692837123503*t2+18.2686582928059*r3-6.84902591482382*r6-18.9435302828672*r9-.459535566231505*t3)^2+(-36.6286508786965*r2+13.7322935856179*r5+37.9817688885839*r8+.921368583909397*t2-34.3325081149272+7.82881105959312*r1-2.93506665641182*r4-8.11801923407865*r7-.196928371252735*t1+7.29448206284227*r3-2.7347436184352*r6-7.56395131161327*r9-.183487691946913*t3)^2+(-22.7328194787774*r3+8.52266582628087*r6+23.5726043680174*r9+.5718284781815*t3+29.2151845257836+18.2686582944502*r1-6.84902591329222*r4-18.9435302865599*r7-.459535566194367*t1+7.2944820644144*r2-2.73474361877224*r5-7.56395131566163*r8-.183487691915587*t2)^2+(-33.7370053449296*r1+38.9258336170637*r4-60.1132663033064*r7+.996042632734926*t1-4.98803179031169+1.08999592941726*r2-1.25763978603382*r5+1.94217639880877*r8-.0321807583045741*t2+1.8259306385537*r3-2.10676292990297*r6+3.25347948355056*r9-.0539083045951421*t3)^2+(-25.0073507347857*r2+28.8535382444551*r5-44.5585943124607*r8+.738310564652533*t2+4.93804814541239+1.08999592907818*r1-1.25763978578301*r4+1.94217639918338*r7-.0321807583046471*t1+14.8482131236429*r3-17.1319021236029*r6+26.4568411007238*r9-.438374809459876*t3)^2+(-8.9977349393474*r3+10.3816070715198*r6-16.0323428536159*r9+.265646802616713*t3-2.58161819993127+1.82593063830369*r1-2.1067629296129*r4+3.25347948341273*r7-.0539083045952243*t1+14.8482131262288*r2-17.1319021246606*r5+26.4568410945*r8-.438374809459549*t2)^2+(-56.6725654800191*r1-43.1813795970078*r4-58.3887310201578*r7+.980525398272198*t1+49.0916863573367+5.78296846451955*r2+4.40630407967054*r5+5.95808902028457*r8-.100054539766321*t2+5.50887455808305*r3+4.19745958942679*r6+5.67569496876523*r9-.0953122798368383*t3)^2+(-28.0870406673401*r2-21.400781038534*r5-28.937575861748*r8+.48595041543225*t2+19.4018945247715+5.78296846409823*r1+4.40630407900952*r4+5.95808902050728*r7-.100054539765808*t1+28.302910438969*r3+21.5652619383799*r6+29.1599826218892*r9-.489685305322089*t3)^2+(-30.836717169852*r3-23.4958833859599*r6-31.7705184032215*r9+.533524186319051*t3-30.3978529558191+5.50887455772671*r1+4.19745958933706*r4+5.67569496903033*r7-.0953122798304703*t1+28.3029104392002*r2+21.5652619411541*r5+29.1599826221612*r8-.489685305291881*t2)^2+(-57.8205382202822*r1-33.3924384768228*r4-34.894277849845*r7+.850839830317679*t1-12.5672620764049+10.7191476042258*r2+6.19050752309509*r5+6.46892827657879*r8-.157734223996209*t2+21.7070640341081*r3+12.5362340547815*r6+13.1000566054682*r9-.319423430626817*t3)^2+(-56.6217108878986*r2-32.7000933511969*r5-34.1707942023208*r8+.833198866184046*t2-1.62153141633832+10.7191476020505*r1+6.19050752434099*r4+6.46892827744991*r7-.15773422401843*t1+22.9548337765416*r3+13.2568443369017*r6+13.8530766468144*r9-.337784591359295*t3)^2+(-21.4717881919623*r3-12.4003578706288*r6-12.9580693345224*r9+.315961303486945*t3+6.66922254237138+21.7070640313443*r1+12.5362340557455*r4+13.1000566039334*r7-.319423430651098*t1+22.9548337782773*r2+13.2568443352531*r5+13.8530766433259*r8-.337784591337385*t2)^2+(-65.9377723150761*r1-12.678533244879*r4-65.0293030974106*r7+.955841723390729*t1+11.5835324790697+7.68982596884022*r2+1.47860188124137*r5+7.5838780437921*r8-.111472624096221*t2+11.9049207597142*r3+2.28908148248606*r6+11.7408986260292*r9-.17257513524552*t3)^2+(-49.571881779333*r2-9.53169524975009*r5-48.8888964859373*r8+.718599844159693*t2+14.0432100287845+7.6898259693682*r1+1.47860188123288*r4+7.58387804187672*r7-.111472624065637*t1+30.0526392395535*r3+5.77852985094098*r6+29.6385837317152*r9-.435646602436962*t3)^2+(-22.4583184276267*r3-4.31829173040524*r6-22.1488950108346*r9+.32555843242268*t3-12.0350031966363+11.904920759546*r1+2.28908148261245*r4+11.7408986234862*r7-.172575135204147*t1+30.0526392370654*r2+5.77852985129325*r5+29.6385837327811*r8-.435646602452044*t2)^2+(-40.2818933934206*r1+37.3415461911863*r4-17.5121421408269*r7+.688992135032061*t1+41.1079956272437+18.3480006638221*r2-17.0087018409058*r5+7.97660607993154*r8-.313829045441664*t2+19.8946971640516*r3-18.4424983689296*r6+8.64901659965967*r9-.340284150555745*t3)^2+(-39.9505168284587*r2+37.0343582140755*r5-17.3680795584234*r8+.68332418286889*t2-19.0229410779165+18.3480006624515*r1-17.0087018386759*r4+7.97660607742464*r7-.313829045473842*t1+20.0751637635565*r3-18.6097919416627*r6+8.72747261243189*r9-.343370898899277*t3)^2+(-36.6974975173012*r3+34.0187906543919*r6-15.9538626068613*r9+.627683682093741*t3-20.0272581058992+19.8946971612448*r1-18.4424983632605*r4+8.64901659883117*r7-.340284150571336*t1+20.0751637622239*r2-18.609791938382*r5+8.72747261433876*r8-.343370898879803*t2)^2+(-19.9003018252227*r1+2.10723968998899*r4-5.99083386660634*r7+.268355364500816*t1-6.36217996635187+32.4452671740533*r2-3.43562400998522*r5+9.76739986562233*r8-.437524092703596*t2+5.19806634264006*r3-.550422390906632*r6+1.56483817002714*r9-.0700958709468267*t3)^2+(-54.7542305404035*r2+5.79791647536792*r5-16.4833428943737*r8+.738360233327084*t2+12.3293109763825+32.4452671726755*r1-3.43562401018043*r4+9.76739986673756*r7-.437524092757061*t1+3.1084479408544*r3-.329153041695288*r6+.935774510511675*r9-.0419173883795401*t3)^2+(-73.6585215390464*r3+7.79968874305612*r6-22.1743353083965*r9+.99328440217389*t3-10.5500615738974+5.19806634229016*r1-.550422390946524*r4+1.5648381697327*r7-.0700958709446797*t1+3.10844794077716*r2-.329153041700441*r5+.935774510228754*r8-.041917388373134*t2)^2;
h:=sum_sqr_distances+g1*b1+g2*b2+g3*b3+g4*b4+g5*b5+g6*b6;
diff_t1:=diff(h,t1);
diff_t2:=diff(h,t2);
diff_t3:=diff(h,t3);
diff_r1:=diff(h,r1);
diff_r2:=diff(h,r2);
diff_r3:=diff(h,r3);
diff_r4:=diff(h,r4);
diff_r5:=diff(h,r5);
diff_r6:=diff(h,r6);
diff_r7:=diff(h,r7);
diff_r8:=diff(h,r8);
diff_r9:=diff(h,r9);
diff_b1:=diff(h,b1);
diff_b2:=diff(h,b2);
diff_b3:=diff(h,b3);
diff_b4:=diff(h,b4);
diff_b5:=diff(h,b5);
diff_b6:=diff(h,b6);
vars := [op(indets(h, And(name, Non(constant))))];
polysys:={diff_t1,diff_t2,diff_t3,diff_r1,diff_r4,diff_r7,diff_r2,diff_r5,diff_r8,diff_r3,diff_r6,diff_r9,diff_b1,diff_b2,diff_b3,diff_b4,diff_b5,diff_b6};
sols := CodeTools:-Usage(RootFinding:-Isolate(polysys, vars, output = numeric, method = RS));

And this is sage code (that couldn't find the groebner basis):

P.<r1,r2,r3,r4,r5,r6,r7,r8,r9,t1,t2,t3,b1,b2,b3,b4,b5,b6>=PolynomialRing(QQ,order='degrevlex')
g1=r1^2+r4^2+r7^2-1
g2=r1*r2+r4*r5+r7*r8
g3=r1*r3+r4*r6+r7*r9
g4=r2^2+r5^2+r8^2-1
g5=r2*r3+r5*r6+r8*r9
g6=r3^2+r6^2+r9^2-1
sum_sqr_distances=(-34.5792590705286*r1+17.0635530183776*r4-2.30671047587914*r7+.533429751140582*t1-18.2777571201152+5.34368522421251*r2-2.6369060119417*r5+.356466130795291*r8-.0824332491501039*t2+31.8951297362284*r3-15.7390369840122*r6+2.12765778880161*r9-.492023587996135*t3)^2+(-63.880273658711*r2+31.5224925463221*r5-4.26132023642126*r8+.98543576110074*t2+5.20415366982094+5.34368522429473*r1-2.63690601164137*r4+.356466130730839*r7-.0824332491771907*t1+5.63520538121055*r3-2.78076015494726*r6+.375912834341308*r9-.0869303242748373*t3)^2+(-31.1892504431195*r3+15.3907123123387*r6-2.08057004842228*r9+.481134487803446*t3+16.460313265992+31.8951297380977*r1-15.7390369788429*r4+2.12765778852522*r7-.492023588007365*t1+5.63520538145412*r2-2.78076015435067*r5+.375912834360444*r8-.086930324248257*t2)^2+(-20.1477543311821*r1+7.55350991666248*r4+20.8920429846501*r7+.506802937949341*t1-13.5125935907312+7.82881106057577*r2-2.9350666574299*r5-8.1180192368411*r8-.19692837123503*t2+18.2686582928059*r3-6.84902591482382*r6-18.9435302828672*r9-.459535566231505*t3)^2+(-36.6286508786965*r2+13.7322935856179*r5+37.9817688885839*r8+.921368583909397*t2-34.3325081149272+7.82881105959312*r1-2.93506665641182*r4-8.11801923407865*r7-.196928371252735*t1+7.29448206284227*r3-2.7347436184352*r6-7.56395131161327*r9-.183487691946913*t3)^2+(-22.7328194787774*r3+8.52266582628087*r6+23.5726043680174*r9+.5718284781815*t3+29.2151845257836+18.2686582944502*r1-6.84902591329222*r4-18.9435302865599*r7-.459535566194367*t1+7.2944820644144*r2-2.73474361877224*r5-7.56395131566163*r8-.183487691915587*t2)^2+(-33.7370053449296*r1+38.9258336170637*r4-60.1132663033064*r7+.996042632734926*t1-4.98803179031169+1.08999592941726*r2-1.25763978603382*r5+1.94217639880877*r8-.0321807583045741*t2+1.8259306385537*r3-2.10676292990297*r6+3.25347948355056*r9-.0539083045951421*t3)^2+(-25.0073507347857*r2+28.8535382444551*r5-44.5585943124607*r8+.738310564652533*t2+4.93804814541239+1.08999592907818*r1-1.25763978578301*r4+1.94217639918338*r7-.0321807583046471*t1+14.8482131236429*r3-17.1319021236029*r6+26.4568411007238*r9-.438374809459876*t3)^2+(-8.9977349393474*r3+10.3816070715198*r6-16.0323428536159*r9+.265646802616713*t3-2.58161819993127+1.82593063830369*r1-2.1067629296129*r4+3.25347948341273*r7-.0539083045952243*t1+14.8482131262288*r2-17.1319021246606*r5+26.4568410945*r8-.438374809459549*t2)^2+(-56.6725654800191*r1-43.1813795970078*r4-58.3887310201578*r7+.980525398272198*t1+49.0916863573367+5.78296846451955*r2+4.40630407967054*r5+5.95808902028457*r8-.100054539766321*t2+5.50887455808305*r3+4.19745958942679*r6+5.67569496876523*r9-.0953122798368383*t3)^2+(-28.0870406673401*r2-21.400781038534*r5-28.937575861748*r8+.48595041543225*t2+19.4018945247715+5.78296846409823*r1+4.40630407900952*r4+5.95808902050728*r7-.100054539765808*t1+28.302910438969*r3+21.5652619383799*r6+29.1599826218892*r9-.489685305322089*t3)^2+(-30.836717169852*r3-23.4958833859599*r6-31.7705184032215*r9+.533524186319051*t3-30.3978529558191+5.50887455772671*r1+4.19745958933706*r4+5.67569496903033*r7-.0953122798304703*t1+28.3029104392002*r2+21.5652619411541*r5+29.1599826221612*r8-.489685305291881*t2)^2+(-57.8205382202822*r1-33.3924384768228*r4-34.894277849845*r7+.850839830317679*t1-12.5672620764049+10.7191476042258*r2+6.19050752309509*r5+6.46892827657879*r8-.157734223996209*t2+21.7070640341081*r3+12.5362340547815*r6+13.1000566054682*r9-.319423430626817*t3)^2+(-56.6217108878986*r2-32.7000933511969*r5-34.1707942023208*r8+.833198866184046*t2-1.62153141633832+10.7191476020505*r1+6.19050752434099*r4+6.46892827744991*r7-.15773422401843*t1+22.9548337765416*r3+13.2568443369017*r6+13.8530766468144*r9-.337784591359295*t3)^2+(-21.4717881919623*r3-12.4003578706288*r6-12.9580693345224*r9+.315961303486945*t3+6.66922254237138+21.7070640313443*r1+12.5362340557455*r4+13.1000566039334*r7-.319423430651098*t1+22.9548337782773*r2+13.2568443352531*r5+13.8530766433259*r8-.337784591337385*t2)^2+(-65.9377723150761*r1-12.678533244879*r4-65.0293030974106*r7+.955841723390729*t1+11.5835324790697+7.68982596884022*r2+1.47860188124137*r5+7.5838780437921*r8-.111472624096221*t2+11.9049207597142*r3+2.28908148248606*r6+11.7408986260292*r9-.17257513524552*t3)^2+(-49.571881779333*r2-9.53169524975009*r5-48.8888964859373*r8+.718599844159693*t2+14.0432100287845+7.6898259693682*r1+1.47860188123288*r4+7.58387804187672*r7-.111472624065637*t1+30.0526392395535*r3+5.77852985094098*r6+29.6385837317152*r9-.435646602436962*t3)^2+(-22.4583184276267*r3-4.31829173040524*r6-22.1488950108346*r9+.32555843242268*t3-12.0350031966363+11.904920759546*r1+2.28908148261245*r4+11.7408986234862*r7-.172575135204147*t1+30.0526392370654*r2+5.77852985129325*r5+29.6385837327811*r8-.435646602452044*t2)^2+(-40.2818933934206*r1+37.3415461911863*r4-17.5121421408269*r7+.688992135032061*t1+41.1079956272437+18.3480006638221*r2-17.0087018409058*r5+7.97660607993154*r8-.313829045441664*t2+19.8946971640516*r3-18.4424983689296*r6+8.64901659965967*r9-.340284150555745*t3)^2+(-39.9505168284587*r2+37.0343582140755*r5-17.3680795584234*r8+.68332418286889*t2-19.0229410779165+18.3480006624515*r1-17.0087018386759*r4+7.97660607742464*r7-.313829045473842*t1+20.0751637635565*r3-18.6097919416627*r6+8.72747261243189*r9-.343370898899277*t3)^2+(-36.6974975173012*r3+34.0187906543919*r6-15.9538626068613*r9+.627683682093741*t3-20.0272581058992+19.8946971612448*r1-18.4424983632605*r4+8.64901659883117*r7-.340284150571336*t1+20.0751637622239*r2-18.609791938382*r5+8.72747261433876*r8-.343370898879803*t2)^2+(-19.9003018252227*r1+2.10723968998899*r4-5.99083386660634*r7+.268355364500816*t1-6.36217996635187+32.4452671740533*r2-3.43562400998522*r5+9.76739986562233*r8-.437524092703596*t2+5.19806634264006*r3-.550422390906632*r6+1.56483817002714*r9-.0700958709468267*t3)^2+(-54.7542305404035*r2+5.79791647536792*r5-16.4833428943737*r8+.738360233327084*t2+12.3293109763825+32.4452671726755*r1-3.43562401018043*r4+9.76739986673756*r7-.437524092757061*t1+3.1084479408544*r3-.329153041695288*r6+.935774510511675*r9-.0419173883795401*t3)^2+(-73.6585215390464*r3+7.79968874305612*r6-22.1743353083965*r9+.99328440217389*t3-10.5500615738974+5.19806634229016*r1-.550422390946524*r4+1.5648381697327*r7-.0700958709446797*t1+3.10844794077716*r2-.329153041700441*r5+.935774510228754*r8-.041917388373134*t2)^2
h=sum_sqr_distances+g1*b1+g2*b2+g3*b3+g4*b4+g5*b5+g6*b6
diff_t1=diff(h,t1)
diff_t2=diff(h,t2)
diff_t3=diff(h,t3)
diff_r1=diff(h,r1)
diff_r2=diff(h,r2)
diff_r3=diff(h,r3)
diff_r4=diff(h,r4)
diff_r5=diff(h,r5)
diff_r6=diff(h,r6)
diff_r7=diff(h,r7)
diff_r8=diff(h,r8)
diff_r9=diff(h,r9)
diff_b1=diff(h,b1)
diff_b2=diff(h,b2)
diff_b3=diff(h,b3)
diff_b4=diff(h,b4)
diff_b5=diff(h,b5)
diff_b6=diff(h,b6)
I=Ideal(g1,g2,g3,g4,g5,g6,diff_t1,diff_t2,diff_t3,diff_r1,diff_r2,diff_r3,diff_r4,diff_r5,diff_r6,diff_r7,diff_r8,diff_r9)
I=Ideal(diff_t1,diff_t2,diff_t3,diff_r1,diff_r2,diff_r3,diff_r4,diff_r5,diff_r6,diff_r7,diff_r8,diff_r9,diff_b1,diff_b2,diff_b3,diff_b4,diff_b5,diff_b6)
I.groebner_basis()
I.variety(RR)

And these are the 22 solutions the Maple found (all the real solutions that solve the equations): The goal is to get the same solutions from sage.

[[b1 = -6405.651236, b2 = 1097.011411, b3 = 6432.603484, b4 = -3486.767199, b5 = 2786.505511, b6 = -2066.461540, r1 = -.2735272365, r2 = -.4584555697, r3 = -.8455775195, r4 = .9594115168, r5 = -0.6729917007e-1, r6 = -.2738619418, r7 = -0.6864686727e-1, r8 = .8861655107, r9 = -.4582557095, t1 = -31.53181188, t2 = -3.035192389, t3 = -64.33835896],

[b1 = -663.0587184, b2 = 1206.645590, b3 = -935.8274112, b4 = -2827.613858, b5 = 1260.996624, b6 = -676.9562322, r1 = .8750945364, r2 = -.1796187040, r3 = -.4493847723, r4 = -.4474525861, r5 = -.6540696330, r6 = -.6099008922, r7 = -.1843793253, r8 = .7347993170, r9 = -.6527436159, t1 = 24.66279957, t2 = 6.035593829, t3 = -55.14919482], 

[b1 = -5334.007938, b2 = -147.4788994, b3 = 6381.507728, b4 = -1654.278431, b5 = 3038.269718, b6 = -2677.888758, r1 = 0.1140465611e-1, r2 = -.8980265159, r3 = -.4397934863, r4 = .8207951804, r5 = .2596099997, r6 = -.5088201253, r7 = -.5711087512, r8 = .3551774554, r9 = -.7400565989, t1 = -38.50311082, t2 = -47.94244185, t3 = -52.00642291], 

[b1 = -3711.964527, b2 = 3878.643381, b3 = -871.0350173, b4 = -4720.758037, b5 = 5739.216423, b6 = -3328.445679, r1 = -.3452025304, r2 = -.5900255619, r3 = -.7298664599, r4 = -.5720856277, r5 = .7487785844, r6 = -.3347367116, r7 = .7440115910, r8 = .3019941520, r9 = -.5960254060, t1 = 4.420063381, t2 = -25.83338983, t3 = -49.39760950], 

[b1 = -6771.196603, b2 = 3126.930183, b3 = 3836.296676, b4 = -2119.174006, b5 = -1053.266216, b6 = -647.0603393, r1 = -0.5288779601e-1, r2 = .2948075346, r3 = -.9540919235, r4 = .9579998211, r5 = -.2546859938, r6 = -.1318005592, r7 = .2818496477, r8 = .9209905331, r9 = .2689557845, t1 = -1.568329794, t2 = 41.81946440, t3 = -47.91552928], 

[b1 = -426.4877331, b2 = 1777.234977, b3 = -1396.594665, b4 = -4704.976941, b5 = 6548.202362, b6 = -2797.527674, r1 = .6772160397, r2 = -.2551001296, r3 = -.6901466217, r4 = -.3808728417, r5 = .6809888166, r6 = -.6254519247, r7 = .6295349982, r8 = .6864241804, r9 = .3640158382, t1 = 51.90734298, t2 = -10.61796786, t3 = -36.65155778], 

[b1 = -8345.957097, b2 = -5992.141964, b3 = 9771.580880, b4 = -9281.942970, b5 = 14067.10170, b6 = -7238.069438, r1 = -.4112595863, r2 = -.5902847582, r3 = -.6945714196, r4 = -.9059223617, r5 = .1803855392, r6 = .3831001589, r7 = .1008475446, r8 = -.7867813937, r9 = .6089374444, t1 = -25.97531493, t2 = -66.23689116, t3 = -31.46159720], 

[b1 = -5343.147703, b2 = 183.2763579, b3 = 5426.240402, b4 = -11788.39198, b5 = 16609.81042, b6 = -7181.846374, r1 = -.2988639430, r2 = -.6827291572, r3 = -.6667542587, r4 = .7307518828, r5 = -.6130817579, r6 = .3002206588, r7 = -.6137442703, r8 = -.3975068000, r9 = .6821336486, t1 = -51.64655336, t2 = -55.45375783, t3 = -29.08482105], 

[b1 = -4075.023103, b2 = 6883.346857, b3 = -1945.068213, b4 = -3311.752332, b5 = 3039.918275, b6 = -921.4062369, r1 = .5825663050, r2 = .8122102291, r3 = 0.3051301418e-1, r4 = -.8079724338, r5 = .5827884450, r6 = -0.8682266235e-1, r7 = 0.8830088656e-1, r8 = -0.2592628327e-1, r9 = -.9957563865, t1 = 23.77615250, t2 = 40.91304243, t3 = -28.03945694], 

[b1 = -6187.757714, b2 = 838.7708899, b3 = 6066.514065, b4 = -441.1250637, b5 = -851.5589307, b6 = -1128.553632, r1 = .2065219306, r2 = .9631666887, r3 = -.1722167877, r4 = .8113374284, r5 = -.2669555392, r6 = -.5200637629, r7 = -.5468823178, r8 = -0.3232135326e-1, r9 = -.8365853576, t1 = -21.72396020, t2 = 62.90274148, t3 = -22.56105906], 

[b1 = -3971.638517, b2 = 5211.591913, b3 = -2909.389068, b4 = -3415.632999, b5 = 2348.040874, b6 = -1624.438321, r1 = -.6376325216, r2 = -.7577247398, r3 = -.1388451874, r4 = -.6573617358, r5 = .6291742407, r6 = -.4147473004, r7 = .4016221056, r8 = -.1731848536, r9 = -.8992812078, t1 = -24.08083201, t2 = -42.77528618, t3 = -16.88667732], 

[b1 = -1107.397052, b2 = -1352.354473, b3 = 559.8732630, b4 = -682.7595891, b5 = 1919.821403, b6 = -459.8284277, r1 = -.5540008534, r2 = .8147846552, r3 = -.1709064659, r4 = .3838720628, r5 = .4321713781, r6 = .8160086638, r7 = .7387322206, r8 = .3864632785, r9 = -.5521963786, t1 = -3.462811975, t2 = 66.31134317, t3 = -11.39008932], 

[b1 = -1858.210974, b2 = -1443.942073, b3 = -117.7029385, b4 = -541.5565807, b5 = 635.7869277, b6 = -1292.459322, r1 = -.6056473654, r2 = .7430910328, r3 = -.2846172619, r4 = -.4570833521, r5 = -.6176622647, r6 = -.6399751058, r7 = .6513571049, r8 = .2575054246, r9 = -.7137400635, t1 = -8.170594439, t2 = 73.18220544, t3 = -5.574473809], 

[b1 = -2879.955409, b2 = -7247.457464, b3 = 7603.360417, b4 = -10386.60081, b5 = 15680.46439, b6 = -7326.146084, r1 = .8898800024, r2 = -.3777475308, r3 = .2557740885, r4 = -.2159488982, r5 = .1450669474, r6 = .9655680474, r7 = -.4018453119, r8 = -.9144738289, r9 = 0.4751801242e-1, t1 = 25.17284844, t2 = -56.81452504, t3 = 4.483386705], 

[b1 = -2594.500775, b2 = -8451.746216, b3 = 8378.142403, b4 = -8445.314669, b5 = 16539.21636, b6 = -7726.257147, r1 = -.8887915121, r2 = .4283658935, r3 = .1629487933, r4 = .2014992422, r5 = 0.4589445400e-1, r6 = .9784128753, r7 = -.4116402597, r8 = -.9024391172, r9 = .1271060041, t1 = -72.41708628, t2 = -1.180372243, t3 = 11.62696253], 

[b1 = -3386.721976, b2 = -9232.755155, b3 = 8735.844228, b4 = -8449.692294, b5 = 14675.00399, b6 = -7470.241638, r1 = .7020126763, r2 = -.7115667558, r3 = -0.2917112402e-1, r4 = -.6916841933, r5 = -.6714995329, r6 = -.2658220344, r7 = -.1695617265, r8 = -.2067876432, r9 = .9635806617, t1 = 22.56779868, t2 = -57.27997094, t3 = 12.66120812], 

[b1 = -2344.035915, b2 = 3947.708934, b3 = -879.5603548, b4 = -4851.200663, b5 = 7270.443175, b6 = -2742.299953, r1 = .4417879292, r2 = .7119951524, r3 = .5457896376, r4 = -.5754568251, r5 = .6916351055, r6 = -.4364519713, r7 = .6882389614, r8 = .1212591594, r9 = -.7152785110, t1 = 49.50818048, t2 = 50.77308450, t3 = 32.05737927], 

[b1 = -4793.592445, b2 = -9508.057512, b3 = 9867.840732, b4 = -7363.405470, b5 = 13671.66420, b6 = -8641.244153, r1 = -.8607833310, r2 = .4979577238, r3 = .1053098401, r4 = -.5071531704, r5 = -.8216734210, r6 = -.2600931582, r7 = -0.4298510042e-1, r8 = -.2772920743, r9 = .9598236227, t1 = -55.37291300, t2 = 22.92886207, t3 = 35.86152727], 

[b1 = -1143.596369, b2 = 1527.374908, b3 = 1286.733075, b4 = -1246.223196, b5 = 880.0474364, b6 = -176.7812153, r1 = .5096005566, r2 = -.5301666308, r3 = .6776655638, r4 = -0.1872847237e-1, r5 = .7805852008, r6 = .6247687481, r7 = .8602072524, r8 = .3310741426, r9 = -.3878574417, t1 = 62.72704338, t2 = -19.19220727, t3 = 40.08281887], 

[b1 = -6277.680746, b2 = -547.8928701, b3 = 6669.122409, b4 = -11168.08424, b5 = 15793.41027, b6 = -8033.605502, r1 = .4599469977, r2 = .3665077232, r3 = .8087773786, r4 = .5464600340, r5 = -.8347594860, r6 = 0.6751319714e-1, r7 = -.6998786970, r8 = -.4109120215, r9 = .5842269422, t1 = -10.38583601, t2 = 10.41107518, t3 = 61.92902662], 

[b1 = -9151.429703, b2 = -6008.117168, b3 = 11049.83952, b4 = -7190.606039, b5 = 13545.27447, b6 = -7223.768017, r1 = 0.7425420274e-1, r2 = .5809660735, r3 = .8105336112, r4 = -.9944330906, r5 = .1040687725, r6 = 0.1650814969e-1, r7 = -0.7476056307e-1, r8 = -.8072472434, r9 = .5854594317, t1 = -4.663325049, t2 = 4.554915592, t3 = 62.58462359], 

[b1 = -1226.728760, b2 = 1147.011945, b3 = -400.7753802, b4 = -4507.321778, b5 = 8005.881456, b6 = -3241.483736, r1 = -0.9032875350e-2, r2 = .7488743127, r3 = .6626504893, r4 = -.2759411564, r5 = .6350798638, r6 = -.7214776814, r7 = .9611320853, r8 = .1893695603, r9 = -.2009086466, t1 = 40.46849908, t2 = 60.56033489, t3 = 65.08406719]]

Solving a system of 18 polynomial equations in sagemath

I'm trying to solve a system of 18 polynomial equations in sage. The system is for sure solvable since I already solved it in Maple and got ALL the possible solutions (only real solutions). In most cases I got between 10 to 25 solutions. But since Maple is not an open source I cannot really use it. I'm trying to solve the same equations in sage. but so far I did not succeed.

Since it's the first time I write here, I'm not allowed to attach the Maple and Sage code (two files) that I wanted to attach. Instead, I copied them bellow. It took Maple 25 minutes to solve the equations (in the code bellow). and it found 22 solutions to the equations (I wrote below all the 22 solutions that Maple found). I used the command 'Isolate' in Maple to solve the equations (this command is used for solving polynomial equations). Unfortunately I cannot know how the 'Isolate' command is implemented (I can use the command 'showstat' in Maple and see partial implementation of 'Isolate' since some of the commands that are used inside 'Isolate' are compiled). But I could see that 'Isolate' uses 'Groebner basis' in order to solve the equations. Therefore I tried to convert the 18 polynomial equations in sage to groebner basis but the command I.groebner_basis() never finishes (in the example below). Is there maybe another way of getting the groebner basis of the 18 equations? or any other way of solving the problem (I wrote below) so that the solution is for some reason all I get is a single solution (for groebner basis) which is [1.0000000]. I suspect that the reason for that is that the coefficients are real numbers and not rational numbers. But I did not find any command in sage that converts expression of real coefficients into expression of rational coefficients. Anyone knows how to solve the 18 equations in sagemath (and to get exactly the 22 solutions that Maple found)?sure correct?

I'm attaching bellow both Maple's code (that succeeded to solve the equations) and Sage's code (that did not succeed). I'd appreciate any idea of how to solve the equations.

If it helps, here's the mathematical problem that I'm trying to solve: given a set of n 3D points P={p_1,p_2,...,p_n} and another set of n 3D lines H={h_1,h_2,...,h_n} (each line h_i is represented by a 3D point and a 3D unit vector). I'm trying to find the rotation matrix R=[r1,r2,r3;r4,r5,r6;r7,r8,r9] and a translation vector T=[t1,t2,t3] such that rotating the set P by R and then translating it by T will result in a new set of points PT={pt_1,...,pt_n} such that the sum of square distances between H and PT (sum_{i=1 to n}(dist(h_i,pt_i)^2)) will be minimal. So this is an optimization problem with constraints (the constraints are RR^T=I). so there are 12 variables in R and T. Using Lagrange Multipliers algorithm I added 6 more variables b1,...,b6 (the number of constraints from RR^T=I) and created a new function 'h' with 18 variables. the 18 equations are the derivation of 'h' by all the 18 variables (equal to zero). it is gurantee that one of the solutions to the 18 equations is the (global) minimum for R and T. but for that I have to find ALL the solutions to the equations (22 solutions in this example) just like Maple did.

Thanks

Here is Maple code: (and below sage's code)

restart;
g1:=r1^2+r4^2+r7^2-1;
g2:=r1*r2+r4*r5+r7*r8;
g3:=r1*r3+r4*r6+r7*r9;
g4:=r2^2+r5^2+r8^2-1;
g5:=r2*r3+r5*r6+r8*r9;
g6:=r3^2+r6^2+r9^2-1;
sum_sqr_distances:=(-34.5792590705286*r1+17.0635530183776*r4-2.30671047587914*r7+.533429751140582*t1-18.2777571201152+5.34368522421251*r2-2.6369060119417*r5+.356466130795291*r8-.0824332491501039*t2+31.8951297362284*r3-15.7390369840122*r6+2.12765778880161*r9-.492023587996135*t3)^2+(-63.880273658711*r2+31.5224925463221*r5-4.26132023642126*r8+.98543576110074*t2+5.20415366982094+5.34368522429473*r1-2.63690601164137*r4+.356466130730839*r7-.0824332491771907*t1+5.63520538121055*r3-2.78076015494726*r6+.375912834341308*r9-.0869303242748373*t3)^2+(-31.1892504431195*r3+15.3907123123387*r6-2.08057004842228*r9+.481134487803446*t3+16.460313265992+31.8951297380977*r1-15.7390369788429*r4+2.12765778852522*r7-.492023588007365*t1+5.63520538145412*r2-2.78076015435067*r5+.375912834360444*r8-.086930324248257*t2)^2+(-20.1477543311821*r1+7.55350991666248*r4+20.8920429846501*r7+.506802937949341*t1-13.5125935907312+7.82881106057577*r2-2.9350666574299*r5-8.1180192368411*r8-.19692837123503*t2+18.2686582928059*r3-6.84902591482382*r6-18.9435302828672*r9-.459535566231505*t3)^2+(-36.6286508786965*r2+13.7322935856179*r5+37.9817688885839*r8+.921368583909397*t2-34.3325081149272+7.82881105959312*r1-2.93506665641182*r4-8.11801923407865*r7-.196928371252735*t1+7.29448206284227*r3-2.7347436184352*r6-7.56395131161327*r9-.183487691946913*t3)^2+(-22.7328194787774*r3+8.52266582628087*r6+23.5726043680174*r9+.5718284781815*t3+29.2151845257836+18.2686582944502*r1-6.84902591329222*r4-18.9435302865599*r7-.459535566194367*t1+7.2944820644144*r2-2.73474361877224*r5-7.56395131566163*r8-.183487691915587*t2)^2+(-33.7370053449296*r1+38.9258336170637*r4-60.1132663033064*r7+.996042632734926*t1-4.98803179031169+1.08999592941726*r2-1.25763978603382*r5+1.94217639880877*r8-.0321807583045741*t2+1.8259306385537*r3-2.10676292990297*r6+3.25347948355056*r9-.0539083045951421*t3)^2+(-25.0073507347857*r2+28.8535382444551*r5-44.5585943124607*r8+.738310564652533*t2+4.93804814541239+1.08999592907818*r1-1.25763978578301*r4+1.94217639918338*r7-.0321807583046471*t1+14.8482131236429*r3-17.1319021236029*r6+26.4568411007238*r9-.438374809459876*t3)^2+(-8.9977349393474*r3+10.3816070715198*r6-16.0323428536159*r9+.265646802616713*t3-2.58161819993127+1.82593063830369*r1-2.1067629296129*r4+3.25347948341273*r7-.0539083045952243*t1+14.8482131262288*r2-17.1319021246606*r5+26.4568410945*r8-.438374809459549*t2)^2+(-56.6725654800191*r1-43.1813795970078*r4-58.3887310201578*r7+.980525398272198*t1+49.0916863573367+5.78296846451955*r2+4.40630407967054*r5+5.95808902028457*r8-.100054539766321*t2+5.50887455808305*r3+4.19745958942679*r6+5.67569496876523*r9-.0953122798368383*t3)^2+(-28.0870406673401*r2-21.400781038534*r5-28.937575861748*r8+.48595041543225*t2+19.4018945247715+5.78296846409823*r1+4.40630407900952*r4+5.95808902050728*r7-.100054539765808*t1+28.302910438969*r3+21.5652619383799*r6+29.1599826218892*r9-.489685305322089*t3)^2+(-30.836717169852*r3-23.4958833859599*r6-31.7705184032215*r9+.533524186319051*t3-30.3978529558191+5.50887455772671*r1+4.19745958933706*r4+5.67569496903033*r7-.0953122798304703*t1+28.3029104392002*r2+21.5652619411541*r5+29.1599826221612*r8-.489685305291881*t2)^2+(-57.8205382202822*r1-33.3924384768228*r4-34.894277849845*r7+.850839830317679*t1-12.5672620764049+10.7191476042258*r2+6.19050752309509*r5+6.46892827657879*r8-.157734223996209*t2+21.7070640341081*r3+12.5362340547815*r6+13.1000566054682*r9-.319423430626817*t3)^2+(-56.6217108878986*r2-32.7000933511969*r5-34.1707942023208*r8+.833198866184046*t2-1.62153141633832+10.7191476020505*r1+6.19050752434099*r4+6.46892827744991*r7-.15773422401843*t1+22.9548337765416*r3+13.2568443369017*r6+13.8530766468144*r9-.337784591359295*t3)^2+(-21.4717881919623*r3-12.4003578706288*r6-12.9580693345224*r9+.315961303486945*t3+6.66922254237138+21.7070640313443*r1+12.5362340557455*r4+13.1000566039334*r7-.319423430651098*t1+22.9548337782773*r2+13.2568443352531*r5+13.8530766433259*r8-.337784591337385*t2)^2+(-65.9377723150761*r1-12.678533244879*r4-65.0293030974106*r7+.955841723390729*t1+11.5835324790697+7.68982596884022*r2+1.47860188124137*r5+7.5838780437921*r8-.111472624096221*t2+11.9049207597142*r3+2.28908148248606*r6+11.7408986260292*r9-.17257513524552*t3)^2+(-49.571881779333*r2-9.53169524975009*r5-48.8888964859373*r8+.718599844159693*t2+14.0432100287845+7.6898259693682*r1+1.47860188123288*r4+7.58387804187672*r7-.111472624065637*t1+30.0526392395535*r3+5.77852985094098*r6+29.6385837317152*r9-.435646602436962*t3)^2+(-22.4583184276267*r3-4.31829173040524*r6-22.1488950108346*r9+.32555843242268*t3-12.0350031966363+11.904920759546*r1+2.28908148261245*r4+11.7408986234862*r7-.172575135204147*t1+30.0526392370654*r2+5.77852985129325*r5+29.6385837327811*r8-.435646602452044*t2)^2+(-40.2818933934206*r1+37.3415461911863*r4-17.5121421408269*r7+.688992135032061*t1+41.1079956272437+18.3480006638221*r2-17.0087018409058*r5+7.97660607993154*r8-.313829045441664*t2+19.8946971640516*r3-18.4424983689296*r6+8.64901659965967*r9-.340284150555745*t3)^2+(-39.9505168284587*r2+37.0343582140755*r5-17.3680795584234*r8+.68332418286889*t2-19.0229410779165+18.3480006624515*r1-17.0087018386759*r4+7.97660607742464*r7-.313829045473842*t1+20.0751637635565*r3-18.6097919416627*r6+8.72747261243189*r9-.343370898899277*t3)^2+(-36.6974975173012*r3+34.0187906543919*r6-15.9538626068613*r9+.627683682093741*t3-20.0272581058992+19.8946971612448*r1-18.4424983632605*r4+8.64901659883117*r7-.340284150571336*t1+20.0751637622239*r2-18.609791938382*r5+8.72747261433876*r8-.343370898879803*t2)^2+(-19.9003018252227*r1+2.10723968998899*r4-5.99083386660634*r7+.268355364500816*t1-6.36217996635187+32.4452671740533*r2-3.43562400998522*r5+9.76739986562233*r8-.437524092703596*t2+5.19806634264006*r3-.550422390906632*r6+1.56483817002714*r9-.0700958709468267*t3)^2+(-54.7542305404035*r2+5.79791647536792*r5-16.4833428943737*r8+.738360233327084*t2+12.3293109763825+32.4452671726755*r1-3.43562401018043*r4+9.76739986673756*r7-.437524092757061*t1+3.1084479408544*r3-.329153041695288*r6+.935774510511675*r9-.0419173883795401*t3)^2+(-73.6585215390464*r3+7.79968874305612*r6-22.1743353083965*r9+.99328440217389*t3-10.5500615738974+5.19806634229016*r1-.550422390946524*r4+1.5648381697327*r7-.0700958709446797*t1+3.10844794077716*r2-.329153041700441*r5+.935774510228754*r8-.041917388373134*t2)^2;
h:=sum_sqr_distances+g1*b1+g2*b2+g3*b3+g4*b4+g5*b5+g6*b6;
diff_t1:=diff(h,t1);
diff_t2:=diff(h,t2);
diff_t3:=diff(h,t3);
diff_r1:=diff(h,r1);
diff_r2:=diff(h,r2);
diff_r3:=diff(h,r3);
diff_r4:=diff(h,r4);
diff_r5:=diff(h,r5);
diff_r6:=diff(h,r6);
diff_r7:=diff(h,r7);
diff_r8:=diff(h,r8);
diff_r9:=diff(h,r9);
diff_b1:=diff(h,b1);
diff_b2:=diff(h,b2);
diff_b3:=diff(h,b3);
diff_b4:=diff(h,b4);
diff_b5:=diff(h,b5);
diff_b6:=diff(h,b6);
vars := [op(indets(h, And(name, Non(constant))))];
polysys:={diff_t1,diff_t2,diff_t3,diff_r1,diff_r4,diff_r7,diff_r2,diff_r5,diff_r8,diff_r3,diff_r6,diff_r9,diff_b1,diff_b2,diff_b3,diff_b4,diff_b5,diff_b6};
sols := CodeTools:-Usage(RootFinding:-Isolate(polysys, vars, output = numeric, method = RS));

And this is sage code (that couldn't find the groebner basis):

P.<r1,r2,r3,r4,r5,r6,r7,r8,r9,t1,t2,t3,b1,b2,b3,b4,b5,b6>=PolynomialRing(QQ,order='degrevlex')
g1=r1^2+r4^2+r7^2-1
g2=r1*r2+r4*r5+r7*r8
g3=r1*r3+r4*r6+r7*r9
g4=r2^2+r5^2+r8^2-1
g5=r2*r3+r5*r6+r8*r9
g6=r3^2+r6^2+r9^2-1
sum_sqr_distances=(-34.5792590705286*r1+17.0635530183776*r4-2.30671047587914*r7+.533429751140582*t1-18.2777571201152+5.34368522421251*r2-2.6369060119417*r5+.356466130795291*r8-.0824332491501039*t2+31.8951297362284*r3-15.7390369840122*r6+2.12765778880161*r9-.492023587996135*t3)^2+(-63.880273658711*r2+31.5224925463221*r5-4.26132023642126*r8+.98543576110074*t2+5.20415366982094+5.34368522429473*r1-2.63690601164137*r4+.356466130730839*r7-.0824332491771907*t1+5.63520538121055*r3-2.78076015494726*r6+.375912834341308*r9-.0869303242748373*t3)^2+(-31.1892504431195*r3+15.3907123123387*r6-2.08057004842228*r9+.481134487803446*t3+16.460313265992+31.8951297380977*r1-15.7390369788429*r4+2.12765778852522*r7-.492023588007365*t1+5.63520538145412*r2-2.78076015435067*r5+.375912834360444*r8-.086930324248257*t2)^2+(-20.1477543311821*r1+7.55350991666248*r4+20.8920429846501*r7+.506802937949341*t1-13.5125935907312+7.82881106057577*r2-2.9350666574299*r5-8.1180192368411*r8-.19692837123503*t2+18.2686582928059*r3-6.84902591482382*r6-18.9435302828672*r9-.459535566231505*t3)^2+(-36.6286508786965*r2+13.7322935856179*r5+37.9817688885839*r8+.921368583909397*t2-34.3325081149272+7.82881105959312*r1-2.93506665641182*r4-8.11801923407865*r7-.196928371252735*t1+7.29448206284227*r3-2.7347436184352*r6-7.56395131161327*r9-.183487691946913*t3)^2+(-22.7328194787774*r3+8.52266582628087*r6+23.5726043680174*r9+.5718284781815*t3+29.2151845257836+18.2686582944502*r1-6.84902591329222*r4-18.9435302865599*r7-.459535566194367*t1+7.2944820644144*r2-2.73474361877224*r5-7.56395131566163*r8-.183487691915587*t2)^2+(-33.7370053449296*r1+38.9258336170637*r4-60.1132663033064*r7+.996042632734926*t1-4.98803179031169+1.08999592941726*r2-1.25763978603382*r5+1.94217639880877*r8-.0321807583045741*t2+1.8259306385537*r3-2.10676292990297*r6+3.25347948355056*r9-.0539083045951421*t3)^2+(-25.0073507347857*r2+28.8535382444551*r5-44.5585943124607*r8+.738310564652533*t2+4.93804814541239+1.08999592907818*r1-1.25763978578301*r4+1.94217639918338*r7-.0321807583046471*t1+14.8482131236429*r3-17.1319021236029*r6+26.4568411007238*r9-.438374809459876*t3)^2+(-8.9977349393474*r3+10.3816070715198*r6-16.0323428536159*r9+.265646802616713*t3-2.58161819993127+1.82593063830369*r1-2.1067629296129*r4+3.25347948341273*r7-.0539083045952243*t1+14.8482131262288*r2-17.1319021246606*r5+26.4568410945*r8-.438374809459549*t2)^2+(-56.6725654800191*r1-43.1813795970078*r4-58.3887310201578*r7+.980525398272198*t1+49.0916863573367+5.78296846451955*r2+4.40630407967054*r5+5.95808902028457*r8-.100054539766321*t2+5.50887455808305*r3+4.19745958942679*r6+5.67569496876523*r9-.0953122798368383*t3)^2+(-28.0870406673401*r2-21.400781038534*r5-28.937575861748*r8+.48595041543225*t2+19.4018945247715+5.78296846409823*r1+4.40630407900952*r4+5.95808902050728*r7-.100054539765808*t1+28.302910438969*r3+21.5652619383799*r6+29.1599826218892*r9-.489685305322089*t3)^2+(-30.836717169852*r3-23.4958833859599*r6-31.7705184032215*r9+.533524186319051*t3-30.3978529558191+5.50887455772671*r1+4.19745958933706*r4+5.67569496903033*r7-.0953122798304703*t1+28.3029104392002*r2+21.5652619411541*r5+29.1599826221612*r8-.489685305291881*t2)^2+(-57.8205382202822*r1-33.3924384768228*r4-34.894277849845*r7+.850839830317679*t1-12.5672620764049+10.7191476042258*r2+6.19050752309509*r5+6.46892827657879*r8-.157734223996209*t2+21.7070640341081*r3+12.5362340547815*r6+13.1000566054682*r9-.319423430626817*t3)^2+(-56.6217108878986*r2-32.7000933511969*r5-34.1707942023208*r8+.833198866184046*t2-1.62153141633832+10.7191476020505*r1+6.19050752434099*r4+6.46892827744991*r7-.15773422401843*t1+22.9548337765416*r3+13.2568443369017*r6+13.8530766468144*r9-.337784591359295*t3)^2+(-21.4717881919623*r3-12.4003578706288*r6-12.9580693345224*r9+.315961303486945*t3+6.66922254237138+21.7070640313443*r1+12.5362340557455*r4+13.1000566039334*r7-.319423430651098*t1+22.9548337782773*r2+13.2568443352531*r5+13.8530766433259*r8-.337784591337385*t2)^2+(-65.9377723150761*r1-12.678533244879*r4-65.0293030974106*r7+.955841723390729*t1+11.5835324790697+7.68982596884022*r2+1.47860188124137*r5+7.5838780437921*r8-.111472624096221*t2+11.9049207597142*r3+2.28908148248606*r6+11.7408986260292*r9-.17257513524552*t3)^2+(-49.571881779333*r2-9.53169524975009*r5-48.8888964859373*r8+.718599844159693*t2+14.0432100287845+7.6898259693682*r1+1.47860188123288*r4+7.58387804187672*r7-.111472624065637*t1+30.0526392395535*r3+5.77852985094098*r6+29.6385837317152*r9-.435646602436962*t3)^2+(-22.4583184276267*r3-4.31829173040524*r6-22.1488950108346*r9+.32555843242268*t3-12.0350031966363+11.904920759546*r1+2.28908148261245*r4+11.7408986234862*r7-.172575135204147*t1+30.0526392370654*r2+5.77852985129325*r5+29.6385837327811*r8-.435646602452044*t2)^2+(-40.2818933934206*r1+37.3415461911863*r4-17.5121421408269*r7+.688992135032061*t1+41.1079956272437+18.3480006638221*r2-17.0087018409058*r5+7.97660607993154*r8-.313829045441664*t2+19.8946971640516*r3-18.4424983689296*r6+8.64901659965967*r9-.340284150555745*t3)^2+(-39.9505168284587*r2+37.0343582140755*r5-17.3680795584234*r8+.68332418286889*t2-19.0229410779165+18.3480006624515*r1-17.0087018386759*r4+7.97660607742464*r7-.313829045473842*t1+20.0751637635565*r3-18.6097919416627*r6+8.72747261243189*r9-.343370898899277*t3)^2+(-36.6974975173012*r3+34.0187906543919*r6-15.9538626068613*r9+.627683682093741*t3-20.0272581058992+19.8946971612448*r1-18.4424983632605*r4+8.64901659883117*r7-.340284150571336*t1+20.0751637622239*r2-18.609791938382*r5+8.72747261433876*r8-.343370898879803*t2)^2+(-19.9003018252227*r1+2.10723968998899*r4-5.99083386660634*r7+.268355364500816*t1-6.36217996635187+32.4452671740533*r2-3.43562400998522*r5+9.76739986562233*r8-.437524092703596*t2+5.19806634264006*r3-.550422390906632*r6+1.56483817002714*r9-.0700958709468267*t3)^2+(-54.7542305404035*r2+5.79791647536792*r5-16.4833428943737*r8+.738360233327084*t2+12.3293109763825+32.4452671726755*r1-3.43562401018043*r4+9.76739986673756*r7-.437524092757061*t1+3.1084479408544*r3-.329153041695288*r6+.935774510511675*r9-.0419173883795401*t3)^2+(-73.6585215390464*r3+7.79968874305612*r6-22.1743353083965*r9+.99328440217389*t3-10.5500615738974+5.19806634229016*r1-.550422390946524*r4+1.5648381697327*r7-.0700958709446797*t1+3.10844794077716*r2-.329153041700441*r5+.935774510228754*r8-.041917388373134*t2)^2
sum_sqr_distances=P(sum_sqr_distances)
h=sum_sqr_distances+g1*b1+g2*b2+g3*b3+g4*b4+g5*b5+g6*b6
diff_t1=diff(h,t1)
diff_t2=diff(h,t2)
diff_t3=diff(h,t3)
diff_r1=diff(h,r1)
diff_r2=diff(h,r2)
diff_r3=diff(h,r3)
diff_r4=diff(h,r4)
diff_r5=diff(h,r5)
diff_r6=diff(h,r6)
diff_r7=diff(h,r7)
diff_r8=diff(h,r8)
diff_r9=diff(h,r9)
diff_b1=diff(h,b1)
diff_b2=diff(h,b2)
diff_b3=diff(h,b3)
diff_b4=diff(h,b4)
diff_b5=diff(h,b5)
diff_b6=diff(h,b6)
I=Ideal(diff_t1,diff_t2,diff_t3,diff_r1,diff_r2,diff_r3,diff_r4,diff_r5,diff_r6,diff_r7,diff_r8,diff_r9,diff_b1,diff_b2,diff_b3,diff_b4,diff_b5,diff_b6)
I.groebner_basis()
I.variety(RR)

And these are the 22 solutions the Maple found (all the real solutions that solve the equations): The goal is to get the same solutions from sage.

[[b1 = -6405.651236, b2 = 1097.011411, b3 = 6432.603484, b4 = -3486.767199, b5 = 2786.505511, b6 = -2066.461540, r1 = -.2735272365, r2 = -.4584555697, r3 = -.8455775195, r4 = .9594115168, r5 = -0.6729917007e-1, r6 = -.2738619418, r7 = -0.6864686727e-1, r8 = .8861655107, r9 = -.4582557095, t1 = -31.53181188, t2 = -3.035192389, t3 = -64.33835896],

[b1 = -663.0587184, b2 = 1206.645590, b3 = -935.8274112, b4 = -2827.613858, b5 = 1260.996624, b6 = -676.9562322, r1 = .8750945364, r2 = -.1796187040, r3 = -.4493847723, r4 = -.4474525861, r5 = -.6540696330, r6 = -.6099008922, r7 = -.1843793253, r8 = .7347993170, r9 = -.6527436159, t1 = 24.66279957, t2 = 6.035593829, t3 = -55.14919482], 

[b1 = -5334.007938, b2 = -147.4788994, b3 = 6381.507728, b4 = -1654.278431, b5 = 3038.269718, b6 = -2677.888758, r1 = 0.1140465611e-1, r2 = -.8980265159, r3 = -.4397934863, r4 = .8207951804, r5 = .2596099997, r6 = -.5088201253, r7 = -.5711087512, r8 = .3551774554, r9 = -.7400565989, t1 = -38.50311082, t2 = -47.94244185, t3 = -52.00642291], 

[b1 = -3711.964527, b2 = 3878.643381, b3 = -871.0350173, b4 = -4720.758037, b5 = 5739.216423, b6 = -3328.445679, r1 = -.3452025304, r2 = -.5900255619, r3 = -.7298664599, r4 = -.5720856277, r5 = .7487785844, r6 = -.3347367116, r7 = .7440115910, r8 = .3019941520, r9 = -.5960254060, t1 = 4.420063381, t2 = -25.83338983, t3 = -49.39760950], 

[b1 = -6771.196603, b2 = 3126.930183, b3 = 3836.296676, b4 = -2119.174006, b5 = -1053.266216, b6 = -647.0603393, r1 = -0.5288779601e-1, r2 = .2948075346, r3 = -.9540919235, r4 = .9579998211, r5 = -.2546859938, r6 = -.1318005592, r7 = .2818496477, r8 = .9209905331, r9 = .2689557845, t1 = -1.568329794, t2 = 41.81946440, t3 = -47.91552928], 

[b1 = -426.4877331, b2 = 1777.234977, b3 = -1396.594665, b4 = -4704.976941, b5 = 6548.202362, b6 = -2797.527674, r1 = .6772160397, r2 = -.2551001296, r3 = -.6901466217, r4 = -.3808728417, r5 = .6809888166, r6 = -.6254519247, r7 = .6295349982, r8 = .6864241804, r9 = .3640158382, t1 = 51.90734298, t2 = -10.61796786, t3 = -36.65155778], 

[b1 = -8345.957097, b2 = -5992.141964, b3 = 9771.580880, b4 = -9281.942970, b5 = 14067.10170, b6 = -7238.069438, r1 = -.4112595863, r2 = -.5902847582, r3 = -.6945714196, r4 = -.9059223617, r5 = .1803855392, r6 = .3831001589, r7 = .1008475446, r8 = -.7867813937, r9 = .6089374444, t1 = -25.97531493, t2 = -66.23689116, t3 = -31.46159720], 

[b1 = -5343.147703, b2 = 183.2763579, b3 = 5426.240402, b4 = -11788.39198, b5 = 16609.81042, b6 = -7181.846374, r1 = -.2988639430, r2 = -.6827291572, r3 = -.6667542587, r4 = .7307518828, r5 = -.6130817579, r6 = .3002206588, r7 = -.6137442703, r8 = -.3975068000, r9 = .6821336486, t1 = -51.64655336, t2 = -55.45375783, t3 = -29.08482105], 

[b1 = -4075.023103, b2 = 6883.346857, b3 = -1945.068213, b4 = -3311.752332, b5 = 3039.918275, b6 = -921.4062369, r1 = .5825663050, r2 = .8122102291, r3 = 0.3051301418e-1, r4 = -.8079724338, r5 = .5827884450, r6 = -0.8682266235e-1, r7 = 0.8830088656e-1, r8 = -0.2592628327e-1, r9 = -.9957563865, t1 = 23.77615250, t2 = 40.91304243, t3 = -28.03945694], 

[b1 = -6187.757714, b2 = 838.7708899, b3 = 6066.514065, b4 = -441.1250637, b5 = -851.5589307, b6 = -1128.553632, r1 = .2065219306, r2 = .9631666887, r3 = -.1722167877, r4 = .8113374284, r5 = -.2669555392, r6 = -.5200637629, r7 = -.5468823178, r8 = -0.3232135326e-1, r9 = -.8365853576, t1 = -21.72396020, t2 = 62.90274148, t3 = -22.56105906], 

[b1 = -3971.638517, b2 = 5211.591913, b3 = -2909.389068, b4 = -3415.632999, b5 = 2348.040874, b6 = -1624.438321, r1 = -.6376325216, r2 = -.7577247398, r3 = -.1388451874, r4 = -.6573617358, r5 = .6291742407, r6 = -.4147473004, r7 = .4016221056, r8 = -.1731848536, r9 = -.8992812078, t1 = -24.08083201, t2 = -42.77528618, t3 = -16.88667732], 

[b1 = -1107.397052, b2 = -1352.354473, b3 = 559.8732630, b4 = -682.7595891, b5 = 1919.821403, b6 = -459.8284277, r1 = -.5540008534, r2 = .8147846552, r3 = -.1709064659, r4 = .3838720628, r5 = .4321713781, r6 = .8160086638, r7 = .7387322206, r8 = .3864632785, r9 = -.5521963786, t1 = -3.462811975, t2 = 66.31134317, t3 = -11.39008932], 

[b1 = -1858.210974, b2 = -1443.942073, b3 = -117.7029385, b4 = -541.5565807, b5 = 635.7869277, b6 = -1292.459322, r1 = -.6056473654, r2 = .7430910328, r3 = -.2846172619, r4 = -.4570833521, r5 = -.6176622647, r6 = -.6399751058, r7 = .6513571049, r8 = .2575054246, r9 = -.7137400635, t1 = -8.170594439, t2 = 73.18220544, t3 = -5.574473809], 

[b1 = -2879.955409, b2 = -7247.457464, b3 = 7603.360417, b4 = -10386.60081, b5 = 15680.46439, b6 = -7326.146084, r1 = .8898800024, r2 = -.3777475308, r3 = .2557740885, r4 = -.2159488982, r5 = .1450669474, r6 = .9655680474, r7 = -.4018453119, r8 = -.9144738289, r9 = 0.4751801242e-1, t1 = 25.17284844, t2 = -56.81452504, t3 = 4.483386705], 

[b1 = -2594.500775, b2 = -8451.746216, b3 = 8378.142403, b4 = -8445.314669, b5 = 16539.21636, b6 = -7726.257147, r1 = -.8887915121, r2 = .4283658935, r3 = .1629487933, r4 = .2014992422, r5 = 0.4589445400e-1, r6 = .9784128753, r7 = -.4116402597, r8 = -.9024391172, r9 = .1271060041, t1 = -72.41708628, t2 = -1.180372243, t3 = 11.62696253], 

[b1 = -3386.721976, b2 = -9232.755155, b3 = 8735.844228, b4 = -8449.692294, b5 = 14675.00399, b6 = -7470.241638, r1 = .7020126763, r2 = -.7115667558, r3 = -0.2917112402e-1, r4 = -.6916841933, r5 = -.6714995329, r6 = -.2658220344, r7 = -.1695617265, r8 = -.2067876432, r9 = .9635806617, t1 = 22.56779868, t2 = -57.27997094, t3 = 12.66120812], 

[b1 = -2344.035915, b2 = 3947.708934, b3 = -879.5603548, b4 = -4851.200663, b5 = 7270.443175, b6 = -2742.299953, r1 = .4417879292, r2 = .7119951524, r3 = .5457896376, r4 = -.5754568251, r5 = .6916351055, r6 = -.4364519713, r7 = .6882389614, r8 = .1212591594, r9 = -.7152785110, t1 = 49.50818048, t2 = 50.77308450, t3 = 32.05737927], 

[b1 = -4793.592445, b2 = -9508.057512, b3 = 9867.840732, b4 = -7363.405470, b5 = 13671.66420, b6 = -8641.244153, r1 = -.8607833310, r2 = .4979577238, r3 = .1053098401, r4 = -.5071531704, r5 = -.8216734210, r6 = -.2600931582, r7 = -0.4298510042e-1, r8 = -.2772920743, r9 = .9598236227, t1 = -55.37291300, t2 = 22.92886207, t3 = 35.86152727], 

[b1 = -1143.596369, b2 = 1527.374908, b3 = 1286.733075, b4 = -1246.223196, b5 = 880.0474364, b6 = -176.7812153, r1 = .5096005566, r2 = -.5301666308, r3 = .6776655638, r4 = -0.1872847237e-1, r5 = .7805852008, r6 = .6247687481, r7 = .8602072524, r8 = .3310741426, r9 = -.3878574417, t1 = 62.72704338, t2 = -19.19220727, t3 = 40.08281887], 

[b1 = -6277.680746, b2 = -547.8928701, b3 = 6669.122409, b4 = -11168.08424, b5 = 15793.41027, b6 = -8033.605502, r1 = .4599469977, r2 = .3665077232, r3 = .8087773786, r4 = .5464600340, r5 = -.8347594860, r6 = 0.6751319714e-1, r7 = -.6998786970, r8 = -.4109120215, r9 = .5842269422, t1 = -10.38583601, t2 = 10.41107518, t3 = 61.92902662], 

[b1 = -9151.429703, b2 = -6008.117168, b3 = 11049.83952, b4 = -7190.606039, b5 = 13545.27447, b6 = -7223.768017, r1 = 0.7425420274e-1, r2 = .5809660735, r3 = .8105336112, r4 = -.9944330906, r5 = .1040687725, r6 = 0.1650814969e-1, r7 = -0.7476056307e-1, r8 = -.8072472434, r9 = .5854594317, t1 = -4.663325049, t2 = 4.554915592, t3 = 62.58462359], 

[b1 = -1226.728760, b2 = 1147.011945, b3 = -400.7753802, b4 = -4507.321778, b5 = 8005.881456, b6 = -3241.483736, r1 = -0.9032875350e-2, r2 = .7488743127, r3 = .6626504893, r4 = -.2759411564, r5 = .6350798638, r6 = -.7214776814, r7 = .9611320853, r8 = .1893695603, r9 = -.2009086466, t1 = 40.46849908, t2 = 60.56033489, t3 = 65.08406719]]