From: cordes@ac.dal.ca (John Cordes)
Newsgroups: sci.math,sci.math.symbolic
Subject: Re: Help wanted in integration.
Date: 10 Nov 92 23:11:30 -0400
Organization: Dalhousie University, Halifax, Nova Scotia, Canada

In article <1992Nov10.171604.8765@ac.dal.ca>, cordes@ac.dal.ca (John Cordes) writes:
> In article <1992Nov10.031024.4001@wri.com>, victor@tuamotu.wri.com (Victor Adamchik) writes:
>> In article <Nov.6.00.08.18.1992.2647@gandalf.rutgers.edu>  
>> amarmahb@gandalf.rutgers.edu (Amar Mahboob Ali) writes:
>>> 
>>> Hi
>>> 
>>> Can anyone please help me in integrating the following.
>>> 
>>>            infinity
>>> 
>>>                 / 4    2             2
>>>                | x  sin (Pi a x)  sin (Pi b x)
>>>                | ---------------------------- dx
>>>                |    2    2 2   2    2 2
>>>               /   (x  - d )  (x  - c )
>>> 
>>> 	  -infinity       
>>>       
>>> 
>>> Where a,b,c and d are positive intergers.
>>> 
>>> This function has double poles on the real axis. Hence theorems
>>> related to computing such definite integrals dont seem to help me,
>>> as they allow at the most a simple pole on the real axis. Is there
>>> some other theorem that I can use? I would appretiate the least bit of
>>> help on this.
>>> 
>>> I am begining to think that there is no closed form solution. 
>>> Please help.
>>> 
>>> Thanks
>>> 
>>> Amar
> 

>  ***** Remarks by Cordes in previous posting **************************
>   I didn't see the original posting, but just wanted to throw in the
> comment that there are _no_ poles on the real axis. The sine functions in
> the numerator vanish (linearly) at integer values of x, thus cancelling the
> vanishing denominators. Contour integration should handle the evaluation of
> your integral without too much difficulty (1st deform the integration
> contour away from the real axis, avoiding the points c,d; then introduce
> the complex exponential forms for the sine functions and expand the
> products in the numerator; close the contour appropriately for the various
> pieces, and do a little residue calculus). 
> 
>   If in fact the integrand _did_ have double poles on the real axis (the 
> integration contour) the integral would be divergent. When there are only 
> simple poles a finite value can be extracted by the Cauchy principal value 
> procedure.
> 
> BTW, I haven't done the contour integration outlined above so have no
> particular reason to doubt the solution found using Mathematica as given in
> the next few lines. As I write this, however, inspection of the integral
> posed suggests to me that it should be finite even for c=d, so I am
> suspicious of the answer given. 
> 
>> ******  V. Adamchik's earlier results  ****************
>> I evaluated your integral in the closed form and 
>> hope the following answer is a correct for integer a,b,c and d: > 
>> if 0 < a <= b then (a*(c^2 + d^2)*Pi^2)/(16*(c^2 - d^2)^2) 
>> if 0 < b <= a then (b*(c^2 + d^2)*Pi^2)/(16*(c^2 - d^2)^2) 

>> I checked numerically (the precision was 6 digits) it for 
>> c = 2; d = 1; a = 3; b = 4 
>> c = 2; d = 1; a = 7; b = 4
>> and 
>> c = 2; d = 4; a = 3; b = 4 
>> If you are interested to look at the
>> proof send me email. I have 
>> used Mathematica to get that result.
>> Victor Adamchik 
>> victor@wri.com 
********************************************************************

 I've now done the integral by the contour integration technique I outlined 
previously; I get, for d not equal to c, a result which is exactly 4 times 
the result given by Adamchik above. A very limited numerical test, for the 
first of Adamchik's test cases, seemed to check out ok.

 For d equal to c the integral is harder to do (now a fourth order pole 
involved); my answer is

if 0 < b <= a then (31/32)*Pi^2*b/c^2 + Pi^4*b^2*(a-b/3)/8.

Interchanging a and b would give the result for a<b. However, I have not 
been able to numerically confirm this result. For a=4,b=3,c=2, my 
expression above gives 335.9265669..., whereas my best effort to evaluate 
the integral numerically gives 328.98100... . It is very difficult to get 
convergence for this integral, however, so I'm still not convinced that my 
algebra has gone astray.

 
 John Cordes, Dept. of Physics,
 Dalhousie University, Halifax, N.S.,
 Canada  B3H 3J5       Internet: cordes@ac.dal.ca
 
Xref: sparky sci.math:14882 sci.math.symbolic:2961