See http://ask.sagemath.org/question/24532/ for the following problem. Downstream bug report at http://trac.sagemath.org/ticket/17183
(%i5) load(abs_integrate); (%o5) /Users/.../sage/local/share/maxima/5.34.1/share/contr\ ib/integration/abs_integrate.mac (%i6) integrate( sqrt((cos(x) - 1)^2 + sin(x)^2), x, 0, 2*%pi); (%o6) 0
This is done correctly in "vanilla" Maxima. The precise problem is probably (compare):
(%i7) integrate( sqrt((cos(x) - 1)^2 + sin(x)^2), x); 2 1 (%o7) 2 (2 - -----------------------) signum(----------) signum(sin(x)) 2 cos(x) + 1 sin (x) sqrt(------------- + 1) 2 (cos(x) + 1)
versus
(%i1) integrate( sqrt((cos(x) - 1)^2 + sin(x)^2), x); atan2(sin(x), cos(x)) + %pi (%o1) (- 2 cos(x) - 2) sin(---------------------------) 2 atan2(sin(x), cos(x)) + %pi + 2 sin(x) cos(---------------------------) 2
See also https://sourceforge.net/p/maxima/bugs/2737/ and https://sourceforge.net/p/maxima/bugs/2520/ where abs_integrate causes problems.
Thanks for the report. I don't mean to sound ungrateful, but what, exactly, are we to compare here? If you know the correct result, which one is it? What is the difference between the two expressions which the reader is supposed to compare? I could probably puzzle it out, but in the interest of solving the problem, maybe you can just tell us what you have figured out so far. Thanks again for your help.
Sorry! If you click through to the ask.sagemath thing you'll see the correct answer is 8, which one gets when doing a definite integral in Maxima without abs_integrate.
Fixed by [3ca423] . Closing ticket.
Related
Commit: [3ca423]