Sine and Cosine Integrals

The cosine and sine integrals are defined by:

Ci(x) = EulersConstant + ln(x) + integral[0, infinity]( (cos(t)-1)/t dt)

Si(x) = integral[0,infinity]( sin(t)/t dt)

There are some identities to handle various signs of the arguments, and so forth (obviously, it is a challenge to take Ci(-1)).

Euler's constant is approximately 0.57721556... It pops up (oddly enough) in the Exponential integrals, but also in reference to prime numbers and other number theory areas. My Euler's Constant page has a bunch more detail, and some links to web sites that give a lot more information on this sort of thing, if you are curious (I was).

The Numerical Recipes in Fortran book has a Fortran subroutine for calculating sine and cosine integrals using a series expansions. A pdf version of the book section is at:

http://www.ulib.org/webRoot/Books/Numerical_Recipes/bookfpdf/f6-9.pdf

A VisualBasic module to calculate sine and cosine integrals that I wrote is also available. (ExponentialIntegral.bas) Both the Fortran and the VB routines calculate both Si and Ci at the same time.


expinteg.htm - 21 Sep 1999, Jim Lux