6.2 Computation of transcendental functions

Module: sage.functions.transcendental

Module-level Functions

__eval( x)

__prep_num( x)

exponential_integral_1( x, [n=0])

Returns the exponential integral $ E_1(x)$ . If the optional argument $ n$ is given, computes list of the first $ n$ values of the exponential integral $ E_1(x m)$ .

The exponential integral $ E_1(x)$ is

$\displaystyle E_1(x) = \int_{x}^{\infty} e^{-t}/t dt
$

INPUT:
    x -- a positive real number

    n -- (default: 0) a nonnegative integer; if nonzero,
         then return a list of values E_1(x*m) for
         m = 1,2,3,...,n.   This is useful, e.g., when
         computing derivatives of L-functions.

OUTPUT:
    float -- if n is 0 (the default)
  or
    list -- list of floats if n > 0

sage: exponential_integral_1(2)
0.048900510708061118
sage: w = exponential_integral_1(2,4); w
[0.048900510708061118, 0.0037793524098489067, 0.00036008245216265867,
3.76656228439249e-05]

IMPLEMENTATION: We use the PARI C-library functions eint1 and veceint1.

REFERENCE: See page 262, Prop 5.6.12, of Cohen's book "A Course in Computational Algebraic Number Theory".

REMARKS: When called with the optional argument n, the PARI C-library is fast for values of n up to some bound, then very very slow. For example, if x=5, then the computation takes less than a second for n=800000, and takes "forever" for n=900000.

gamma( s)

Gamma function at s.

gamma_inc( s, t)

Incomplete Gamma function Gamma(s,t).

incomplete_gamma( s, t)

Incomplete Gamma function Gamma(s,t).

zeta( s)

Riemann zeta function at s with s a real or complex number.

INPUT:
    s -- real or complex number

If s is a real number the computation is done using the MPFR library. When the input is not real, the computation is done using the PARI C library.

sage: zeta(2)
1.6449340668482264
sage: RR = RealField(200)
sage: zeta(RR(2))
1.6449340668482264364724151666460251892189499012067984377355578

zeta_symmetric( s)

Completed function $ \xi(s)$ that satisfies $ \xi(s) = \xi(1-s)$ and has zeros at the same points as the Riemann zeta function.

INPUT:
    s -- real or complex number

If s is a real number the computation is done using the MPFR library. When the input is not real, the computation is done using the PARI C library.

More precisely,

$\displaystyle xi(s) = \gamma(s/2 + 1) * (s-1) * \pi^{-s/2} * \zeta(s).
$

sage: zeta_symmetric(0.7)
0.49758041465112701
sage: zeta_symmetric(1-0.7)
0.49758041465112696
sage: RR = RealField(200)
sage: zeta_symmetric(RR('0.7'))
0.49758041465112690357779107525638385212657443284080589766061548
sage: I = CC.0
sage: zeta_symmetric(RR('0.5') + I*RR('14.0'))
0.00020129444423525752 + 0.000000000000000000060986372202309624*I
sage: zeta_symmetric(RR('0.5') + I*RR('14.1'))
0.000048989348325568226 + 0.0000000000000000000084703294725430034*I
sage: zeta_symmetric(RR('0.5') + I*RR('14.2'))
-0.000086893128262009693 - 0.000000000000000000035575383784680614*I

REFERENCE: I copied the definition of xi from http://www.math.ubc.ca/~pugh/RiemannZeta/RiemannZetaLong.html

See About this document... for information on suggesting changes.