I have to solve a system of linear algebraic equations in maple. In my book it is given using linalg package in maple, which is deprecated. So I want to use Linsolve from LinearAlgebra package, but it's not like the previous version (linsolve), it has got a mod at its end. I know a little about mod and the maple documentation doesn't help.
So if I want to solve the following pair of equations, what should I do ?
x1 - x2 + 2*x3 - 3*x4 = 4
x1 + 2*x2 - x3 + 3*x4 = 1
No, you want 'LinearSolve' from the 'LinearAlgebra' package.
You can use 'GenerateMatrix' from that same package, to produce a Matrix of the coefficients on the left hand sides and a Vector of the right hand sides. Those can then be fed straight to 'LinearSolve'. (Or you can produce an augmented Matrix, and feed that in instead.)
Note that you have two equations in four variables, so the system is underdetermined. The result is parameterized by two free variables (of the form _tX[i], which the system generates to be unassigned global names). The returned result thus represents the set of an infinite number of solutions.
The result satisfies the original 'eq1' and 'eq2', whether you use numeric values for the parameters '_tX[i]' or not.