Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Problem with ExpIntegralEi vs. LogIntegral

  • To: mathgroup at
  • Subject: [mg73049] Re: [mg73036] Problem with ExpIntegralEi vs. LogIntegral
  • From: Carl Woll <carlw at>
  • Date: Wed, 31 Jan 2007 00:08:42 -0500 (EST)
  • References: <>

xadrezus wrote:

>Hi, best regards:
>    I'm using an old version of Mathematica (2.2) and have found the 
>    inconsistence when computing the complex value of ExpIntegralEi 
>    a complex argument, namely:
>    If I compute LogIntegral[ 20^( 1/2+14.135 I )], Mathematica 
>          N[ LogIntegral[ 20^( 1/2+14.135 I ) ] ]
>                1.99917 - 3.9127 I
>   But as LogIntegral[z] == ExpIntegralEi[Log[z]], when I computed the
>   previous value using ExpIntegralEi on the Log of the argument 
>   I expected to get the very same result. Instead, it returns:
>            N[ ExpIntegralEi[ (1/2+14.135 I ) * ( Log[20] ) ] ]
>                 -0.105387 + 3.1474 I
The problem here is that

Log[20^(1/2+14.135 I)]

is not equal to

(1/2+14.135 I) Log[20]

Remember that the inverse of Exp is a multivalued function, and Log 
takes the principal value. For

Log[20^(1/2+14.135 I)]

1.49787-1.63762 I

the principal value is a real number plus an imaginary part that is 
constrained to lie between (-Pi, Pi).

On the other hand, for Log[20] the principal value is just a real 
number, with no imaginary part:

(1/2+14.135 I) Log[20]

1.49787+42.3447 I

The difference in the two value is a multiple of 2 Pi I:

(Log[20^(1/2+14.135 I)]-(1/2+14.135 I)Log[20])/(2Pi I)

-7.+0. I

Carl Woll
Wolfram Research

>   which, disconcertingly, it's quite different ! I've searched 
>   documentation as well as MathWorld and other Internet resources, 
>   all of them give the same definitions for LogIntegral and 
>   as well as series expansions, etc., which, when computed manually
>   for that complex argument, result in the value given by 
>   I've also tried to relate both values in some way, so as to be able 
>   determine one from the other, but to no avail.
>   My question is:  how is ExpIntegralEi evaluating the above 
>   in order to get the  result -0.105387 + 3.1474 I instead of the
>   expected  result 1.99917 - 3.9127 I ?
>   I would need to get to know which series expansion or algorithm
>   ExpIntegralEi's is using to reach that result (-0.105387 + 3.1474 
>I )
>   and, if possible, duplicate it manually. Or else, to know how both
>   values are related so I can determine one from the other.
>   Thanks in advance and best regards.

  • Prev by Date: Re: fundamental Integrate question
  • Next by Date: sort and positon matrix element help
  • Previous by thread: Problem with ExpIntegralEi vs. LogIntegral
  • Next by thread: Confused about correlations in sequence of Random[] numbers