Aaron,
Thanks for your response! And sorry for the late reply.
You mentioned: sqrt(det(M)) != sqrt(eigen1) * sqrt(eigen2) * sqrt(eigen3)
is True if M is positive definite, so that det(M) is positive, eigen1-3 are
positive. But I did use
global_assumptions.add(Q.positive(J2))
global_assumption
On Wed, Feb 4, 2015 at 1:14 AM, Chris Smith wrote:
> A brief description is - the sqrt(matrix determinant) is not equal to the
>> product of the eigenvalues of matrix**(1/2).
>>
>> Could you please help a little bit in there...? Would what I am doing
>> even be mathematically correct?
>>
>
> >>>
Aaron,
Thanks for your response! I did find a detour by using juse lambda (not
taking sqrt). Appreciate your help!
Shawn
On Tuesday, February 3, 2015 at 7:26:35 PM UTC-5, Aaron Meurer wrote:
>
> You've discovered that SymPy is really bad at dealing with algebraic
> expressions. I would recomm
Chris,
Thank you for looking into this! I really appreciate it.
And you are right that det(M) == Mul(*M.eigenvals())
However, if M is positive definite, then sqrt(det(M)) should also equal to
sqrt(lambda1)*sqrt(lambda2)*sqrt(lambda3), where lambda1 - 3 are the
eigenvalues of the matrix. (Becau
>
> A brief description is - the sqrt(matrix determinant) is not equal to the
> product of the eigenvalues of matrix**(1/2).
>
> Could you please help a little bit in there...? Would what I am doing even
> be mathematically correct?
>
>>> var('a:d')
(a, b, c, d)
>>> m=Matrix(2,2,[a,b,c,d])
>>>
You've discovered that SymPy is really bad at dealing with algebraic
expressions. I would recommend just sticking to what you did the first
time, instead of dealing with sqrt(lambda), just use lambda.
By the way, I don't think simplify() uses the new assumptions. You have to
literally use refine(
Hi Aaron,
Thank you for your response!
1) You are right that it is a bug. If I do this:
from sympy import symbols, sqrt, simplify, Matrix, Q
from sympy.assumptions.assume import global_assumptions
b11, b22, b33, b12, b13, b23 = symbols('b11, b22, b33, b12, b13, b23',
real=True)
b = Matrix([[b1
On Mon, Feb 2, 2015 at 1:14 PM, Yuxiang Wang
wrote:
> Dear all,
>
> I am currently trying to do solid mechanics (finite deformation) in SymPy.
> There are a lot of matrices that are positive definite, but I do not know
> whether there is a way to define this property in SymPy. Any help would be
>
Dear all,
I am currently trying to do solid mechanics (finite deformation) in SymPy.
There are a lot of matrices that are positive definite, but I do not know
whether there is a way to define this property in SymPy. Any help would be
deeply appreciated!
Take this code snippet for example:
``