Updates:
        Cc: mattpap
        Labels: Polynomial
        Blockedon: 1949

Comment #4 on issue 2010 by asmeurer: Integration with the full Risch Algorithm
http://code.google.com/p/sympy/issues/detail?id=2010

So there is a nasty bug from polys10:

In [1]: c
Out[1]: Poly(0*_t0 + (1 + x + x*(1 + x) - (1 + x)**2)/(1 + x)**2, _t0, domain='ZZ(x,1 + x)')

In [2]: c.as_basic()
Out[2]: (1 + x + x*(1 + x) - (1 + x)**2)/(1 + x)**2

In [3]: c.as_basic().expand()
Out[3]: 0

In [4]: c.is_zero
Out[4]: False

It's hard to reproduce in the interpreter, but it doesn't happen in polys11 because that seems to have disbanded the strange domain='ZZ(x,1+x)'. I bisected it down to the new options manager. The incorrect result in [4] was causing risch_integrate() to incorrectly report that some integrals are non-elementary. For example, risch_integrate(diff(exp(2*x**2)*log(x)*log(x + 1), x), x) (this requires some other changes that I will commit very soon). That domain stuff was also causing serious slowdowns in some cases, where the size of the rational coefficients of a Poly would explode after only a few iterations through some routine.

Therefore, I decided to go ahead and brave the merge into polys11. It was very difficult, mostly because of the code that was moved into different files, but I managed to complete it. The merge commit is at http://github.com/asmeurer/sympy/commit/9b252e90bd4454f6bd2e27ed3e6e4b0d99a719e0. The changes there should be useful for whenever you cherry-pick the remaining poly-related commits from integration3 over polys11, since most of them are in code that is now in a new file.

The good news is that, with those other changes I mentioned, risch_integrate(diff(exp(2*x**2)*log(x)*log(x + 1), x), x) now works. Also, I can now take advantage of some of the other fixes in polys11, like Poly.mul_ground(). And judging the fixes I had to make, it was going to be a tough merge whether I waited or not.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-iss...@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to