You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sympy.polys.polyerrors.PolynomialDivisionFailed: couldn't reduce degree in a polynomial division algorithm when dividing [EX(-1728*3**(1/3)*(9 + sqrt(93))**(1/3)*(27 + 3*sqrt(93))**(2/3) + 1728*3**(5/6)*I*(9 + sqrt(93))**(1/3)*(27 + 3*sqrt(93))**(2/3))] by [EX(1)].
This can happen when it's not possible to detect zero in the coefficient domain. The domain of computation is EX.
You may want to use a different simplification algorithm.
Note that in general it's not possible to guarantee to detect zero in this domain.
Does anyone know a reason why sympy shouldn't be able to do this on the sum of the parts when it can do it on each part separately?
It's probably undoing your nice partial fraction expansion, and then the integrator doesn't know how to handle it. Unfortunately, Laplace transforms are currently only handled by direct integration, which means if the integrator (generally the Meijer G algorithm, which is based on a lot of heuristics) fails, it won't get the answer.
I think we should move the integral transforms to pattern matching table lookups, and only fallback to integration for cases not in the table. That would improve the performance as well (in some cases, by quite a lot).
Of course, we should also improve the Meijer G heuristics to do a better job with cases like this, so that even integrate will work. If my guess as to what is happening is correct, it needs to be smarter about applying apart() to rational function subexpressions.
I think we should move the integral transforms to pattern matching table lookups, and only fallback to integration for cases not in the table. That would improve the performance as well (in some cases, by quite a lot).
After finishing #22376, where I implement pattern matching for laplace_transform, I will continue with inverse_laplace_transform.
I'm computing the inverse Laplace transform of an expression which is the sum of relatively basics terms to invert:
It seems to be able to compute each individual fine:
Yet when I take the sum of these, I get a long error saying it can't find the polynomial
Does anyone know a reason why sympy shouldn't be able to do this on the sum of the parts when it can do it on each part separately?
The text was updated successfully, but these errors were encountered: