Solving multiple system of equation in sagemath

asked 2024-12-14 09:12:26 +0100

anonymous user

Anonymous

updated 2024-12-14 14:05:32 +0100

Max Alekseyev gravatar image

.

a,b,c,d,x,f,g,h,k,p,q,r,s,u,v,l,m,n= var('a b c d x f g h k p q r s u v l m n')

f1 = a*p+b*q+c*r+1

f2 = d*s+u*x+f*v-1

f3 = g*l+h*m+k*n-1

f4 = a*s+b*u+c*v

f5=a*l+b*m+c*n

f6=d*l+x*m+f*n

f7=a*p+d*s+g*l-1

f8=b*p+x*s+h*l+2

f9=c*p+f*s+k*l-1

f10=a*q+d*u+g*m

f11=b*q+x*u+h*m-1

f12= c*q+f*u+k*m

f13= a*r+d*v+g*n

f14= b*r+x*v+h*n-2

f15= c*r+f*v+k*n+1

solve([f1==0,f2==0,f3==0,f4==0,f5==0,f6==0,f7==0,f8==0,f9==0,f10==0,f11==0,f12==0,f13==0,f14==0,f15==0],a,b,c,d,x,f,g,h,k,p,q,r,s,u,v)

I am trying to solve these 15 system of equations but I am not getting any result. Is there any wrong here?

edit retag flag offensive close merge delete

Comments

I don't know if it is a typo but you need to put * for multiplication. a*p instead of ap, etc.

tolga gravatar imagetolga ( 2024-12-14 10:05:52 +0100 )edit

and use PolynomialRing + Groebner bases and not the symbolic ring.

FrédéricC gravatar imageFrédéricC ( 2024-12-14 10:44:44 +0100 )edit

@FrédéricC, can you please gave me the code. It will help me if possible. Thanks

rewi gravatar imagerewi ( 2024-12-14 11:12:20 +0100 )edit
3

See example in https://ask.sagemath.org/question/64672/

As for your system, at very least it has the following partial solution: {g: k, l: 1/k, x: 1/v, u: v, b: -c, r: 1/(-c), n: 0, m: 0, q: 0, p: 0, a: 0, s: (-h*v - 2*k*v)/k, d: 0, f: 0}.

Max Alekseyev gravatar imageMax Alekseyev ( 2024-12-14 14:47:38 +0100 )edit

@Max Alekseyev, Thank you so much for your solutions. This is great

rewi gravatar imagerewi ( 2024-12-15 11:08:47 +0100 )edit