solving equation system with multiple solutions

20 views
Skip to first unread message

Benjamin Lang

unread,
Jun 25, 2014, 1:13:15 PM6/25/14
to sage-s...@googlegroups.com


I would like to print/show all the possible solutions of a system of equations, more specifically:
sage:x,y,z = var('x,y,z')
sage:eqn = solve([(0.5*(1/(sqrt(x^4+y^4-2*x^3*y-2*x*y^3+3*x^2*y^2-5*x^2-5*y^2+6*x*y+9)))*(4*x^3-6*x^2*y-2*y^3+6*x*y^2-10*x+6*y))==0, (0.5*(1/(sqrt(x^4+y^4-2*x^3*y-2*x*y^3+3*x^2*y^2-5*x^2-5*y^2+6*x*y+9)))*(4*y^3-6*x*y^2-2*x^3+6*y*x^2-10*y+6*x))==0],x,y)
sage:print(eqn)
 results in only one of the possible solutions:
[
[x == 0, y == 0]
]

I would like to show/print all the possible solutions, which should be; x1= 0 y1= 0, x2=sqrt(2) y2=(sqrt(2), x3=-sqrt(2) y3=-sqrt(2),x4=-2/3*sqrt(2) y4=2/3*sqrt(2),
x5= 2/3 *sqrt(2) y5= -2/3*sqrt(2). These solutions were acquired with mathematica using a similar method

Thank you in advance,
Ben
 
Message has been deleted

Dominique Laurain

unread,
Jun 25, 2014, 5:24:46 PM6/25/14
to sage-s...@googlegroups.com

I have same difficulty of not finding roots, even for one simple equation... :-)

R.<x,y>=QQ[]
f1(x) = x^6 + x^5 + x^4 + x^3 + x^2 + x + 1
eqn = solve([f1 == 0],x)
print(eqn)

[ 0 == x^6 + x^5 + x^4 + x^3 + x^2 + x + 1 ]
 
while removing x^6:

R.<x,y>=QQ[]
f1(x) = x^5 + x^4 + x^3 + x^2 + x + 1
eqn = solve([f1 == 0],x)
print(eqn)

[ x == -1/2*I*sqrt(3) + 1/2, x == 1/2*I*sqrt(3) + 1/2, x == -1, x == -1/2*I*sqrt(3) - 1/2, x == 1/2*I*sqrt(3) - 1/2 ]
Do I complain ? ;-)

Dominique
Reply all
Reply to author
Forward
0 new messages