On 2016-12-13 08:06, Ralf Stephan wrote:
> On Monday, December 12, 2016 at 10:55:32 AM UTC+1, Daniel Krenn wrote:
> and the source in src/sage/symbolic/integration/integral.py
> you must walk the expression tree and apply subs to the first operand of
> all instances of
> integrate which is a symbol
On Monday, December 12, 2016 at 10:55:32 AM UTC+1, Daniel Krenn wrote:
>
> (I can only think of very complicated and long workarounds, so what is
> the best way to do this?)
>
As you can see from
sage: a = ((z^3 - 10*z^2 + 17*z - 8)/(z^4 + z^3 + z^2 + z + 1)).integrate(z)
sage: a.operator()
int
Let f be a sum of symbolic expressions. One of the summands is
sage: a = ((z^3 - 10*z^2 + 17*z - 8)/(z^4 + z^3 + z^2 + z + 1)).integrate(z)
sage: a
integrate((z^3 - 10*z^2 + 17*z - 8)/(z^4 + z^3 + z^2 + z + 1), z)
which cannot be integrated. However, doing
sage: a.subs({z^4 + z^3 + z^2 + z + 1: