[Maxima] Cauchy principal value integral
woollett at charter.net
Tue Apr 7 16:57:16 CDT 2009
The correct value of integrate ( 1/x, x, -1, 2 )
is log(2) = 0.693147.. when considered as a
principal value integral, since we can write this
as limit ( i1 + i2 + i3, eps, 0 ), where
i1 = integrate(1/x,x,-1,-eps) = - integrate(1/x,x,eps,1)
(change var x -> y = -x ),
i2 = integrate(1/x,x,eps,1),
i3 = integrate(1/x,x,1,2) = log(2)
so i1 + i2 = 0 before taking the limit eps -> 0.
1. The maxima function integrate(...) seems to know
something about "principal value", since a message is
printed to the screen, but integrate gets the wrong answer.
(%i1) (fpprintprec:8, display2d:false )$
We know the integral must be a real number, so
we know integrate(..) cannot be trusted here.
Integrate appears to be closing the complex plane
contour for a case where Jordan's lemma is not
2. ldefint attempts to use limit (...) using the indefinite integral
and gets the right answer, but this is only luck, since ldefint
presumably does not know that we want to interpret this
as a principal value integral. In fact if you work with the
indefinite integral by hand, worrying only about the end
points (-1,2) you get totally different answer.
Not clear at all what ldefint is doing, since using limit
directly gives a completely different answer to
any of the other methods
(%i6) limit(%,x,2,minus) - limit(%,x,-1,plus);
4. Finally, quad_qawc returns the correct numerical
value for log(2):
Perhaps integrate should check the integrand
against conditions of Jordan's lemma before
returning an answer which is wrong.
More information about the Maxima