\(\int \frac {\cos (\frac {1}{x})}{x^5} \, dx\) [907]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [C] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 8, antiderivative size = 34 \[ \int \frac {\cos \left (\frac {1}{x}\right )}{x^5} \, dx=6 \cos \left (\frac {1}{x}\right )-\frac {3 \cos \left (\frac {1}{x}\right )}{x^2}-\frac {\sin \left (\frac {1}{x}\right )}{x^3}+\frac {6 \sin \left (\frac {1}{x}\right )}{x} \]

[Out]

6*cos(1/x)-3*cos(1/x)/x^2-sin(1/x)/x^3+6*sin(1/x)/x

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {3461, 3377, 2718} \[ \int \frac {\cos \left (\frac {1}{x}\right )}{x^5} \, dx=-\frac {\sin \left (\frac {1}{x}\right )}{x^3}-\frac {3 \cos \left (\frac {1}{x}\right )}{x^2}+\frac {6 \sin \left (\frac {1}{x}\right )}{x}+6 \cos \left (\frac {1}{x}\right ) \]

[In]

Int[Cos[x^(-1)]/x^5,x]

[Out]

6*Cos[x^(-1)] - (3*Cos[x^(-1)])/x^2 - Sin[x^(-1)]/x^3 + (6*Sin[x^(-1)])/x

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

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

Rule 3461

Int[((a_.) + Cos[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Cos[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IntegerQ[Simpl
ify[(m + 1)/n]] && (EqQ[p, 1] || EqQ[m, n - 1] || (IntegerQ[p] && GtQ[Simplify[(m + 1)/n], 0]))

Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int x^3 \cos (x) \, dx,x,\frac {1}{x}\right ) \\ & = -\frac {\sin \left (\frac {1}{x}\right )}{x^3}+3 \text {Subst}\left (\int x^2 \sin (x) \, dx,x,\frac {1}{x}\right ) \\ & = -\frac {3 \cos \left (\frac {1}{x}\right )}{x^2}-\frac {\sin \left (\frac {1}{x}\right )}{x^3}+6 \text {Subst}\left (\int x \cos (x) \, dx,x,\frac {1}{x}\right ) \\ & = -\frac {3 \cos \left (\frac {1}{x}\right )}{x^2}-\frac {\sin \left (\frac {1}{x}\right )}{x^3}+\frac {6 \sin \left (\frac {1}{x}\right )}{x}-6 \text {Subst}\left (\int \sin (x) \, dx,x,\frac {1}{x}\right ) \\ & = 6 \cos \left (\frac {1}{x}\right )-\frac {3 \cos \left (\frac {1}{x}\right )}{x^2}-\frac {\sin \left (\frac {1}{x}\right )}{x^3}+\frac {6 \sin \left (\frac {1}{x}\right )}{x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.94 \[ \int \frac {\cos \left (\frac {1}{x}\right )}{x^5} \, dx=\frac {3 \left (-1+2 x^2\right ) \cos \left (\frac {1}{x}\right )}{x^2}+\frac {\left (-1+6 x^2\right ) \sin \left (\frac {1}{x}\right )}{x^3} \]

[In]

Integrate[Cos[x^(-1)]/x^5,x]

[Out]

(3*(-1 + 2*x^2)*Cos[x^(-1)])/x^2 + ((-1 + 6*x^2)*Sin[x^(-1)])/x^3

Maple [A] (verified)

Time = 0.31 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.97

method result size
risch \(\frac {3 \left (2 x^{2}-1\right ) \cos \left (\frac {1}{x}\right )}{x^{2}}+\frac {\left (6 x^{2}-1\right ) \sin \left (\frac {1}{x}\right )}{x^{3}}\) \(33\)
derivativedivides \(6 \cos \left (\frac {1}{x}\right )-\frac {3 \cos \left (\frac {1}{x}\right )}{x^{2}}-\frac {\sin \left (\frac {1}{x}\right )}{x^{3}}+\frac {6 \sin \left (\frac {1}{x}\right )}{x}\) \(35\)
default \(6 \cos \left (\frac {1}{x}\right )-\frac {3 \cos \left (\frac {1}{x}\right )}{x^{2}}-\frac {\sin \left (\frac {1}{x}\right )}{x^{3}}+\frac {6 \sin \left (\frac {1}{x}\right )}{x}\) \(35\)
meijerg \(-8 \sqrt {\pi }\, \left (\frac {3}{4 \sqrt {\pi }}-\frac {\left (-\frac {3}{2 x^{2}}+3\right ) \cos \left (\frac {1}{x}\right )}{4 \sqrt {\pi }}-\frac {\left (-\frac {1}{2 x^{2}}+3\right ) \sin \left (\frac {1}{x}\right )}{4 \sqrt {\pi }\, x}\right )\) \(47\)
parallelrisch \(\frac {12 x^{3}+12 \tan \left (\frac {1}{2 x}\right ) x^{2}+3 \tan \left (\frac {1}{2 x}\right )^{2} x -3 x -2 \tan \left (\frac {1}{2 x}\right )}{x^{3} \left (1+\tan \left (\frac {1}{2 x}\right )^{2}\right )}\) \(56\)
norman \(\frac {12 x^{4}-3 x^{2}-2 x \tan \left (\frac {1}{2 x}\right )+3 x^{2} \tan \left (\frac {1}{2 x}\right )^{2}+12 x^{3} \tan \left (\frac {1}{2 x}\right )}{\left (1+\tan \left (\frac {1}{2 x}\right )^{2}\right ) x^{4}}\) \(61\)

[In]

int(cos(1/x)/x^5,x,method=_RETURNVERBOSE)

[Out]

3/x^2*(2*x^2-1)*cos(1/x)+(6*x^2-1)/x^3*sin(1/x)

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.94 \[ \int \frac {\cos \left (\frac {1}{x}\right )}{x^5} \, dx=\frac {3 \, {\left (2 \, x^{3} - x\right )} \cos \left (\frac {1}{x}\right ) + {\left (6 \, x^{2} - 1\right )} \sin \left (\frac {1}{x}\right )}{x^{3}} \]

[In]

integrate(cos(1/x)/x^5,x, algorithm="fricas")

[Out]

(3*(2*x^3 - x)*cos(1/x) + (6*x^2 - 1)*sin(1/x))/x^3

Sympy [A] (verification not implemented)

Time = 0.49 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.94 \[ \int \frac {\cos \left (\frac {1}{x}\right )}{x^5} \, dx=6 \cos {\left (\frac {1}{x} \right )} + \frac {6 \sin {\left (\frac {1}{x} \right )}}{x} - \frac {3 \cos {\left (\frac {1}{x} \right )}}{x^{2}} - \frac {\sin {\left (\frac {1}{x} \right )}}{x^{3}} \]

[In]

integrate(cos(1/x)/x**5,x)

[Out]

6*cos(1/x) + 6*sin(1/x)/x - 3*cos(1/x)/x**2 - sin(1/x)/x**3

Maxima [C] (verification not implemented)

Result contains higher order function than in optimal. Order 4 vs. order 3.

Time = 0.23 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.56 \[ \int \frac {\cos \left (\frac {1}{x}\right )}{x^5} \, dx=\frac {1}{2} \, \Gamma \left (4, \frac {i}{x}\right ) + \frac {1}{2} \, \Gamma \left (4, -\frac {i}{x}\right ) \]

[In]

integrate(cos(1/x)/x^5,x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.00 \[ \int \frac {\cos \left (\frac {1}{x}\right )}{x^5} \, dx=\frac {6 \, \sin \left (\frac {1}{x}\right )}{x} - \frac {3 \, \cos \left (\frac {1}{x}\right )}{x^{2}} - \frac {\sin \left (\frac {1}{x}\right )}{x^{3}} + 6 \, \cos \left (\frac {1}{x}\right ) \]

[In]

integrate(cos(1/x)/x^5,x, algorithm="giac")

[Out]

6*sin(1/x)/x - 3*cos(1/x)/x^2 - sin(1/x)/x^3 + 6*cos(1/x)

Mupad [B] (verification not implemented)

Time = 26.51 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.97 \[ \int \frac {\cos \left (\frac {1}{x}\right )}{x^5} \, dx=6\,\cos \left (\frac {1}{x}\right )-\frac {\sin \left (\frac {1}{x}\right )+3\,x\,\cos \left (\frac {1}{x}\right )-6\,x^2\,\sin \left (\frac {1}{x}\right )}{x^3} \]

[In]

int(cos(1/x)/x^5,x)

[Out]

6*cos(1/x) - (sin(1/x) + 3*x*cos(1/x) - 6*x^2*sin(1/x))/x^3