Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

sol = solve([x^2+y^2+z^2==2, x^3+y^3+z^3==2,x^4+y^4+z^4==2], x,y,z)

Hello, to answer a question asked on QUORA I asked SageMath to solve the following system of 3 equations with 3 unknowns.

var('x,y,z')
sol = solve([x^2+y^2+z^2==2, x^3+y^3+z^3==2, x^4+y^4+z^4==2] , X Y Z)
for s in sol:
     print s[0], s[1], s[2]

I got 9 solutions: 3 real and 6 complex.

x == 1 y == 1 z == 0
x == 0 y == 1 z == 1
x == 1.240011837821841 y == (-0.6200059048588131 + 0.3914357752931961*I) z == (-0.6200059048588134 - 0.3914357752931976*I)
x == 1.240011837821841 y == (-0.6200059048588131 - 0.3914357752931961*I) z == (-0.6200059048588134 + 0.3914357752931976*I)
x == (-0.6200059048588129 - 0.391435775293197*I) y == (-0.6200059048588129 + 0.391435775293197*I) z == 1.240011837821841
x == (-0.6200059048588129 - 0.391435775293197*I) y == (1.240011809717629 + 2.19850512568856e-15*I) z == (-0.6200059048588252 + 0.3914357752932104*I)
x == (-0.6200059048588129 + 0.391435775293197*I) y == (-0.6200059048588158 - 0.3914357752931977*I) z == (1.240011809717626 - 4.44089209850063e-16*I)
x == (-0.6200059048588129 + 0.391435775293197*I) y == (1.240011809717633 + 2.41169094738639e-14*I) z == (-0.620005904858701 - 0.3914357752932433*I)
x == 1 y == 0 z == 1

A reader answered me this: In fact, there are 15 solutions. SageMath forgets certain permutations. And it doesn't give the exact values (except for the three obvious real solutions).

Can any of you explain to me how to get all the exact solutions (with exponentials)? I thank you in advance.