-
-
Couldn't load subscription status.
- Fork 683
Closed
Description
At the moment the ex1.coefficients(ex2) method uses pexpect-Maxima to get a coefficient list of a symbolic expression ex1 when seen as a polynomial in ex2 but the list is wrong whenever the exponent of ex2 is nonnumeric:
sage: var('a, x')
(a, x)
sage: f = a*x - x^x
sage: f.coefficient(x^x)
-1
sage: f.coefficients(x)
[[-x^x, 0], [a, 1]]
It should not be difficult to rewrite coefficients using wildcard power search and the coefficient method (which doesn't use Maxima).
CC: @paulmasson
Component: symbolics
Issue created by migration from https://trac.sagemath.org/ticket/20455