cosint

Cosine integral function.

Category: Mathematics > Mathematical Functions

Syntax

Y = cosint(X)

Evaluates Ci(x) for each element of X.

Description

The function is Ci(x) = eulergamma + log(x) + integral from 0 to x of (cos(t) - 1)/t dt, which equals minus the integral from x to infinity of cos(t)/t. It decays like sin(x)/x for large x and has a logarithmic singularity at the origin. Together with sinint it appears in the analysis of oscillatory integrals and filters.

Input arguments

X
Numeric or symbolic array.

Output arguments

Y
Array of the same size; cosint(0) is -Inf.

Example

Values and the singularity at 0

cosint(1)
cosint(0)
cosint(sym(pi))
Output
ans = 0.3374
ans = -Inf
ans = cosint(pi)

See also

sinint coshint ei expint eulergamma