Thanks for posting a link to that old (5 year old) report. The notion that you are computing in the complex domain (functions of many complex variables??) is really not enough. Because (as noted) there are multiple branches of common functions, choosing one of them (behind the scenes, on the fly) may not work. How to fix? I've mentioned it previously, I assume. Represent the multiplicity of answers. Sqrt(x^2) is a pair, {-x, x}. Log(r^2) is 2 log(r)+2*n*i*pi or something like that.. No one does it. A project for some student?
RJF On Thursday, July 23, 2020 at 4:32:14 PM UTC-7, Dan Swenson wrote: > > When I do: > > t.integrate(t, 0, 4*a - a^2) # LaTeX: \int_{0}^{4a - a^2} t dt > > > I get the correct answer: > > 1/2*a^4 - 4*a^3 + 8*a^2 > > > But if I first make some assumptions, then the integral fails to evaluate: > > assume(a, 'real') > assume(a > 1) > assume(a < 3) # now 0 < a < 4, so 4*a - a^2 > 0 > t.integrate(t, 0, 4*a - a^2) # hangs, eventually produces RuntimeError > > > (To me, the assumptions should make the problem easier, if anything. But > instead apparently they make it harder...) > > I also get a RuntimeError if, under the above assumptions, I do: > > bool(4*a - a^2 > 0) > > > So maybe the integrate() function is trying to determine which endpoint > is greater, and that's causing it to hang? (The top endpoint is greater > under the given assumptions, but you have to do a bit of algebra to figure > that out.) Indeed, a workaround is to first do: assume(4*a - a^2 > 0). > > I have posted a version of this question at > https://ask.sagemath.org/question/52382/assumption-seems-to-break-integrate-is-this-a-bug/ > > , and there user @eric_g suggests another workaround: > .integrate(algorithm='sympy'). > > So, does that mean that this is a problem with Maxima? > > I noticed the behavior in Sage 8.6, and @eric_g confirms the behavior in > Sage 9.2.beta5. > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/f7de5ce4-bf5e-4b40-afaa-a9c553f090c1o%40googlegroups.com.