From: SourceForge.net <no...@so...> - 2009-12-14 00:59:06
|
Bugs item #2875784, was opened at 2009-10-09 11:38 Message generated for change (Comment added) made by dgildea You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2875784&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core - Integration Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Leo Butler (l_butler) Assigned to: Nobody/Anonymous (nobody) Summary: fourier integral incorrect Initial Comment: The following is incorrect: (%i2) I : 'integrate(%e^(%i*x)*sin(x)/x,x,minf,inf); (%o2) 'integrate(%e^(%i*x)*sin(x)/x,x,minf,inf) (%i3) J : changevar(I,y+x,y,x); (%o3) 'integrate(%e^-(%i*y)*sin(y)/y,y,minf,inf) (%i4) ev(I,nouns); (%o4) %pi (%i5) ev(J,nouns); (%o5) 0 ---------------------------------------------------------------------- >Comment By: Dan Gildea (dgildea) Date: 2009-12-13 19:59 Message: Fixed in defint.lisp rev 1.68. (%i15) integrate(%e^(%i*x)*sin(x)/x,x,minf,inf); Principal Value (%o15) %pi/2 (%i16) integrate(%e^(-%i*x)*sin(x)/x,x,minf,inf); Principal Value (%o16) %pi/2 (%i17) integrate(cos(x)*sin(x)/x,x,minf,inf); (%o17) %pi/2 ---------------------------------------------------------------------- Comment By: Dan Gildea (dgildea) Date: 2009-12-07 08:48 Message: The problem seems to be in mtosc, which corresponds to page 77 of Paul Wang's thesis: http://publications.csail.mit.edu/lcs/pubs/pdf/MIT-LCS-TR-092.pdf This routine handles integrals of the form exp(%i*m*x)*r(x) where r(x) is rational. The thesis indicates that r(x) should have no real poles. Most integrands with real poles are caught by poles-in-interval before being dispatched to mtosc. However, poles-in-interval does not consider sin(x)/x to have any poles. I think mtosc is finding the wrong answer because 1/x does have a pole at zero. I tried adding a test for this case to mtosc: ((and (or (setq plf (polfactors n)) t) + (eq (real-roots d var) '$no) ; fail if rational part has poles Now we get noun forms for the following integrals: (%i2) integrate(%e^(%i*x)*sin(x)/x,x,minf,inf); (%o2) 'integrate(%e^(%i*x)*sin(x)/x,x,minf,inf) (%i3) integrate(%e^(-%i*x)*sin(x)/x,x,minf,inf); (%o3) 'integrate(%e^-(%i*x)*sin(x)/x,x,minf,inf) %pi/2 would be better, but at least these aren't wrong. However, now we get the wrong answer for: (%i4) integrate(cos(x)*sin(x)/x,x,minf,inf); (%o4) 0 Where previously mtosc gave the correct answer, now mtosc gives up, and intsubs seems to give a wrong answer because it misses discontinuities in gamma_incomplete. ---------------------------------------------------------------------- Comment By: Leo Butler (l_butler) Date: 2009-10-09 12:13 Message: I should add that there are two problems above: first, I and J should be equal; second, the correct answer should be (%i19) integrate(cos(x)*sin(x)/x,x,minf,inf); (%o19) %pi/2 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=2875784&group_id=4933 |