3.104 \(\int \frac{\sin (x)}{x^2} \, dx\)

Optimal. Leaf size=10 \[ \text{CosIntegral}(x)-\frac{\sin (x)}{x} \]

[Out]

CosIntegral[x] - Sin[x]/x

________________________________________________________________________________________

Rubi [A]  time = 0.0254586, antiderivative size = 10, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 6, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {3297, 3302} \[ \text{CosIntegral}(x)-\frac{\sin (x)}{x} \]

Antiderivative was successfully verified.

[In]

Int[Sin[x]/x^2,x]

[Out]

CosIntegral[x] - Sin[x]/x

Rule 3297

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[((c + d*x)^(m + 1)*Sin[e + f*x])/(d*(
m + 1)), x] - Dist[f/(d*(m + 1)), Int[(c + d*x)^(m + 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && LtQ[
m, -1]

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{\sin (x)}{x^2} \, dx &=-\frac{\sin (x)}{x}+\int \frac{\cos (x)}{x} \, dx\\ &=\text{Ci}(x)-\frac{\sin (x)}{x}\\ \end{align*}

Mathematica [A]  time = 0.0020751, size = 10, normalized size = 1. \[ \text{CosIntegral}(x)-\frac{\sin (x)}{x} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[x]/x^2,x]

[Out]

CosIntegral[x] - Sin[x]/x

________________________________________________________________________________________

Maple [A]  time = 0.004, size = 11, normalized size = 1.1 \begin{align*}{\it Ci} \left ( x \right ) -{\frac{\sin \left ( x \right ) }{x}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)/x^2,x)

[Out]

Ci(x)-sin(x)/x

________________________________________________________________________________________

Maxima [C]  time = 1.06833, size = 20, normalized size = 2. \begin{align*} \frac{1}{2} \, \Gamma \left (-1, i \, x\right ) + \frac{1}{2} \, \Gamma \left (-1, -i \, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/x^2,x, algorithm="maxima")

[Out]

1/2*gamma(-1, I*x) + 1/2*gamma(-1, -I*x)

________________________________________________________________________________________

Fricas [A]  time = 1.81588, size = 80, normalized size = 8. \begin{align*} \frac{x \operatorname{Ci}\left (-x\right ) + x \operatorname{Ci}\left (x\right ) - 2 \, \sin \left (x\right )}{2 \, x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/x^2,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [B]  time = 1.60248, size = 17, normalized size = 1.7 \begin{align*} - \log{\left (x \right )} + \frac{\log{\left (x^{2} \right )}}{2} + \operatorname{Ci}{\left (x \right )} - \frac{\sin{\left (x \right )}}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/x**2,x)

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.07237, size = 18, normalized size = 1.8 \begin{align*} \frac{x \operatorname{Ci}\left (x\right ) - \sin \left (x\right )}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)/x^2,x, algorithm="giac")

[Out]

(x*cos_integral(x) - sin(x))/x