Re: troubling simple integral
- To: mathgroup at smc.vnet.net
- Subject: [mg91346] Re: troubling simple integral
- From: Alberto Verga <Alberto.Verga at laposte.net>
- Date: Sun, 17 Aug 2008 06:38:35 -0400 (EDT)
- References: <g86844$hr7$1@smc.vnet.net>
On Aug 16, 11:54 am, did <didier.o... at hotmail.com> wrote:
> Mathematica 6.0.3.0 has trouble computing the quite simple integral
>
> In[2]:= FullSimplify[ Integrate[ (b + k*x) / k^2 * Exp[-k*x] *
> Sin[k*a] * Sin[k*y] , {k, 0,Infinity},
> Assumptions -> x > 0 && Im[a] == 0 && Im[b] == 0 && Im[y] ==
= 0 ]]
>
> Out[2]= -(1/8) I (b + 2 I x Log[1 + (4 a y)/(x^2 + (a - y)^2)])
>
> which is obviously wrong. Repeating the computation, I get different
> results.
>
> What should I do to get a correct answer?
> (This one I can do by hand, but I have more complicated similar ones
> to evaluate.)
The integral proportional to b (the one proportional to x poses no
problem) gives a strange result if you specifies Assumptions->
Element[{a,y},Reals]
In[11]:= Integrate[1/k^2*Exp[-k]*Sin[a k] Sin[y k], {k, 0, Infinity},
Assumptions -> Element[{a, y}, Reals]]
Out[11]= I/8
However if you replace the parameters by some constants (here Catalan
and EulerGamma) you get a result
In[7]:= ii1 =
Integrate[
1/k^2*Exp[-k]*Sin[Catalan k] Sin[EulerGamma k], {k, 0,
Infinity}] /. {Catalan -> a, EulerGamma -> y}
Out[7]= 1/4 (-2 a (ArcTan[a - y] - ArcTan[a + y]) +
2 y (ArcTan[a - y] + ArcTan[a + y]) + Log[1 + a^2 - 2 a y + y^2] -
Log[1 + a^2 + 2 a y + y^2])
The same result can be obtained using the option GenerateConditions ->
False:
In[9]:= ii2 =
Integrate[1/k^2*Exp[-k]*Sin[a k] Sin[y k], {k, 0, Infinity},
GenerateConditions -> False]
Out[9]= 1/4 (2 (-a + y) ArcTan[a - y] + 2 (a + y) ArcTan[a + y] +
Log[1 + I a - I y] + Log[1 - I a + I y] - Log[I (-I + a + y)] -
Log[-I (I + a + y)])
In[10]:= Table[ii1 - ii2, {a, .1, 1., .2}, {y, .1, 1., .2}] // Chop
Out[10]= {{0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0,
0, 0}, {0, 0, 0, 0, 0}}
I agree with you, the output I/8 is difficult to understand...
Alberto Verga