Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 0 years ago

dan_fulea gravatar image

Let us see what happens, and which equations can be eliminated with bare hands.

First of all, there are some simple dependencies. I have copy+pasted the variable declaration (and we need only a b c d and not also the other variables) and the man linear expressions in them, that are finally made equations.

sage: bool(f1 == -2*f2)
True

So we only keep the simpler f2 and forget about f1.

sage: bool(f3 == -2*f4)
True

So we only keep the simpler f4 and forget about f3.

sage: bool(f5 == -2*f6)
True

So we only keep the simpler f6 and forget about f5.

sage: bool(f7 == -2*f8)
True

So we only keep the simpler f8 and forget about f7.

sage: bool(f9 == -2*f10)
True

So we only keep the simpler f12 and forget about f11.

sage: bool(f11 == -2*f12)
True

So we only keep the simpler f10 and forget about f9.

sage: bool(f13 == -2*f14)
True

So we only keep the simpler f14 and forget about f13.

sage: bool(f15 == -2*f16)
True

So we only keep the simpler f16 and forget about f15.


We test that the remained homogeneous system still has only the trivial solution:

equations = [f == 0 for f in [f2, f4, f6, f8, f10, f12, f14, f16]]
solve(equations, [a, b, c, d])

This delivers:

[[a == 0, b == 0, c == 0, d == 0]]

sage: equations
[-7*a + 51*b - 52*c - 12*d == 0,
 26*a + 6*b + 71*c + 69*d == 0,
 -14*a + 102*b - 104*c - 24*d == 0,
 52*a + 12*b + 142*c + 138*d == 0,
 -102*a + 146*b + 24*c - 88*d == 0,
 -12*a + 44*b - 138*c + 278*d == 0,
 -204*a + 292*b + 48*c - 176*d == 0,
 -24*a + 88*b - 276*c + 556*d == 0]

So above i printed again the remained equations. We observe that there are further easy dependencies:

sage: bool(2*f2 == f6)
True
sage: bool(2*f4 == f8)
True
sage: bool(2*f10 == f14)
True
sage: bool(2*f12 == f16)
True

So we keep only the easier equations, and ask again about solutions of the simplified system...


equations = [f == 0 for f in [f2, f4, f10, f12]]
solve(equations, [a, b, c, d])

And indeed:

sage: equations = [f == 0 for f in [f2, f4, f10, f12]]
sage: solve(equations, [a, b, c, d])
[[a == 0, b == 0, c == 0, d == 0]]

So the given system is equivalent to the system of the isolated four equations:

sage: equations
[-7*a + 51*b - 52*c - 12*d == 0,
 26*a + 6*b + 71*c + 69*d == 0,
 -102*a + 146*b + 24*c - 88*d == 0,
 -12*a + 44*b - 138*c + 278*d == 0]

The matrix of the system is:

A = matrix(QQ, 4, 4, [
    [-7, 51, -52, -12],
    [26, 6, 71, 69],
    [-102, 146, 24, -88],
    [-12, 44, -138, 278], ])
A.det()

And we obtain a non-zero determinant:

-186674544
sage: A.det().factor()
-1 * 2^4 * 3^5 * 7 * 19^3

So the homogeneous system has only the trivial solution.


An other approach would be to isolate the coefficients of the whole system in a matrix, and ask for its range.

B = matrix(QQ, [[f.coefficient(myvar) for myvar in (a, b, c, d)]
    for f in [f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16]])
print(f"B has rank {B.rank()}")

This gives:

B has rank 4

Explicitly, the matrix of the system as built above using a double list comprehension is:

sage: B
[   14  -102   104    24]
[   -7    51   -52   -12]
[  -52   -12  -142  -138]
[   26     6    71    69]
[   28  -204   208    48]
[  -14   102  -104   -24]
[ -104   -24  -284  -276]
[   52    12   142   138]
[  204  -292   -48   176]
[ -102   146    24   -88]
[   24   -88   276  -556]
[  -12    44  -138   278]
[  408  -584   -96   352]
[ -204   292    48  -176]
[   48  -176   552 -1112]
[  -24    88  -276   556]