Should I report it as a bug on the github? There is currently none 
<https://github.com/sympy/sympy/issues?q=is%3Aissue+is%3Aopen+is_indefinite> 
for is_indefinite.
Writing something like
"is_indefinite returns error when it attempts to compute the eigenvalues.
Try to import the improvments `is_positive_definite`, 
`is_positive_semidefinite` etc rather than `is_indefinite`, no longer 
attempt to compute the eigenvalues. Computing the eigenvalues symbolically 
is not usually possible for bigger than a 4x4 matrix due to Abel-Ruffini 
<https://en.wikipedia.org/wiki/Abel%E2%80%93Ruffini_theorem>.
Converting to a matrix M to matrix of floats M.n() works as a workaround 
since then the eigenvalues can be computed approximately by mpmath."?
and giving a link to this conversation?


On Thursday, May 14, 2020 at 2:47:41 PM UTC+2, JS wrote:
>
> Thank you.
> This has worked for all matrices that I have tried. : - )
> Even M.is_positive_definite and M.is_negative_definite works. 
>
> On Thursday, May 14, 2020 at 1:54:52 PM UTC+2, Oscar wrote:
>>
>> Looking at it seems that the improvements were for 
>> `is_positive_definite`, `is_positive_semidefinite` etc rather than 
>> `is_indefinite`.
>>
>> These cases compute fine:
>>
>> In [*11*]: B1.is_positive_semidefinite                                   
>>             Out[*11*]: False
>>
>>
>> In [*12*]: B1.is_negative_semidefinite                                   
>>             Out[*12*]: False
>>
>> I think that should be enough to conclude that the matrix is indefinite. 
>> The improvements are that the algorithms for those cases no longer attempt 
>> to compute the eigenvalues. Computing the eigenvalues symbolically is not 
>> usually possible for bigger than a 4x4 matrix due to Abel-Ruffini:
>> https://en.wikipedia.org/wiki/Abel%E2%80%93Ruffini_theorem
>>
>> As a workaround you can convert to a matrix of floats since then the 
>> eigenvalues can be computed approximately by mpmath:
>>
>> In [*13*]: B1.n().eigenvals()                                            
>>             Out[*13*]: {-0.423518261117994: 1, 0.830838432644968: 1, 
>> 1.57353243409785: 1, 2.309362853398: 1, 3.91273545644822: 1, 
>> 4.79704908452897: 1}
>>
>>
>> In [*14*]: B1.n().is_indefinite                                          
>>             Out[*14*]: True
>>
>>
>> --
>> Oscar
>>
>

-- 
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 sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/60bb1937-c309-4a54-a7c7-c30bbeec2d02%40googlegroups.com.

Reply via email to