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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/d7e5509c-97f5-48df-ba3c-329f6f18b8b4%40googlegroups.com.
