Re: Problem with ExpIntegralEi vs. LogIntegral

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

```xadrezus wrote:

>Hi, best regards:
>
>    I'm using an old version of Mathematica (2.2) and have found the
>following
>    inconsistence when computing the complex value of ExpIntegralEi
>for
>    a complex argument, namely:
>
>    If I compute LogIntegral[ 20^( 1/2+14.135 I )], Mathematica
>returns:
>
>          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
>Mathamatica's
>   documentation as well as MathWorld and other Internet resources,
>and
>   all of them give the same definitions for LogIntegral and
>ExpIntegralEi,
>   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
>to
>   determine one from the other, but to no avail.
>
>   My question is:  how is ExpIntegralEi evaluating the above
>expression
>   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