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
factor with extension=True fails for rational expression #24346
Comments
The problem is that sympy/sympy/polys/polytools.py Lines 6011 to 6033 in 900caa3
|
Maybe here is more the point: sympy/sympy/polys/polytools.py Lines 6080 to 6094 in 900caa3
|
Looking at this I also see this bug: In [18]: Integral(2*x, x, y)
Out[18]:
⌠ ⌠
⎮ ⎮ 2⋅x dx dy
⌡ ⌡
In [19]: Integral(2*x, x, y).factor()
Out[19]:
⌠
2⋅y⋅⎮ x dx
⌡ Here I don't think that In [20]: 2*Integral(x, x)*Integral(1, y)
Out[20]:
⌠ ⌠
2⋅⎮ 1 dy⋅⎮ x dx
⌡ ⌡ This is analogous to In [21]: Integral(2*x*y, x, y).factor()
Out[21]:
⌠ ⌠
2⋅⎮ x dx⋅⎮ y dy
⌡ ⌡ This happens because of sympy/sympy/concrete/expr_with_limits.py Lines 587 to 588 in 900caa3
|
I also wonder if the last example here should pull the factors out of an integral: In [4]: i = Integral(2*x, x, y)
In [5]: i
Out[5]:
⌠ ⌠
⎮ ⎮ 2⋅x dx dy
⌡ ⌡
In [6]: factor(i)
Out[6]:
⌠
2⋅y⋅⎮ x dx
⌡
In [7]: factor(1 + i)
Out[7]:
⌠ ⌠
⎮ ⎮ 2⋅x dx dy + 1
⌡ ⌡ |
Here
factor
withextension=True
should useQ(sqrt(2))
in which case this should factor and cancel:It succeeds if the extension is specified explicitly:
The text was updated successfully, but these errors were encountered: