How this calculation works
Evaluate the real sine and cosine integrals, their derivatives and the logarithmic endpoint behavior under one explicit branch convention.
Si(x)=∫₀ˣ sin(t)/t dt; Ci(x)=γ+ln(x)+∫₀ˣ (cos(t)−1)/t dt.A worked example
At x = 2, Si(2) ≈ 1.6054129768 and Ci(2) ≈ 0.4229808288. The corresponding derivatives are sin(2)/2 ≈ 0.4546487134 and cos(2)/2 ≈ −0.2080734183.
Good to know
Real argument 0–100. Si(0)=0 is supported; Ci(0) is undefined with a negative infinite limit. Positive-real Ci only. Segmented quadrature, cancellation-safe cosine kernel and refinement diagnostics; negative-argument complex branches deferred.
Reference: Official definition and method reference (opens in a new tab) ↗
Two related integrals with different endpoints
The sine integral accumulates sin(t)/t from zero to the requested argument. Although the quotient looks undefined at zero, its continuous value is one, so the integral itself is regular. The cosine integral has a different normalization: it includes Euler’s constant and ln(x), together with an integral whose apparent endpoint singularity is removable.
That logarithm is essential. Leaving it out computes a related auxiliary quantity rather than Ci(x). The two outputs share a control because they are commonly used together, but they do not share the same value at the origin. The page explicitly separates the finite Si endpoint from the divergent Ci endpoint.
Compare this with the Cauchy principal value integral calculator for a simple pole. Evaluate the named Si(x), Ci(x), derivatives and limiting behavior, not an arbitrary single-pole principal-value integral.
Keep to the positive real branch
The input range is zero through one hundred. For strictly positive x, both displayed function values are real and unambiguous under the definitions shown above. At exactly zero, the sine integral is returned as zero while the cosine integral is described as undefined, with a negative infinite limiting value.
Negative arguments require additional care because the logarithm in Ci has complex branch information. This page does not silently replace x by its absolute value or discard an imaginary contribution. Restricting the domain is preferable to returning a real number under a branch convention the user never selected or saw.
Check the worked example
At x = 2, integrate sin(t)/t from zero to two to obtain approximately 1.6054129768. This exceeds π/2 slightly because the function approaches its large-argument behavior through oscillations rather than increasing monotonically toward a horizontal limit. Overshoot is expected and does not indicate an out-of-range probability.
For the same argument, the cosine integral is approximately 0.4229808288. Its derivative is cos(2)/2, approximately −0.2080734183, so Ci is locally falling at that point. The sine-integral derivative is sin(2)/2, approximately 0.4546487134. These derivative checks are simple independent tests of the displayed normalization.
Handle cancellation in the cosine kernel
The expression cos(t)−1 loses relative precision when t is very small because two numbers close to one are subtracted. The implementation instead uses −2 sin²(t/2), which is mathematically identical and behaves better near zero. The quotient by t then tends smoothly to zero without introducing an artificial pole.
For the sine kernel, the value at zero is inserted directly as one. These endpoint rules are part of evaluating the stated integrals, not arbitrary numerical patches. An integrator that samples a literal zero divided by zero could otherwise fail even when the surrounding function is smooth and the requested answer exists.
Resolve the oscillations interval by interval
A single broad quadrature panel can miss the changing sign of an oscillatory integrand. The interval is therefore divided into pieces no wider than about π before adaptive integration is applied. Each piece contributes with its own sign, and their sum reconstructs the accumulated integral up to the requested argument.
The calculation is repeated at a tighter tolerance and the absolute difference is displayed. This checks numerical stability within the supported domain, but does not prove a formal worst-case error bound. If the quadrature depth or sample cap is reached, the calculator returns an error rather than a value labeled as converged.
Read a function curve rather than a probability
The illustrated curves show signed special-function values. Neither Si nor Ci is a cumulative probability, so the range is not confined to zero and one. Their zeros, overshoot and changes of slope are consequences of oscillatory integration. A negative Ci value near zero is consistent with its logarithmic limiting behavior.
At larger positive arguments, cancellation between successive lobes becomes increasingly important. Showing both the value and the derivative helps distinguish a curve that is crossing zero from one that is merely near an extremum. A small function value alone does not imply that the integrand or its local slope is small.
Carry the definition into later work
When comparing packages, verify whether the source uses Ci, an entire cosine-integral variant, or another sign convention. The same letters can appear beside different auxiliary integrals in older references. Record the displayed formula along with a copied result if the value will become part of a technical calculation or a worked solution.
The derivative outputs are with respect to the dimensionless argument x. If another model supplies x as frequency multiplied by time or length, apply the chain rule before interpreting a physical rate. This page does not add unit conversions, assume an angular-frequency convention or infer any scale factor from the input alone.
A few questions, answered
Why does Si have a value at zero but Ci does not?
The sine kernel has a removable endpoint, while the explicit logarithm in Ci diverges to negative infinity as x approaches zero from above.
Can the sine integral exceed π/2?
Yes. Its oscillatory approach permits overshoot; π/2 is the positive large-argument limit, not a bound for every finite argument.
Why are negative arguments rejected?
The cosine integral needs a complex logarithm branch there. This page deliberately implements the positive-real convention only.
Are the arguments angles in degrees?
No. The functions use the mathematical dimensionless argument with radian trigonometric evaluation, without a degree conversion.