I'm working with systems of 10 equations in 14 variables, and for such a system I'd like to know whether any solution exists (complex values are fine). Because the system is under-determined, I expect that much of the time there would be infinitely many solutions that could be given by parameterizing some of the variables. I'm using solve(), and having a lot of success. Often I can get Sage to spit out nice parameterized solutions.
But a lot of the time Sage does one of two things, and I don't understand what they mean:
- spits back out the whole equation, cleaned up a little but not solved in the slightest
- runs forever and never finishes
My question is, do these mean different things about my systems?
Here are a couple of few examples. First define some variables:
a, b, c, d, e, f, g, h, i, j = var('a, b, c, d, e, f, g, h, i, j')
t = var('t', 16)
Code that just spits back the equation:This one gets solved with solutions involving a few real parameters
(no problem there):
eq_a = [t_1 + 1 == 0,
t_11 + t_5 == j,
t_10 + t_12 + t_14 + t_3 + t_6 == 0,
(t_10 + t_3 + t_6)*t_11 + t_3*t_5 == 0,
t_13 + t_2 + t_4 + t_7 + 1 == 0,
(t_1 + 1)*t_13 + t_1*t_2 + t_1*t_4 + t_1*t_7 + t_1 + 1 == 0,
(t_13 + t_2 + t_4 + t_7 + 1)*t_14 + t_10*(t_2 + t_4 + t_7 + 1)
+ t_12*(t_2 + t_4 + t_7 + 1) + t_2*t_3 + (t_2 + t_4)*t_6 == 0,
t_1*t_2*t_3 + (t_1*t_2 + t_1*t_4 + t_1*t_7 + t_1 + 1)*t_10
+ (t_1*t_2 + t_1*t_4 + t_1*t_7 + t_1 + 1)*t_12 + ((t_1 + 1)*t_13
+ t_1*t_2 + t_1*t_4 + t_1*t_7 + t_1 + 1)*t_14
+ (t_1*t_2 + t_1*t_4)*t_6 == 0,
t_2*t_3*t_5 + (t_10*(t_2 + t_4 + t_7 + 1) + t_2*t_3
+ (t_2 + t_4)*t_6)*t_11 == 0,
t_1*t_2*t_3*t_5 + (t_1*t_2*t_3 + (t_1*t_2 + t_1*t_4 + t_1*t_7
+ t_1 + 1)*t_10 + (t_1*t_2 + t_1*t_4)*t_6)*t_11 == d]
solve(eq_a,
t_1, t_2, t_3, t_4, t_5, t_6, t_7, t_8,
t_9, t_10, t_11, t_12, t_13, t_14)
Code that This one runs and never finishes:
eq_b = [t_10 + t_4 == a,
(t_10 + t_4)*t_11 + (t_10 + t_4)*t_15 + t_4*t_5 + t_4*t_9 == b,
t_4*t_5*t_6 + t_4*t_5*t_8
+ ((t_10 + t_4)*t_11 + t_4*t_5 + t_4*t_9)*t_12
+ ((t_10 + t_4)*t_11 + t_4*t_5 + t_4*t_9)*t_14 == c,
t_4*t_5*t_6*t_7 + (t_4*t_5*t_6 + t_4*t_5*t_8
+ ((t_10 + t_4)*t_11 + t_4*t_5 + t_4*t_9)*t_12)*t_13 == d,
t_11 + t_15 + t_3 + t_5 + t_9 == e,
(t_11 + t_3 + t_5 + t_9)*t_12
+ (t_11 + t_3 + t_5 + t_9)*t_14
+ (t_3 + t_5)*t_6 + (t_3 + t_5)*t_8 == f,
(t_3 + t_5)*t_6*t_7 + ((t_11 + t_3 + t_5 + t_9)*t_12
+ (t_3 + t_5)*t_6 + (t_3 + t_5)*t_8)*t_13 == g,
t_12 + t_14 + t_2 + t_6 + t_8 == h,
(t_12 + t_2 + t_6 + t_8)*t_13 + (t_2 + t_6)*t_7 == i,
t_1 + t_13 + t_7 == j]
solve(eq_b,
t_1, t_2, t_3, t_4, t_5, t_6, t_7, t_8,
t_9, t_10, t_11, t_12, t_13, t_14, t_15)
This one returns a reordered list of the same equations.
eq_c = [t_11 + t_4 == 0,
(t_11 + t_4)*t_12 + t_10*t_4 + t_4*t_5 + t_4*t_8 == a,
((t_11 + t_4)*t_12 + t_10*t_4 + t_4*t_5 + t_4*t_8)*t_13
+ t_4*t_5 + (t_4*t_5 + t_4*t_8)*t_9 == a,
t_4*t_5*t_7 == 0,
t_10 + t_12 + t_3 + t_5 + t_8 == a,
(t_10 + t_12 + t_3 + t_5 + t_8)*t_13
+ (t_3 + t_5 + t_8)*t_9 + t_3 + t_5 == a,
(t_3 + t_5)*t_7 == a,
t_13 + t_2 + t_9 + 1 == a,
(t_2 + 1)*t_7 == a,
t_7 + 1 == a]
solve(eq_c,
t_1, t_2, t_3, t_4, t_5, t_6, t_7, t_8,
t_9, t_10, t_11, t_12, t_13, t_14)