On Thu, Jul 5, 2012 at 5:56 PM, Andrew <zxwand...@gmail.com> wrote:
> Hi, I am very new to sympy and python, so pardon my simple question
>
> I have a matrix right here like this (4 equations, 3 unknowns)
> mat1=
> [   0,    15.0, 10.0, 700.0]
> [   1,    1,      1,     100.0]
> [   0,    10.0,  5.0,  200.0]
> [-5.0,    0,      0,     0]
>
> and a list of unknowns
> unknown=[y0,y1,y2]
>

Which columns do those variables correspond to? If you multiply the
matrix by a length-4 column vector of variables and pass this to solve
it gives

>>> v = var('a:d')
>>> v
(a, b, c, d)
>>> v = Matrix([list(v)]).T
>>> e=m*v
>>> solve(e)
{c: -160.0*d, b: 60.0*d, a: 0}

And the determinant of the matrix is 0:

>>> m.det()
0

So it looks like there are infinite solutions. I don't spend much time
working with the individual solver routines, so I'm not sure how you
should pass the variables, but perhaps you can start by reading the
docstring (help(solve_linear_system)) where you will see that you
should be passing an augmented system. I don't think you are doing
that.

/c

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to