ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 05 May 2016 01:46:26 +0200Simplify characteristic equationhttps://ask.sagemath.org/question/33302/simplify-characteristic-equation/I have a rather unwieldy symbolic expression of the form `f(x) = 0`, where the left hand side is a (low-degree) polynomial in `x`. I need to extract the constant term and the coefficients of a few powers of `x` in `f(x)`. If I try to `simplify` either `f(x)` itself or each coefficient, Sage runs out of memory (even after increasing the Maxima heap size) or doesn't ever seem to terminate. Is there something I can do that takes advantage of the special form of the equation to simplify the coefficients?Tue, 03 May 2016 12:10:47 +0200https://ask.sagemath.org/question/33302/simplify-characteristic-equation/Answer by slelievre for <p>I have a rather unwieldy symbolic expression of the form <code>f(x) = 0</code>, where the left hand side is a (low-degree) polynomial in <code>x</code>. I need to extract the constant term and the coefficients of a few powers of <code>x</code> in <code>f(x)</code>. If I try to <code>simplify</code> either <code>f(x)</code> itself or each coefficient, Sage runs out of memory (even after increasing the Maxima heap size) or doesn't ever seem to terminate. Is there something I can do that takes advantage of the special form of the equation to simplify the coefficients?</p>
https://ask.sagemath.org/question/33302/simplify-characteristic-equation/?answer=33318#post-id-33318Try to work with a better ring than the Symbolic Ring from the start, if possible.
Otherwise, try converting `f(x)` to an appropriate polynomial ring.
To get better help, provide a minimal working example that people can play with.
Thu, 05 May 2016 01:46:26 +0200https://ask.sagemath.org/question/33302/simplify-characteristic-equation/?answer=33318#post-id-33318