## `Ci` -- the cosine integral function

#### Introduction

`Ci``(x)` represents the cosine integral EULER + ln(x) + int((cos(t)-1)/t, t=0..x).

#### Call(s)

`Ci(x)`

#### Parameters

`x` | - | an arithmetical expression

#### Returns

an arithmetical expression.

### Overloadable:

`x`

#### Side Effects

When called with a floating point argument, the function is sensitive to the environment variable `DIGITS` which determines the numerical working precision.

#### Related Functions

`Ei`, `int`, `Si`, `cos`

#### Details

- If `x` is a floating point number, then `Ci``(x)` returns the numerical value of the cosine integral. The special values Ci(infinity)=0 and Ci(-infinity)=I*PI are implemented. For all other arguments, `Ci` returns a symbolic function call.
- The float attribute of `Ci` is a kernel function, i.e., floating point evaluation is fast.

#### Example 1

We demonstrate some calls with exact and symbolic input data:

    >> Ci(1), Ci(sqrt(2)), Ci(x + 1), Ci(infinity), Ci(-infinity)

                                   1/2
                        Ci(1), Ci(2   ), Ci(x + 1), 0, I PI

Floating point values are computed for floating point arguments:

    >> Ci(1.0), Ci(2.0 + 10.0*I)

                     0.3374039229, - 242.5252694 - 1185.8387 I

#### Example 2

`Ci` is singular at the origin:

    >> Ci(0)

          Error: singularity [Ci]

The negative real axis is a branch cut of `Ci`. A jump of height I*2*PI occurs when crossing this cut:

    >> Ci(-1.0), Ci(-1.0 + 10^(-10)*I), Ci(-1.0 - 10^(-10)*I)

          0.3374039229 + 3.141592654 I, 0.3374039229 + 3.141592654 I,

             0.3374039229 - 3.141592654 I

#### Example 3

The functions `diff` and `float` handle expressions involving `Ci`:

    >> diff(Ci(x), x, x, x), float(ln(3 + Ci(sqrt(PI))))

                     2 cos(x)   cos(x)   2 sin(x)
                     -------- - ------ + --------, 1.241299561
                         3        x          2
                        x                   x

#### Background

- The function `Ci``(x)-ln(x)` is an entire function. `Ci` has a logarithmic singularity at the origin and a branch cut along the negative real axis. The values on the negative real axis coincide with the limit ``from above'':

      Ci(x)=limit(Ci(x+eps*I), eps=0, Right).

- Reference: M. Abramowitz and I. Stegun, ``Handbook of Mathematical Functions'', Dover Publications Inc., New York (1965).

#### Changes

- new function

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000