I'm doing a calculation which finds the characteristic polynomial of a matrix with rather complex entries and then determines the discriminant of that polynomial. For smaller matrices up to around 7x7 it finishes evaluating the Discriminant command within a few hours, but at a 10x10, which is what I need, it takes days to evaluate. Running in parallel won't work for the built in Discriminant command. I was wondering if there was a more efficient way to evaluate the discriminant of high-order polynomial, as I know my code is basic.

    CPHH = Collect[CharacteristicPolynomial[HH, x],x]];
    DD = Discriminant[CPHH, x, Method -> SylvesterMatrix];
    Simplify[DD, TimeConstraint -> Infinity]

If the rest of the code would be useful in determining a solution I'd be happy to post it


closed as off-topic by J. M. will be back soon Mar 11 '18 at 6:18

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question cannot be answered without additional information. Questions on problems in code must describe the specific problem and include valid code to reproduce it. Any data used for programming examples should be embedded in the question or code to generate the (fake) data must be included." – J. M. will be back soon
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Have you tried other methods? Or is this a case for which the Sylvester matrix is the only serious contender? $\endgroup$ – Daniel Lichtblau Jan 24 '14 at 21:19
  • $\begingroup$ I've tried all other methods and SylvesterMatrix is at least twice as fast as BezoutMatrix, Subresultant, and Automatic for smaller matrices. For larger matrices the difference is even greater $\endgroup$ – Brian c Jan 24 '14 at 21:43
  • $\begingroup$ What kind of entries does this matrix have? Integer, floating point, symbolic? $\endgroup$ – David E Speyer Jan 28 '14 at 22:25
  • $\begingroup$ it has symbolic entries $\endgroup$ – Brian c Feb 28 '14 at 3:27