SinIntegral¶
Status: Stable
documented, exercised by the test suite and/or worked examples, with no known limitations recorded.
Description¶
SinIntegral[z]
gives the sine integral Si(z) = Integral_0^z Sin[t]/t dt.
SinIntegral[+-Infinity] = +-Pi/2, SinIntegral[+-I Infinity] = +-I Infinity.
Notes
An entire, odd function with no branch cuts. SinIntegral\[0\] = 0, Real and complex inputs evaluate numerically at machine or arbitrary (MPFR) precision; D\[SinIntegral\[z\], z\] = Sinc\[z\]. Listable.Examples (7)¶
Every input below was run against the current Mathilda build and its output recorded.
Applications (7)¶
In[1]:= SinIntegral[2.8]
Out[1]= 1.8321
In[2]:= N[SinIntegral[2], 50]
Out[2]= 1.6054129768026948485767201481985889408485834223285
In[3]:= SinIntegral[{-Infinity, Infinity, -I Infinity, I Infinity}]
Out[3]= {-1/2 Pi, 1/2 Pi, -I Infinity, I Infinity}
In[4]:= SinIntegral[2.5 + I]
Out[4]= 1.99549 + 0.222995 I
In[5]:= D[SinIntegral[x], x]
Out[5]= Sinc[x]
In[6]:= Series[SinIntegral[x], {x, 0, 7}]
Out[6]= x - 1/18 x^3 + 1/600 x^5 - 1/35280 x^7 + O[x]^8
In[7]:= Normal[Series[SinIntegral[x], {x, Infinity, 3}]]
Out[7]= 1/2 Pi - Sin[x]/x^2 + Cos[x] (-1/x + 2/x^3)
Algorithm¶
Si is entire and odd, with no branch cuts. Evaluation is layered so each kind of argument takes the cheapest route:
exact special values -> 0, +-Pi/2, +-I Infinity, Indeterminate
machine real -> MPFR series/asymptotic at 53 bits
arbitrary real -> the same, at the input precision
complex (any precision) -> the ncpx series/asymptotic with guard bits
everything else -> stays symbolic (return NULL)
The convergent Maclaurin series (DLMF 6.6.5) is
valid for all z. Its partial sums can reach magnitude ~e^|z| before the O(1)-sized answer emerges, so the MPFR paths add ~|z|/ln2 guard bits to absorb that cancellation exactly. For large |z| the convergent series is infeasible; there we use the asymptotic expansion (DLMF 6.12.3)
Si(z) = Pi/2 - cos(z) f(z) - sin(z) g(z),
f(z) ~ Sum (-1)^k (2k)! / z^(2k+1) = 1/z - 2!/z^3 + ...,
g(z) ~ Sum (-1)^k (2k+1)! / z^(2k+2) = 1/z^2 - 3!/z^4 + ...,
summed to the smallest term (optimal truncation). Both odd-symmetry reductions Si(-z) = -Si(z) fold negative real / left-half-plane inputs onto the right half-plane, keeping the asymptotic within its valid sector.
Attributes: Listable, NumericFunction, Protected.
Implementation notes¶
Attributes: Listable, NumericFunction, Protected.
References¶
- Source:
src/info.c - Specification:
docs/spec/builtins/special-functions.md - Tests:
tests/test_compile.c - Tests:
tests/test_nint.c - Tests:
tests/test_numeric_stress.c - Tests:
tests/test_sinintegral.c
Notes & additional examples¶
Notes¶
SinIntegral[z] is the sine integral Si(z) = Integral_0^z Sin[t]/t dt, an entire,
odd function with no branch cuts. Its derivative is Sinc, the cardinal
sine Sin[z]/z. On the imaginary axis Si(I y) = I Shi(y) in terms of the
hyperbolic sine integral, and as x -> ±Infinity, Si(x) -> ±Pi/2. A leading
negative is pulled out by odd symmetry (SinIntegral[-x] = -SinIntegral[x]). Numeric
evaluation uses a convergent Maclaurin series near the origin and an asymptotic
expansion for large |z|, at machine or arbitrary (MPFR) precision. Listable. See
also CosIntegral.