Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rewrite buggy Expression.coefficients() without Maxima #20455

Closed
rwst opened this issue Apr 17, 2016 · 3 comments
Closed

rewrite buggy Expression.coefficients() without Maxima #20455

rwst opened this issue Apr 17, 2016 · 3 comments

Comments

@rwst
Copy link

rwst commented Apr 17, 2016

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

@rwst rwst added this to the sage-7.2 milestone Apr 17, 2016
@rwst
Copy link
Author

rwst commented Jul 27, 2016

comment:1

For implementation reasons the rewrite happened in #21034 but the behaviour was not changed so this ticket still has to be addressed.

@rwst
Copy link
Author

rwst commented Aug 26, 2016

comment:3

This is fixed in current Pynac master.

@rwst
Copy link
Author

rwst commented Sep 2, 2016

comment:4

Since #21369 contains doctests for this, it can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants