Opened 8 years ago

Closed 7 years ago

Last modified 4 years ago

#11483 closed enhancement (fixed)

enable abs_integrate package from maxima

Reported by: kcrisman Owned by: burcin
Priority: major Milestone: sage-5.0
Component: calculus Keywords:
Cc: burcin, jason Merged in: sage-5.0.beta3
Authors: Michael Orlitzky, Jason Grout Reviewers: Karl-Dieter Crisman
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #12094 Stopgaps:

Description

This is the followup to #8624, as suggested in #10434.

We want to do more integrals! There are lots at the patch at #8624 which it would be great to add.

Attachments (1)

sage-trac-11483.patch (6.5 KB) - added by mjo 7 years ago.
Updated patch addressing reviewer comments.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 8 years ago by kcrisman

This would fix #11594.

comment:2 Changed 8 years ago by kcrisman

See this sage-support thread for another example.

comment:3 Changed 8 years ago by kcrisman

See this sage-devel discussion for someone working on this!

Also, see #11966 for a newer spkg to base upon.

comment:4 Changed 8 years ago by mjo

  • Dependencies set to #12094

Here's my shot at this. There's one regression (a Maxima bug) that's fixed by Maxima 5.24.0, thus the dependency.

comment:5 Changed 7 years ago by mjo

  • Status changed from new to needs_review

comment:6 Changed 7 years ago by kcrisman

  • Authors set to Michael Orlitzky
  • Reviewers set to Karl-Dieter Crisman

Ok, this looks good, and is the proper way to deal with this. All tests pass.

Should we add Jason as an author due to his work at #8624? Up to him, probably.

comment:7 Changed 7 years ago by kcrisman

  • Status changed from needs_review to needs_work
  • Work issues set to commit message, formatting

Scratch that - Michael, can you update and give a proper commit message etc.? Also, the documentation is incorrectly formatted with double colons etc. - including the zXXX comment, which should have the double colon for EXAMPLES made single and then have a double colon after "subject to change".

Changed 7 years ago by mjo

Updated patch addressing reviewer comments.

comment:8 Changed 7 years ago by mjo

  • Status changed from needs_work to needs_review

That should be a little bit better.

Jason should get author credit too. I unfortunately didn't realize there was a patch at #8624, since it's closed: fixed, until after I had created my patch. Once I saw his, I went back and added some of his doctests to mine.

If he doesn't get author credit, then it looks like I just stole everything =)

comment:9 Changed 7 years ago by kcrisman

  • Authors changed from Michael Orlitzky to Michael Orlitzky, Jason Grout
  • Status changed from needs_review to positive_review

In retrospect, I realize that this file (maxima_lib) isn't even in the reference manual, and it might be nice to have some of these examples in more places (note that x.integrate? is horrible, though it points to a better place). Anyway, this is all fine now.

comment:10 Changed 7 years ago by jdemeyer

  • Work issues commit message, formatting deleted

comment:11 Changed 7 years ago by jdemeyer

  • Merged in set to sage-5.0.beta3
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:12 Changed 7 years ago by dimpase

abs_integrate can't do easy things like integrate(abs(cos(x)),x) right.

(%i8) integrate(abs(cos(x)),x);

log: encountered log(0).
log: encountered log(0).
log: encountered log(0).
log: encountered log(0).
log: encountered log(0).
log: encountered log(0).
log: encountered log(0).
log: encountered log(0).
log: encountered log(0).
log: encountered log(0).
log: encountered log(0).
log: encountered log(0).
log: encountered log(0).
log: encountered log(0).
log: encountered log(0).
log: encountered log(0).
log: encountered log(0).
log: encountered log(0).
(%o8) 2*((1/2-sin(x)/((cos(x)+1)*(sin(x)^2/(cos(x)+1)^2+1)))
        *signum(sin(x)/(cos(x)+1)-1)
        +1)*signum(sin(x)/(cos(x)+1)+1)

and the resulting expression is wrong, as it is 1 at 0, and not 0. As a result, we get integrate(abs(cos(x)),x,0,pi)==-1. Needless to say, same happens in Sage:

sage: integrate(abs(cos(x)),(x,0,pi))
-1

This is with maxima 5.26, as well as with 5.29, see #13364.

comment:13 Changed 4 years ago by rws

Please don't add to this closed ticket. The current ticket about abs_integrate is #12731.

Note: See TracTickets for help on using tickets.