MathGroup Archive 2005

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

Search the Archive

Re: Bug with Limit, Series and ProductLog ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61444] Re: [mg61402] Bug with Limit, Series and ProductLog ?
  • From: "Carl K. Woll" <carl at woll2woll.com>
  • Date: Wed, 19 Oct 2005 02:16:39 -0400 (EDT)
  • References: <200510180644.CAA11217@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

did wrote:
> With Mathematica 5.2 Windows I obtain
>
> In[1]:=Limit[ ProductLog[Exp[a/x]/x]-a/x,x->0]
> Out[1]= -Log[a]
>
> which seems correct. But, setting a=1, I get
>
> In[2]:=Limit[ ProductLog[Exp[1/x]/x]-1/x,x->0]
> Out[2]=-8
>
> which is inconsistent with the previous result
> (except if Log[1] is Infinity !).
>
> Worse, with Series I get
>
> In[3]:=Series[ ProductLog[Exp[a/x]/x]-a/x,{x,0,5}]
>
> Out[3]=\!\(\*
>  InterpretationBox[
>    RowBox[{\(-\(a\/x\)\), "+", "Indeterminate", "+",
>      InterpretationBox[\(O[x]\^6\),
>        SeriesData[ x, 0, {}, -1, 6, 1],
>        Editable->False]}],
>    SeriesData[ x, 0, {
>      Times[ -1, a], Indeterminate}, -1, 6, 1],
>    Editable->False]\)
>
> Setting a=1 in the Series gives a complex answer.
>
> How can I workaround the problem and get the correct
> expansion for In[3]?
> Thanks,
> D.
>

Here is one approach. Define f as your function:

In[1]:=
f[x_] := ProductLog[Exp[a/x]/x] - a/x

Now, differentiate with respect to x:

In[16]:=
f'[x]
Out[16]=
           a/x     a/x                a/x
        a E       E                  E
     (-(------) - ----) x ProductLog[----]
           3        2                 x
a         x        x
-- + -------------------------------------
 2                              a/x
x          a/x                 E
          E    (1 + ProductLog[----])
                                x

Notice the presence of the same ProductLog as exists in f. We can replace 
these occurrences of ProductLog with f[x]+a/x and obtain a differential 
equation for f. Since f already has a definition, I'll use g:

In[18]:=
g'[x] == f'[x] /. _ProductLog -> g[x] + a/x // Simplify
Out[18]=
                g[x]
g'[x] == -(--------------)
           a + x + x g[x]

It's convenient to rewrite this equation as ode==0, where ode is:

In[19]:=
ode = Numerator[Together[g'[x] - f'[x] /. _ProductLog -> g[x] + a/x]]
Out[19]=
g[x] + a g'[x] + x g'[x] + x g[x] g'[x]

Now, we simply find the series expansion of this expression and set all the 
terms to 0:

In[23]:=
sol = Solve[ode + O[x]^2 == 0, {g'[0], g''[0]}]
Out[23]=
            g[0] (2 + g[0])             g[0]
{{g''[0] -> ---------------, g'[0] -> -(----)}}
                   2                     a
                  a

Plug this solution into your power series for g:

In[26]:=
g[x] + O[x]^3 /. sol[[1]]
Out[26]=
                                 2
       g[0] x   g[0] (2 + g[0]) x        3
g[0] - ------ + ------------------ + O[x]
         a                2
                       2 a

Finally, use the value of g[0] you obtained:

In[27]:=
% /. g[0] -> -Log[a]
Out[27]=
                                          2
          Log[a] x   (2 - Log[a]) Log[a] x        3
-Log[a] + -------- - ---------------------- + O[x]
             a                   2
                              2 a

It's a simple matter to obtain even higher orders of the series simply by 
repeating the above procedure. I checked the results for various values of a 
and x, and it seems like the above expansion is correct.

Carl Woll
Wolfram Research 




  • Prev by Date: Re: Solving Diophantine Equations
  • Next by Date: Re: Re: Language vs. Library why it matters / Turing
  • Previous by thread: Bug with Limit, Series and ProductLog ?
  • Next by thread: Re: Bug with Limit, Series and ProductLog ?