Opened 7 years ago

Last modified 5 years ago

#13511 new enhancement

Allow access to principal values of integrals

Reported by: kcrisman Owned by: burcin
Priority: major Milestone: sage-6.4
Component: calculus Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

In this sage-support thread, the question was raised about accessing principal values of divergent integrals when they exist. This is in Maxima, but we currently raise an error if the integral is divergent. Some options mentioned in the thread were having another parameter, another method, or something else.

Change History (8)

comment:1 Changed 6 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:2 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:3 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:4 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:5 follow-up: Changed 5 years ago by kcrisman

Perhaps more importantly, sometimes the principal value returned is correct even without considering improper integrals!

(%i1) integral(sec(x), x, -%pi/4, %pi/4);
                                              %pi  %pi
(%o1)                   integral(sec(x), x, - ---, ---)
                                               4    4
(%i2) integrate(sec(x), x, -%pi/4, %pi/4);
Principal Value
                         sqrt(2) + 2          sqrt(2) - 2
(%o2)                log(-----------) - log(- -----------)
                              2                    2

See #17608.

comment:6 in reply to: ↑ 5 ; follow-up: Changed 5 years ago by nbruin

Replying to kcrisman:

Perhaps more importantly, sometimes the principal value returned is correct even without considering improper integrals!

Isn't it a bug in maxima that it warns about Principal Value when it really is just the proper value?

comment:7 in reply to: ↑ 6 Changed 5 years ago by kcrisman

Perhaps more importantly, sometimes the principal value returned is correct even without considering improper integrals!

Isn't it a bug in maxima that it warns about Principal Value when it really is just the proper value?

Possibly, though perhaps it's just saying this is how it was calculated. See https://sourceforge.net/p/maxima/bugs/2880/ which was the genesis of #17608. I feel like they are two separate tickets, however you can feel free to disagree and I won't object very strongly, it's quite amorphous.

comment:8 Changed 5 years ago by nbruin

It gets even more exciting:

(%i2) integrate(sec(x),x,0,%pi/4);

(%o2) log((sqrt(2)+2)/2)/2-log(-(sqrt(2)-2)/2)/2
(%i3) integrate(sec(x),x,-%pi/4,0);
Principal Value
(%o3) log((sqrt(2)+2)/2)/2-log(-(sqrt(2)-2)/2)/2
Note: See TracTickets for help on using tickets.