Re: Simplification of definite integral?
- To: mathgroup at smc.vnet.net
- Subject: [mg40717] Re: Simplification of definite integral?
- From: "Dr. Wolfgang Hintze" <weh at snafu.de>
- Date: Tue, 15 Apr 2003 03:56:40 -0400 (EDT)
- References: <b7avdo$qlg$1@smc.vnet.net> <b7dqih$6b2$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
David, first of all: nice to meet you in this forum. I'm quite new here, and am a newbee to mathematica as well. Our integral was one of my first exercises - alas with several problems... Vladimir Bonarenko gave the following elegant procedure which leads to the correct result In[]=Integrate[Sin[x - d]/(x - d) Sin[x + d]/(x + d), {x, -Infinity, Infinity}, Assumptions -> d > 0, PrincipalValue -> True]//TrigReduce Out[]=(Pi*Sin[2*d])/(2*d) Apart from a certain disappointment on my side with respect to mathematica's abilities in this particular case I still try to look for possible errors on my side. The problem arises because the integrand has (or rather seems to have) singularities at x=d and x=-d. Hence we have to be careful interpreting the integral, in other words in choosing the integration path around the singularities. Consider first the principal value of the integral. This is the symmetric limit from both sides towards a singularitiy. That is what we want as it fits to the definition of Sin[x]/x. I calculated the integral with pencil and paper for all four different paths of integration in the complex x-plane (1: both singularities below the path; 2, 3: one above, one below; 4: both above). The result is always the same, and it is identical to the principal value, viz. F_1 = Pi Sin[2d]/(2d) So I believe that is the only correct answer. Hence mathematica reveals bugs here, not me. Just some details: Depending on the Assumptions and simplifications I could get as a solution for the integral from mathematica (confirming some of the answers in this newsgroup) F_1 or F_2 = I Pi Cos[2d]/(2d) or even F_1 + F_2. I did this in mathematica as follows (please import to mathematica to better read the expressions): In[1]= d = a + I* b; Limit[ Integrate[Sin[x - d]/(x - d) Sin[x + d]/(x + d), {x, -Infinity, Infinity}, Assumptions -> {b > 0, d > 0}], b -> 0] Out[2]= \!\(\(\(1\/\(2\ a\)\)\((Cos[2\ a]\ CosIntegral[\(-2\)\ a] - Cos[2\ a]\ CosIntegral[2\ a] + \[Pi]\ Sin[2\ a]\)\)\) (* Now the result of the "simplification mystery" follows *) In[3]= \!\(\(\(\(\(\(1\/\(2\ a\)\) \((Cos[2\ a]\ CosIntegral[\(-2\)\ a] - Cos[2\ a]\ CosIntegral[2\ a] + \[Pi]\ Sin[2\ a])\) // FullSimplify\) // ComplexExpand\) // FullSimplify\) // PowerExpand\) // TrigToExp\) (* leading to *) Out[4]= \!\(\(\[ImaginaryI]\ \[ExponentialE]\^\(\(-2\)\ \[ImaginaryI]\ a\)\ \[Pi]\)\/\ \(2\ a\)\) Which reads traditionally I * Pi * Exp[-2 I a] / (2 a) PS: sorry, too early to be happy! I found an error in my expression In[1]: in the assumption I should have typed a>0 instead of d>0. If, however, I correct that misprinting, which is nonsense because d is complex (!), the result becomes cumbersome....I stop here... end of details. A question: can I treat complex contour integrals in mathematica? Regards, Wolfgang David W. Cantrell wrote: > "Dr. Wolfgang Hintze" <weh at snafu.de> wrote: > >>How do I get a satisfactory result from mathematica for this function >> >>f[d]:=Integrate[Sin[x-d]/(x-d) Sin[x+d]/(x+d),{x,-Infinity,Infinity}] >> >>I tried >> >>f[d]//ComplexExpand >> >>and several assumptions but I didn't succeed. Any hints? >> > > Note that you already know that the answer is pi*sinc(2*d), > where sinc(x) denotes the sine cardinal function, > i.e., sinc(x) = 1 for x = 0 > = sin(x)/x for nonzero x. > [BTW, I know that you already know the answer because I gave that answer > in a thread in alt.math.recreational at the end of February and you then > supplied a proof based, IIRC, on series expansion.] > > So how do we get a satisfactory answer from Mathematica for that integral? > We don't, as far as I can tell; Mathematica's answer is wrong. To be more > specific, if it would be reasonable to assume that your d is positive, then > > Integrate[Sin[x-d]/(x-d) Sin[x+d]/(x+d),{x,-Infinity,Infinity}, > Assumptions-> d>0]; FullSimplify[%, d>0] > > gives a simple result, but it is incorrect, having a spurious imaginary > part. The real part of that result, however, is the correct answer. > > But it should also be noted that, using a specific value of d, Mathematica > can even get the real part wrong. For example, with d = 1, > > Integrate[Sin[x-1]/(x-1) Sin[x+1]/(x+1),{x,-Infinity,Infinity}] > > gives the purely imaginary result -1/2*I*Pi*Cos[2], > > rather than the correct pi*sin(2)/2. > > David Cantrell > >