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_assumptions.add(Q.positive(lambda1sq)) 
global_assumptions.add(Q.positive(lambda2sq)) 
global_assumptions.add(Q.positive(lambda3sq))

in the ipynb 
<http://nbviewer.ipython.org/github/yw5aj/ipynb/blob/master/SymbolicOgden.ipynb>
 
to declare that both sides of the equations are positive. Does that mean, 
somewhere along the code path, we didn't check the assumptions (where we 
should)?

Shawn

On Wednesday, February 4, 2015 at 12:59:40 PM UTC-5, Aaron Meurer wrote:
>
>
>
> On Wed, Feb 4, 2015 at 1:14 AM, Chris Smith <[email protected] 
> <javascript:>> 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?
>>>
>>
>> >>> var('a:d')
>> (a, b, c, d)
>> >>> m=Matrix(2,2,[a,b,c,d])
>> >>> m.det()
>> a*d - b*c
>> >>> m.eigenvals()
>> {a/2 + d/2 - sqrt(a**2 - 2*a*d + 4*b*c + d**2)/2: 1, a/2 + d/2 + 
>> sqrt(a**2 - 2*a*d + 4*b*c + d**2)/2: 1}
>> >>> Mul(*_).simplify()
>> a*d - b*c
>>
>> >>> m3=Matrix(3,3,var('x:9'))
>> >>> d=m3.det()
>> >>> e=Mul(*m3.eigenvals()).simplify()
>> >>> d==e
>> True 
>>
>> Does someone have the identity wrong? above it appears that det(M) = 
>> Mul(*M.eigenvals())
>>
>
> That's a true fact. However, if the matrix is positive definite, then (by 
> definition) all the eigenvalues are positive, so you should be able to take 
> the square root on both sides. But sqrt(det(M)) != 
> sqrt(eigen1)*sqrt(eigen2)*... in general, due to the fact that sqrt(x*y) != 
> sqrt(x)*sqrt(y) in general.
>
> Aaron Meurer 
>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "sympy" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] <javascript:>
>> .
>> Visit this group at http://groups.google.com/group/sympy.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sympy/f91aea76-e95a-4dfc-b861-06e4b2ac367f%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/sympy/f91aea76-e95a-4dfc-b861-06e4b2ac367f%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/8538c691-7952-4ea2-a3eb-1f2b0779ffb5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to