MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Integration Bug

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65279] Re: Integration Bug
  • From: "Chris H. Fleming" <chris_h_fleming at yahoo.com>
  • Date: Thu, 23 Mar 2006 06:58:48 -0500 (EST)
  • References: <dvj4s8$1j$1@smc.vnet.net><dvrcbt$a66$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Valeri Astanoff wrote:
> Hi Chris,
>
> Seems to me that if you convert to Ei form,
> care has to be taken of the argument sign :
>
> In[1]:=toEiForm = {CosIntegral[x_ /; x \[Element] Reals] ->
>      (1/2)*ExpIntegralEi[(-I)*x] + (1/2)*ExpIntegralEi[I*x] +
>       I*Pi*(1 - UnitStep[x]), SinIntegral[x_ /; x \[Element] Reals] ->
>      (1/2)*I*(ExpIntegralEi[(-I)*x] - ExpIntegralEi[I*x] +
> I*Pi*Sign[x])};
>
> In[2]:={CosIntegral[1],CosIntegral[1] /. toEiForm}
> Out[2]={CosIntegral[1], ExpIntegralEi[-I]/2 + ExpIntegralEi[I]/2}
>
> In[3]:=%//N
> Out[3]={0.337404, 0.337404 + 0.*I}
>
> In[4]:={CosIntegral[-1],CosIntegral[-1] /. toEiForm}
> Out[4]={CosIntegral[-1], I*Pi + ExpIntegralEi[-I]/2 +
> ExpIntegralEi[I]/2}
>
> In[5]:=%//N
> Out[5]={0.337404 + 3.14159*I, 0.337404 + 3.14159*I}
>
>
> hth
>
> Valeri Astanoff


Oh I agree. E1 has a branch cut singularity exactly like log, and Ei
opposite of that. I am pretty sure that Mathematica gives incorrect
integrals because it is integrating across branch cuts in a
discontinuous fashion.

But one can carefully convert from Si, Ci to E1 and I have done so to
get the answer in the form I want.

The problem is that I have more complicated integrals that I have to do
by hand because Mathematica wont attempt them unless I cast them as
purely exponential and thus give an incorrect answer.


  • Prev by Date: Re: How to sample a 2-dim. r.v. with known density function?
  • Next by Date: Re: sorting list of roots af a transcendental function
  • Previous by thread: Re: Integration Bug
  • Next by thread: 64 Bit Job