MATLAB: MATLAB solve function is taking a very long time

solvesymbolic

Hello,
I have a system of 17 equations and 23 unknowns and I'm using the MATLAB "solve" function to solve symbolically for 17 unknowns in terms of the other 6 unknowns. However, the "solve" function has been running for several hours and still has not gotten a solution.
I have used the MATLAB "solve" function in this way for several small systems of equations and it finds a solution very quickly (within minutes). Does anyone have any ideas as to why the "solve" function is taking so long in this instance? What is generally the upper limit of equations that the "solve" function can solve in a reasonable amount of time? (I know there is an upper limit to the number of equations that can be handled, but I'm very surprised that 17 equations is taking so long.) Does anyone have any ideas as to anything I can try (maybe options to use with the solve function, or some other function to use) in order to get a solution for my system of equations?
Thank you,
Kevin

Best Answer

The upper limit to the number of equations that solve() can resolve in a reasonable amount of time depends upon whether the equations are linear or not. If they are non-linear (including even just squared terms) then 4 can usually be done fairly quickly, 5 is about the practical limit, and 6 might take days.
The limits are slightly higher if you happen to have the Maple based symbolic toolbox and are using just squared terms, but even for that, 6 might take overnight and 7 is unlikely to finish after several days.