ivanveliki

44 Reputation

2 Badges

15 years, 60 days

MaplePrimes Activity


These are answers submitted by ivanveliki

Another strange thing.

For 30x30 matrix

MTM[Det](M) gives an error after 2min

 "Error, (in LinearAlgebra:-LA_Main:-Determinant) object too large"

MTM[Det](W) and LinearAlgebra[Determinant](W) give results after few seconds

LinearAlgebra[Determinant](M) gives a result (I think it is correct), different from the above MTM function.

For larger matrices both functions for M give an error, both functions for W give incorrect results.

Is this some kind of a bug?

 I cannot imagine how structural softwares can solve the determinant of 100000x100000 matrix for 1 min, and Maple does this for 30x30 for 2 min (or in seconds, but wrong results)?

 

Also very strange thing.

The result of the "Determinant" function is correct only if I set the unknown variable as a constant, otherwise the result is wrong.

Same results with MTM[Det]:

MTM[Det](M) is correct

MTM[Det](W) is wrong

I have just found that the Determinant(W) is wrong and the expression 50x^3 shouldn't be there. Does anyone know why this function gives wrong results when the unknown variable is "x", and correct result when the variable is "lambda"?

Here is an example of a matrix 7x7

M

[[0,2.986666666,-17.60000000,24,0,0,0,0],[-1. lambda,-1.934222224,26.88000000,-105.6000000,120,0,0,0],[0.9333333334 lambda,0.3034074074-1. lambda,-11.60533334,107.5200000,-352.0000000,360,0,0],[-0.1777777778 lambda,0.9333333334 lambda,1.517037037-1. lambda,-38.68444447,298.6666667,-880.0000000,840,0],[0,-0.1777777778 lambda,0.9333333334 lambda,4.551111111-1. lambda,-96.71111120,672.0000000,-1848.000000,1680],[1,-1.836019358 10^(-26),0,0,0,0,0,0],[0,2,6,12,20,30,42,56],[0,0,6,24,60,120,210,336]]

 

Matrix(7, 7, {(1, 1) = 0, (1, 2) = 2.986666666, (1, 3) = -17.60000000, (1, 4) = 24, (1, 5) = 0, (1, 6) = 0, (1, 7) = 0, (2, 1) = -1.*lambda, (2, 2) = -1.934222224, (2, 3) = 26.88000000, (2, 4) = -105.6000000, (2, 5) = 120, (2, 6) = 0, (2, 7) = 0, (3, 1) = .9333333334*lambda, (3, 2) = .3034074074-1.*lambda, (3, 3) = -11.60533334, (3, 4) = 107.5200000, (3, 5) = -352.0000000, (3, 6) = 360, (3, 7) = 0, (4, 1) = -.1777777778*lambda, (4, 2) = .9333333334*lambda, (4, 3) = 1.517037037-1.*lambda, (4, 4) = -38.68444447, (4, 5) = 298.6666667, (4, 6) = -880.0000000, (4, 7) = 840, (5, 1) = 1, (5, 2) = -0.1836019358e-25, (5, 3) = 0, (5, 4) = 0, (5, 5) = 0, (5, 6) = 0, (5, 7) = 0, (6, 1) = 0, (6, 2) = 2, (6, 3) = 6, (6, 4) = 12, (6, 5) = 20, (6, 6) = 30, (6, 7) = 42, (7, 1) = 0, (7, 2) = 0, (7, 3) = 6, (7, 4) = 24, (7, 5) = 60, (7, 6) = 120, (7, 7) = 210})

My larger matrices are similar

Here is another weird problem

---------------------------------------------------

LinearAlgebra[Determinant](M);

-5.934525853*10^14+2.007044800*10^13*lambda-2.603833344*10^10*lambda^2

W:=eval(M,lambda=x)

LinearAlgebra[Determinant](W);

50.00000000*x^3+2.797477064*10^11+3.628849000*10^6*x^2-7.699481352*10^9*x

with(LinearAlgebra[Generic]):

 

Q[`0`], Q[`1`], Q[`+`], Q[`-`], Q[`*`], Q[`/`], Q[`=`] := 0, 1, `+`, `-`, `*`, `/`, `=`:

simplify(Determinant[Q](M, method = BerkowitzAlgorithm))

-7.699483256*10^9*lambda+3.628824866*10^6*lambda^2+2.797477280*10^11-0.1622906880e-2*lambda^3

simplify(Determinant[Q](W, method = BerkowitzAlgorithm))

-7.699483567*10^9*x+3.628825471*10^6*x^2-0.1622906880e-2*x^3+2.797477280*10^11

-------------------------------------------------

So, using BerkowitzAlgorithm on both M and W gives the same result, but the simple LinearAlgebra[Determinant] gives different results. Which one of the three expressions is right?

I cannot use LinearAlgebra.Eigenvalues as my problem is not a regular eigenvalue problem. The unknown variable is not situated only at the diagonal, but at other positions as well. The only way I can solve my problem is to find the determinant, which for 25x25 matrix is represented by a polynom of 10-12 members only. I am not sure how Maple calculates the determinant internally, so I do not know if I can avoid the "too big" message.

Regards

Page 1 of 1