Sage: Ticket #13511: Allow access to principal values of integrals
https://trac.sagemath.org/ticket/13511
<p>
In <a class="ext-link" href="https://groups.google.com/forum/?fromgroups#!topic/sage-devel/AAZy318mXv4"><span class="icon"></span>this sage-support thread</a>, 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.
</p>
en-usSagehttps://trac.sagemath.org/chrome/site/logo_sagemath_trac.png
https://trac.sagemath.org/ticket/13511
Trac 1.1.6jdemeyerTue, 13 Aug 2013 15:35:53 GMTmilestone changed
https://trac.sagemath.org/ticket/13511#comment:1
https://trac.sagemath.org/ticket/13511#comment:1
<ul>
<li><strong>milestone</strong>
changed from <em>sage-5.11</em> to <em>sage-5.12</em>
</li>
</ul>
Ticketvbraun_spamThu, 30 Jan 2014 21:20:52 GMTmilestone changed
https://trac.sagemath.org/ticket/13511#comment:2
https://trac.sagemath.org/ticket/13511#comment:2
<ul>
<li><strong>milestone</strong>
changed from <em>sage-6.1</em> to <em>sage-6.2</em>
</li>
</ul>
Ticketvbraun_spamTue, 06 May 2014 15:20:58 GMTmilestone changed
https://trac.sagemath.org/ticket/13511#comment:3
https://trac.sagemath.org/ticket/13511#comment:3
<ul>
<li><strong>milestone</strong>
changed from <em>sage-6.2</em> to <em>sage-6.3</em>
</li>
</ul>
Ticketvbraun_spamSun, 10 Aug 2014 16:51:03 GMTmilestone changed
https://trac.sagemath.org/ticket/13511#comment:4
https://trac.sagemath.org/ticket/13511#comment:4
<ul>
<li><strong>milestone</strong>
changed from <em>sage-6.3</em> to <em>sage-6.4</em>
</li>
</ul>
TicketkcrismanFri, 09 Jan 2015 02:38:42 GMT
https://trac.sagemath.org/ticket/13511#comment:5
https://trac.sagemath.org/ticket/13511#comment:5
<p>
Perhaps more importantly, sometimes the principal value returned is correct even without considering improper integrals!
</p>
<pre class="wiki">
(%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
</pre><p>
See <a class="new ticket" href="https://trac.sagemath.org/ticket/17608" title="defect: Fix Maxima integral giving principal value when not needed (new)">#17608</a>.
</p>
TicketnbruinFri, 09 Jan 2015 03:57:27 GMT
https://trac.sagemath.org/ticket/13511#comment:6
https://trac.sagemath.org/ticket/13511#comment:6
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/13511#comment:5" title="Comment 5">kcrisman</a>:
</p>
<blockquote class="citation">
<p>
Perhaps more importantly, sometimes the principal value returned is correct even without considering improper integrals!
</p>
</blockquote>
<p>
Isn't it a bug in maxima that it warns about Principal Value when it really is just the proper value?
</p>
TicketkcrismanFri, 09 Jan 2015 13:11:52 GMT
https://trac.sagemath.org/ticket/13511#comment:7
https://trac.sagemath.org/ticket/13511#comment:7
<blockquote class="citation">
<blockquote class="citation">
<p>
Perhaps more importantly, sometimes the principal value returned is correct even without considering improper integrals!
</p>
</blockquote>
<p>
Isn't it a bug in maxima that it warns about Principal Value when it really is just the proper value?
</p>
</blockquote>
<p>
Possibly, though perhaps it's just saying this is how it was calculated. See <a class="ext-link" href="https://sourceforge.net/p/maxima/bugs/2880/"><span class="icon"></span>https://sourceforge.net/p/maxima/bugs/2880/</a> which was the genesis of <a class="new ticket" href="https://trac.sagemath.org/ticket/17608" title="defect: Fix Maxima integral giving principal value when not needed (new)">#17608</a>. 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.
</p>
TicketnbruinFri, 09 Jan 2015 16:08:21 GMT
https://trac.sagemath.org/ticket/13511#comment:8
https://trac.sagemath.org/ticket/13511#comment:8
<p>
It gets even more exciting:
</p>
<pre class="wiki">(%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
</pre>
Ticket