Search code examples
maxima

linsolve in maxima no work for these equations


I am very novice in maxima. I want to get the solution for W using these equations:

e1: A*W + B*Y = I$
e2: C*W + D*Y = 0$
linsolve ([e1, e2], [W]);

But linsolve just generates [].

The example in the manual works:

(%i1) e1: x + z = y$
(%i2) e2: 2*a*x - y = 2*a^2$
(%i3) e3: y - 2*z = 2$
(%i4) linsolve ([e1, e2, e3], [x, y, z]);
(%o4)            [x = a + 1, y = 2 a, z = a - 1]

Solution

  • That means that the equation cannot be solved for the variables that you requested. You have to solve in respect to both variables:

    linsolve([e1,e2],[W,Y]);
                            D I            C I
                  [W = - ---------, Y = ---------]
                         B C - A D      B C - A D
    

    You can solve for W for each of your equations separately. For example:

    linsolve ([e1],[W]);
                                 B Y - I
                          [W = - -------]
                                    A