[Date Index]
[Thread Index]
[Author Index]
Re: ExpIntegralEi
*To*: mathgroup at smc.vnet.net
*Subject*: [mg18545] Re: [mg18463] ExpIntegralEi
*From*: Markus van Almsick <m.van.almsick at cityweb.de>
*Date*: Sat, 10 Jul 1999 02:18:44 -0400
*Sender*: owner-wri-mathgroup at wolfram.com
Dear Lionel,
RE:
>I am from LMT-Cachan FRANCE, working with MATHEMATICA V.3, I made this
>calculation:
>
>c2 = -0.05018627683354541 - 0.153047656745338 I;
>c3 = -0.7828709924214918 + 0.2780791279205129 I;
>c5 = -0.6758555487562639 - 0.04753624179417532 I;
>
>Integrate[Exp[beta*c2+s*(c3+beta*c5)], {s,0,1},{beta,0,1}]
>
>NIntegrate[Exp[beta*c2+s*(c3+beta*c5)], {s,0,1},{beta,0,1}]
>
>The results given are:
>-0.228103 + 10.5644 I
> 0.587252 + 0.0191685 I
>
>Not the same !
Ted Ersek ([mg18491]) suspected a branch cut along the path of integration.
He is almost right! The problem is that Mathematica chooses a wrong
ExpIntegralEi -branch in the symbolic integration.
Integrate[Exp[c3 s + (c2 + c5 s) beta], {s, 0, 1}, {beta, 0, 1}] //
FullSimplify
->
(ExpIntegralEi[(c2*c3)/c5] -
ExpIntegralEi[(c3*(c2 + c5))/c5] -
ExpIntegralEi[(c2*(c3 + c5))/c5] +
ExpIntegralEi[((c2 + c5)*(c3 + c5))/c5]) /
(c5*E^((c2*c3)/c5))
The 4th ExpIntegralEi-function causes the problem. For the
given ci values ExpIntegralEi renders the wrong branch (in this case).
Adding 2 Pi I rectifies the problem.
(ExpIntegralEi[(c2*c3)/c5] -
ExpIntegralEi[(c3*(c2 + c5))/c5] -
ExpIntegralEi[(c2*(c3 + c5))/c5] +
ExpIntegralEi[((c2 + c5)*(c3 + c5))/c5] + 2 Pi I) /
(c5*E^((c2*c3)/c5))
The fist symbolic solution is not always wrong. Taking the values
c2 = -0.05018627683354541 - 0.153047656745338 I;
c3 = -0.7828709924214918 + 0.1 I;
c5 = -0.6758555487562639 - 0.04753624179417532 I;
one obtains the right numeric result.
Varying the imaginary part of c3 from 0 to 0.278 one crosses a branch cut of
ExpIntegralEi.
Nevertheless, one might argue that Mathematica should have chosen the
correct branch, since the numeric values of ci were provided up front. I
think it should be treated as a bug.
Ciao, Markus van Almsick
Dear Lionel,
RE:
>I am from LMT-Cachan FRANCE, working with MATHEMATICA V.3, I made
this
>calculation:
>
>c2 = -0.05018627683354541 - 0.153047656745338 I;
>c3 = -0.7828709924214918 + 0.2780791279205129 I;
>c5 = -0.6758555487562639 - 0.04753624179417532 I;
>
>Integrate[Exp[beta*c2+s*(c3+beta*c5)], {s,0,1},{beta,0,1}]
>
>NIntegrate[Exp[beta*c2+s*(c3+beta*c5)], {s,0,1},{beta,0,1}]
>
>The results given are:
>-0.228103 + 10.5644 I
> 0.587252 + 0.0191685 I
>
>Not the same !
Ted Ersek ([mg18491]) suspected a branch cut along the path of
integration.
He is almost right! The problem is that Mathematica chooses a wrong
<bigger>ExpIntegralEi </bigger>-branch in the symbolic integration.
Integrate[Exp[c3 s + (c2 + c5 s) beta], {s, 0, 1}, {beta, 0, 1}] //
FullSimplify
->
<bigger>(ExpIntegralEi[(c2*c3)/c5] -
ExpIntegralEi[(c3*(c2 + c5))/c5] -
ExpIntegralEi[(c2*(c3 + c5))/c5] +
ExpIntegralEi[((c2 + c5)*(c3 + c5))/c5]) /
(c5*E^((c2*c3)/c5))
</bigger>The 4th <bigger>ExpIntegralEi</bigger>-function causes the
problem. For the
given ci values <bigger>ExpIntegralEi</bigger> renders the wrong branch
(in this case).
Adding 2 Pi I rectifies the problem.
<bigger>(ExpIntegralEi[(c2*c3)/c5] -
ExpIntegralEi[(c3*(c2 + c5))/c5] -
ExpIntegralEi[(c2*(c3 + c5))/c5] +
ExpIntegralEi[((c2 + c5)*(c3 + c5))/c5] + 2 Pi I) /
(c5*E^((c2*c3)/c5))
</bigger>The fist symbolic solution is not always wrong. Taking the
values
c2 = -0.05018627683354541 - 0.153047656745338 I;
c3 = -0.7828709924214918 + 0.1 I;
c5 = -0.6758555487562639 - 0.04753624179417532 I;
one obtains the right numeric result.
Varying the imaginary part of c3 from 0 to 0.278 one crosses a branch
cut of
<bigger>ExpIntegralEi</bigger>.
Nevertheless, one might argue that Mathematica should have chosen the
correct branch, since the numeric values of ci were provided up front.
I think it should be treated as a bug.
Ciao, Markus van Almsick
Prev by Date:
**bug in 4.0**
Next by Date:
**Parametric curve fitting**
Previous by thread:
**Re: ExpIntegralEi**
Next by thread:
**RE: RE: ExpIntegralEi**
| |