Re: Q: Dickman function
- To: mathgroup at smc.vnet.net
- Subject: [mg21002] Re: Q: Dickman function
- From: Pasquale Nardone <Pasquale.Nardone at ulb.ac.be>
- Date: Thu, 2 Dec 1999 21:41:15 -0500 (EST)
- Organization: Brussels Free Universities VUB/ULB
- References: <819je5$81p@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Francois Grieu wrote: > I'm trying to build the Dickman function, defined by > > /1 > F(x)=1 for x>=1 F(x)=1-| F(t/(1-t))/t dt for 0<=x<=1 > /x > > (ref: Knuth's TAOCP, vol 2, 4.5.4, p383 in third edition) > > After a lot of trial and error, I came up with a tentative > minimal definition in Mathematica: > > F[x_]:=F[x,Ceiling[1/x]-1] > F[x_,0]:=1 > F[x_,n_]:=F[1/n,n-1]-Integrate[F[t[n]/(1-t[n]),n-1]/t[n],{t[n],x,1/n}] > > This does works for x>=1/3 both numericaly and symbolicaly. > However both F[0.3] and F[1/4] give an imaginary component, which > is an 'obvious' nonsense; it's numerical value is vanishingly > small, but the expression of F[x,3] is so complex that even > FullSimplify won't cut it. And it's sooo long when x gets small. > > More trial and error leads to > > F[x_]:=F[x,Ceiling[1/x]-1] > F[x_,0]:=1 > F[x_,1]:=1+Log[x] > F[x_,2]:=1-Pi^2/12+Log[x]+Log[x]^2/2+PolyLog[2,x] > F[x_,n_]:=F[1/n,n-1]-NIntegrate[F[t[n]/(1-t[n]),n-1]/t[n],{t[n],x,1/n}] > > Extending the usable range to maybe x>=0.15, but I am afraid I won't > ever get F[0.1] that way. > > Any clues ? > > Francois Grieu You can use this procedure for example: LeF[x_, 0] := 1 G[x_] := 1/(x*(1 + x)); LeF[x_, 1] = (1 - Integrate[G[t1], {t1, x/(1 - x), Infinity}]); 1 - Log[1/(1 - x)] + Log[-(x/(-1 + x))] LeF[x_, 2] = (LeF[1/2, 1] - Integrate[LeF[t2, 1]*G[t2], {t2, x/(1 - x), 1}]); 1 - Pi^2/12 + Log[-(x/(-1 + x))] + Log[x/(1 - 2*x)]*Log[-(x/(-1 + x))] - 1/2*Log[-(x/(-1 + x))]^2 - Log[1/(1 - x)]*(1 + Log[x/(1 - 2*x)] - Log[(-1 + x)/(-1 + 2*x)]) - Log[-(x/(-1 + x))]*Log[(-1 + x)/(-1 + 2*x)] - PolyLog[2, x/(-1 + x)] then define recursively (using also some numerical : LeF[x_, n_] := LeF[x, n] = (LeF[1/n, n - 1] - NIntegrate[LeF[t[n], n - 1]*G[t[n]], {t[n], x/(1 - x), 1/(n - 1)}]); then define the needed function F[x_]:=LeF[x,Floor[1/x]]; by the way if you are interested in the boundary value 1/2,1/3,1/4,.... you can use the following recursivity: LeG[1] = 1; LeG[2] = 1 - Log[2]; LeG[n_] := LeG[n] = LeG[n - 1] - NIntegrate[LeF[p[n], n - 2]*G[p[n]], {p[n], 1/(n - 1), 1/(n - 2)}] LeG[1] = 1 LeG[2] = 1 - Log[2] LeG[3] = 0.0486084 LeG[4] = 0.00491093 LeG[5] = 0.000354725 LeG[6] = 0.0000196497 .....