3.103 \(\int \frac{\cos (x)}{x} \, dx\)

Optimal. Leaf size=2 \[ \text{CosIntegral}(x) \]

[Out]

CosIntegral[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0124961, antiderivative size = 2, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 6, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {3302} \[ \text{CosIntegral}(x) \]

Antiderivative was successfully verified.

[In]

Int[Cos[x]/x,x]

[Out]

CosIntegral[x]

Rule 3302

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rubi steps

\begin{align*} \int \frac{\cos (x)}{x} \, dx &=\text{Ci}(x)\\ \end{align*}

Mathematica [A]  time = 0.0014025, size = 2, normalized size = 1. \[ \text{CosIntegral}(x) \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]/x,x]

[Out]

CosIntegral[x]

________________________________________________________________________________________

Maple [A]  time = 0.005, size = 3, normalized size = 1.5 \begin{align*}{\it Ci} \left ( x \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)/x,x)

[Out]

Ci(x)

________________________________________________________________________________________

Maxima [C]  time = 1.05578, size = 18, normalized size = 9. \begin{align*} \frac{1}{2} \,{\rm Ei}\left (i \, x\right ) + \frac{1}{2} \,{\rm Ei}\left (-i \, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/x,x, algorithm="maxima")

[Out]

1/2*Ei(I*x) + 1/2*Ei(-I*x)

________________________________________________________________________________________

Fricas [B]  time = 1.69277, size = 59, normalized size = 29.5 \begin{align*} \frac{1}{2} \, \operatorname{Ci}\left (-x\right ) + \frac{1}{2} \, \operatorname{Ci}\left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/x,x, algorithm="fricas")

[Out]

1/2*cos_integral(-x) + 1/2*cos_integral(x)

________________________________________________________________________________________

Sympy [B]  time = 1.16375, size = 12, normalized size = 6. \begin{align*} - \log{\left (x \right )} + \frac{\log{\left (x^{2} \right )}}{2} + \operatorname{Ci}{\left (x \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/x,x)

[Out]

-log(x) + log(x**2)/2 + Ci(x)

________________________________________________________________________________________

Giac [A]  time = 1.09193, size = 3, normalized size = 1.5 \begin{align*} \operatorname{Ci}\left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)/x,x, algorithm="giac")

[Out]

cos_integral(x)