Dear List,

I just discovered the following (imho unsatisfactory) behavior of
Matrix.det:


In <211>: from sympy.abc import a,b,c,d, C
In <212>: M = Matrix([[a+b, 0, cos(c)], [0, d, 0], [cos(c), 0,  1]])
In <213>: M
Out<213>:
[ a + b, 0, cos(c)]
[     0, d,      0]
[cos(c), 0,      1]

In <214>: M.det()
Out<214>: d*a**2/(a + b) + d*b**2/(a + b) + 2*a*b*d/(a + b) -
a*d*cos(c)**2/(a + b) - b*d*cos(c)**2/(a + b)


I wonder why there are fractions in the result (all the more as in the
docstring of det_bareis one reads, that the algorihtm "will result in a
determinant with minimal number of fractions".).
The result is correct but it is in a very inconvenient form for further
processing.

My observation is, that the result of det is better (i.e. as expected)
if there are no trigonometric terms in the matrix:


In <215>: M.subs(cos(c), C).det()
Out<215>: a*d + b*d - d*C**2


Is that a bug or do I miss something?

Regards,
Bastian.

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

Reply via email to