is the logarithmic integral function TemplateBox[{z}, LogIntegral].


  • Mathematical function, suitable for both symbolic and numerical manipulation.
  • The logarithmic integral function is defined by TemplateBox[{z}, LogIntegral]=int_0^zdt/log t , where the principal value of the integral is taken.
  • LogIntegral[z] has a branch cut discontinuity in the complex z plane running from to .
  • For certain special arguments, LogIntegral automatically evaluates to exact values.
  • LogIntegral can be evaluated to arbitrary numerical precision.
  • LogIntegral automatically threads over lists.
  • LogIntegral can be used with Interval and CenteredInterval objects. »


open allclose all

Basic Examples  (5)

Evaluate numerically:

Plot over a subset of the reals:

Series expansion at the origin:

Series expansions around the branch point at :

Series expansion at Infinity:

Scope  (32)

Numerical Evaluation  (5)

Evaluate numerically to high precision:

The precision of the output tracks the precision of the input:

LogIntegral can take complex number inputs:

Evaluate LogIntegral efficiently at high precision:

LogIntegral threads elementwise over lists:

LogIntegral can be used with Interval and CenteredInterval objects:

Specific Values  (4)

Value at the origin:

Singular point of LogIntegral:

Values at infinity:

Find a zero of TemplateBox[{x}, LogIntegral]:

Visualization  (2)

Plot the LogIntegral function:

Plot the real part of TemplateBox[{z}, LogIntegral]:

Plot the imaginary part of TemplateBox[{z}, LogIntegral]:

Function Properties  (8)

LogIntegral is defined for all real positive values except 1:

Complex domain:

LogIntegral takes all real values:

LogIntegral is not an analytic function:

Has both singularities and discontinuities:

LogIntegral is neither nondecreasing nor nonincreasing:

LogIntegral is not injective:

LogIntegral is surjective:

LogIntegral is neither non-negative nor non-positive:

LogIntegral is neither convex nor concave:

Differentiation  (2)

First derivative:

Higher derivatives:

Integration  (3)

Indefinite integral of LogIntegral:

Definite integral of LogIntegral:

More integrals:

Series Expansions  (3)

Taylor expansion for LogIntegral:

Plot the first three approximations for LogIntegral around :

Series expansions on either side of the branch point at :

LogIntegral can be applied to power series:

Function Identities and Simplifications  (2)

Primary definition of LogIntegral:

Use FullSimplify to simplify expressions into logarithmic integrals:

Function Representations  (3)

Representation through ExpIntegralEi:

Series representation:

TraditionalForm formatting:

Applications  (5)

Approximate number of primes less than :

Compare with exact counts:

Plot the real part in the complex plane:

Plot the absolute value in the complex plane:

Find an approximation to Soldner's constant [more info]:

TemplateBox[{{TemplateBox[{x}, PrimePi], -, TemplateBox[{x}, LogIntegral]}}, Abs]<(sqrt(x) log(x))/(8 pi) for if the Riemann hypothesis is true. Verify it via LogIntegral:

Properties & Relations  (4)

Use FullSimplify to simplify expressions into logarithmic integrals:

Use FunctionExpand to write expressions in logarithmic integrals when possible:

Find the numerical root:

Obtain LogIntegral from integrals and sums:

Possible Issues  (1)

In traditional form, parentheses are needed around the argument:

Neat Examples  (2)

Nested integrals:

Plot the Riemann surface of LogIntegral:

Wolfram Research (1988), LogIntegral, Wolfram Language function, https://reference.wolfram.com/language/ref/LogIntegral.html (updated 2022).


Wolfram Research (1988), LogIntegral, Wolfram Language function, https://reference.wolfram.com/language/ref/LogIntegral.html (updated 2022).


Wolfram Language. 1988. "LogIntegral." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/LogIntegral.html.


Wolfram Language. (1988). LogIntegral. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LogIntegral.html


@misc{reference.wolfram_2024_logintegral, author="Wolfram Research", title="{LogIntegral}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/LogIntegral.html}", note=[Accessed: 20-May-2024 ]}


@online{reference.wolfram_2024_logintegral, organization={Wolfram Research}, title={LogIntegral}, year={2022}, url={https://reference.wolfram.com/language/ref/LogIntegral.html}, note=[Accessed: 20-May-2024 ]}