Comment #7 on issue 1793 by smichr: Integration failure
http://code.google.com/p/sympy/issues/detail?id=1793

Perhaps you are right, but consider the following. Because the independent and dependent parts are not being separated, the integrand gets treated as an add and separated into indep and dep parts, so something like c*(1/t+1/x) ends up sending 1/t+1/x on to ratint which converts to a num,den and then a p, q value of [t+x, x*t] and passes this along to ratint_ratpart whose stated assumption is that the two parts (f and g, i.e. num and den) satisfy deg(f) < deg(g). They aren't, they are both of
degree 1. The trap is set and it gets sprung at when the routine tries to
solve(H.coeffs(), C_coeffs). The answer is None to the 2-eq, 2-unk system of
equations, and subs doesn't like that as an argument and so you get the error message.

If you try the similar expression, c*(1/t + x) no failure occurs because the 1/t+x num,den is 1+x*t, t which becomes p,q = 1,t and now the assumptions are satisfied.

The reason my routine doesn't step into the trap is that a Mul is separated into ind, dep pieces and those pieces are treated as Adds (which are further separated). So c(1/t+1/x) gets split into c, 1/t+1/x and the pieces 1/t and 1/x are handled without
issue.

To find an example for which this would fail would require having an expression whose
num, dem produces a p, q of the same order after passing through this:

    c, p, q = n.cancel(d)
    poly, p = p.div(d)

Is there such a thing?

I think issue 1576 [not 1575] is really an unrelated issue. In this issue we are
passing from the integration routine an expression that ends up violating
ratint_ratpart's assumptions. That's an error on our part, not on polys's. 1576 is
failing for a different reason...as are a thousand other sympy issues ;-)


--
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