Li - Maple Programming Help

Li

The Logarithmic Integral

 Calling Sequence Li(x)

Parameters

 x - expression

Description

 • The logarithmic integral, Li(x), is defined as:
 $\mathrm{Li}\left(x\right)={∫}_{0}^{x}\frac{1}{\mathrm{ln}\left(t\right)}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆt$,$x\ge 0$
 $=\mathrm{Ei}\left(\mathrm{ln}\left(x\right)\right)$
 where the integral is to be understood as a Cauchy Principal Value integral.
 • This definition is extended to complex arguments $z$ via the formula $\mathrm{Li}\left(x\right)=\mathrm{Ei}\left(\mathrm{ln}\left(x\right)\right)$.  Note that the resulting branch cuts are the intervals $\left(-\mathrm{\infty },0\right)$ and $\left(0,1\right)$. However, since $\mathrm{Li}\left(x\right)$ is defined as a Cauchy principal value integral, the values on the branch cuts are "isolated". That is, the complex function $\mathrm{Li}\left(z\right)$ is not continuous onto the branch cuts from either above or below.
 • Li(x) provides an approximation to the number of primes less than or equal to x.

Examples

 > $\mathrm{Li}\left(x\right)$
 ${\mathrm{Li}}{}\left({x}\right)$ (1)
 > $\mathrm{Li}\left(10.\right)$
 ${6.165599505}$ (2)
 > $\mathrm{Li}\left(1000.\right)$
 ${177.6096580}$ (3)

and the actual number of $\mathrm{primes}\le 1000$ is:

 > $\mathrm{nops}\left(\mathrm{select}\left(\mathrm{isprime},\left[\mathrm{}\left(1..1000\right)\right]\right)\right)$
 ${168}$ (4)
 > $\mathrm{convert}\left(\mathrm{Li}\left(x\right),\mathrm{Ei}\right)$
 ${\mathrm{Ei}}{}\left({\mathrm{ln}}{}\left({x}\right)\right)$ (5)
 > $\mathrm{Li}\left(1.+I\right)$
 ${0.6139116692}{+}{2.059584214}{}{I}$ (6)
 > $\mathrm{Li}\left(0.5\right)$
 ${-}{0.3786710431}$ (7)
 > $\mathrm{Li}\left(0.5+0.I\right)$
 ${-}{0.3786710431}{+}{3.141592654}{}{I}$ (8)
 > $\mathrm{Li}\left(0.5-0.I\right)$
 ${-}{0.3786710431}{-}{3.141592654}{}{I}$ (9)
 > $\mathrm{Li}\left(-3.123\right)$
 ${-}{0.06158134361}{+}{4.063328884}{}{I}$ (10)