# Solving a large system of nonlinear equations

I have a system of 80 nonlinear equations with 64 variables to solve in Mathematica but it takes a lot of time (about two hours) and then it return "no more memory available" knowing that I have 8GB Ram on Windows 8 64 bits. The system is

sys=Flatten[Table[Table[Table[Table[Sum[a[i,j,k]a[k,l,h]-a[j,k,l]a[i,l,h],{l,1,4}]==0,{h,1,4}],{k,j,4}],{j,i,4}],{i,1,4}]]


Variables are var=Flatten[Table[a[i,j,k],{i,1,4},{j,1,4},{k,1,4}]]

First I used Solve[sys,var] which did not work and also NSolve did not work (as described above). How can I make it work ? or at least find the number of unknowns that equal zero (that what I'm interested in).

• There are no equations here... Nov 18, 2014 at 12:19
• @MariusLadegårdMeyer : It has been corrected now. Nov 18, 2014 at 12:31
• What do you mean by "...NSolve did not work"? Nov 18, 2014 at 15:42
• Probably just to large for GroebnerBasis to have any hope. Nov 18, 2014 at 18:37
• FYI this has a trivial solution where all a[_,_,_] are equal.. I posed it as a least squares problem, FindMinimum readily returns {a[1, 1, 1] -> 1., a[1, 1, 2] -> 1., a[1, 1, 3] -> 1., a[1, 1, 4] -> 1. ... Nov 18, 2014 at 21:16

This is really more of a comment, but it's too long. I would try to solve this starting with a smaller analogous problem. For instance, the n=2 version of this readily gives an answer:

n = 2;
sys = Flatten[Table[Table[Table[Table[
Sum[a[i, j, k] a[k, l, h] - a[j, k, l] a[i, l, h], {l, 1, n}] ==  0,
{h, 1, n}], {k, j, n}], {j, i, n}], {i, 1, n}]];
var = Flatten[Table[a[i, j, k], {i, 1, n}, {j, 1, n}, {k, 1, n}]];
Solve[sys, var]


But if you look at this answer, the solution contains terms like: a[1, 1, 2] -> 0 while at the same time containing a[2, 2, 2] -> a[1, 2, 2]^2/a[1, 1, 2]. So even in the n=2 case, this is quite suspicious. The n=3 case takes longer to run than I have patience for. Using Reduce instead of Solve might also shed some more light on the issue.

• This does not help much, What if set $m$ values of a[i,j,k] to be zero and test whether the system is verified (I'm searching for the largest value of such $m<64$) but it seems too complicated, do you have an idea ? Dec 1, 2014 at 10:40
• The only other thing I can think of would be to try and rewrite the system in matrix/tensor form. Maybe something would pop out. Here again, it might be worth looking at smaller versions first. Dec 1, 2014 at 13:47