I need to solve a large system of equations. The system that I need to solve now has 30 equations and 30 unknowns, but I need to be able to use this same system to solve 1,000 equations and 1,000 unknowns. I do not need to know the answers for all of the unknown variables, I just need to know the answers for a few of them (2 in the 30 equations case, and ~10 in the 1,000 equations case). The equations that I need to solve are each in the form:
(c0 * x0) + (c1 * x1) + ... + (c_n * x_n)
Where x_i
is an unknown variable, c_i
is a known constant, and n
is the number of unknowns that I have.
Solving this system seems like it should be trivial by coding it into a matrix form. However, this is not possible because the majority of my c_i
constants have known variables that need to stay in their symbolic form. So, I require a symbolic equation solver.
I have tried to code the system into sympy, which is a symbolic equation solver in python. This is not fast enough for me.
I have tried to think of replacing my c_i
values with prime numbers, and factoring out the prime numbers when I reach a solution. However, this will not work either: Many of the constants within the c_i
expression are in polynomial form. The polynomials do not go higher than a power of 6.
Is there a solution for me?
- Is there a symbolic equation solver that will solve my system quickly?
- Is there another way to represent my system of equations so that I can solve it quickly?
My programming background is in python, C++, and R. I am willing to learn new languages/systems in order to solve this problem.