What free software can I use to solve a system of linear equations containing an unknown?

8.8k Views Asked by At

Question: What free software can I use to solve a system of linear equations $M\mathbf{x}=\mathbf{y}$ where the entries of $\mathbf{y}$ vary with an unknown quantity $n$?

Presumably I could do this in Maple or Mathematica, but I don't have access to these packages at this time.

Motivation: In an attempt to answer my question here, I've set up a system of linear equations where:

  • $M$ is a $30 \times 27$ $(0,1)$-matrix.
  • $\mathbf{x}$ is a vector of length $27$, which I'd like to attempt to solve for (the entries represent the number of symbols of a given type in a given block in my problem). If this method were to work, there should be no solutions.
  • $\mathbf{y}$ is a vector of length $27$, where the entries are either $0$, $(n-2k)^2$, $(n-2k)k$, or $k^2$, where $k=\lfloor n/3 \rfloor+1$.

I can solve this in GAP using SolutionMat for a given value of $n$. But I would like to do it symbolically, which would instead result in a proof for all $n$. I don't believe this is possible in GAP (since x:=Indeterminate(Rationals,"x"); followed by SolutionMat([1],[x]); returns an error).

2

There are 2 best solutions below

1
On BEST ANSWER

Try Sage. You can use it through a web browser even.

0
On

You can try octave. It is pretty handy and easy to use. It is an opensource version of MATLAB. It is not completely clear from your question, if you want to solve the linear system with $n$ being an unknown quantity/variable(i.e., treating $n$ as a symbol) or if you want to solve the linear system by letting $n$ take on different values. Either way, if you want to use $n$ as an unknown variable, then you should use syms to treat $n$ as a symbol.