\(\int \frac {(1+x^2) \arctan (x)}{x^5} \, dx\) [677]

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

Optimal result

Integrand size = 11, antiderivative size = 31 \[ \int \frac {\left (1+x^2\right ) \arctan (x)}{x^5} \, dx=-\frac {1}{12 x^3}-\frac {1}{4 x}-\frac {\left (1+x^2\right )^2 \arctan (x)}{4 x^4} \]

[Out]

-1/12/x^3-1/4/x-1/4*(x^2+1)^2*arctan(x)/x^4

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {5064, 14} \[ \int \frac {\left (1+x^2\right ) \arctan (x)}{x^5} \, dx=-\frac {\left (x^2+1\right )^2 \arctan (x)}{4 x^4}-\frac {1}{12 x^3}-\frac {1}{4 x} \]

[In]

Int[((1 + x^2)*ArcTan[x])/x^5,x]

[Out]

-1/12*1/x^3 - 1/(4*x) - ((1 + x^2)^2*ArcTan[x])/(4*x^4)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 5064

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> Simp
[(f*x)^(m + 1)*(d + e*x^2)^(q + 1)*((a + b*ArcTan[c*x])^p/(d*f*(m + 1))), x] - Dist[b*c*(p/(f*(m + 1))), Int[(
f*x)^(m + 1)*(d + e*x^2)^q*(a + b*ArcTan[c*x])^(p - 1), x], x] /; FreeQ[{a, b, c, d, e, f, m, q}, x] && EqQ[e,
 c^2*d] && EqQ[m + 2*q + 3, 0] && GtQ[p, 0] && NeQ[m, -1]

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

Mathematica [C] (verified)

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

Time = 0.01 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.90 \[ \int \frac {\left (1+x^2\right ) \arctan (x)}{x^5} \, dx=-\frac {\arctan (x)}{4 x^4}-\frac {\arctan (x)}{2 x^2}-\frac {\operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},-x^2\right )}{12 x^3}-\frac {\operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},-x^2\right )}{2 x} \]

[In]

Integrate[((1 + x^2)*ArcTan[x])/x^5,x]

[Out]

-1/4*ArcTan[x]/x^4 - ArcTan[x]/(2*x^2) - Hypergeometric2F1[-3/2, 1, -1/2, -x^2]/(12*x^3) - Hypergeometric2F1[-
1/2, 1, 1/2, -x^2]/(2*x)

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.97

method result size
default \(-\frac {\arctan \left (x \right )}{2 x^{2}}-\frac {\arctan \left (x \right )}{4 x^{4}}-\frac {\arctan \left (x \right )}{4}-\frac {1}{12 x^{3}}-\frac {1}{4 x}\) \(30\)
parts \(-\frac {\arctan \left (x \right )}{2 x^{2}}-\frac {\arctan \left (x \right )}{4 x^{4}}-\frac {\arctan \left (x \right )}{4}-\frac {1}{12 x^{3}}-\frac {1}{4 x}\) \(30\)
parallelrisch \(-\frac {3 \arctan \left (x \right ) x^{4}+3 x^{3}+6 x^{2} \arctan \left (x \right )+x +3 \arctan \left (x \right )}{12 x^{4}}\) \(31\)
meijerg \(-\frac {1}{12 x^{3}}-\frac {1}{4 x}-\frac {2 \left (-\frac {3 x^{4}}{8}+\frac {3}{8}\right ) \arctan \left (\sqrt {x^{2}}\right )}{3 x^{3} \sqrt {x^{2}}}-\frac {\left (x^{2}+1\right ) \arctan \left (x \right )}{2 x^{2}}\) \(47\)
risch \(\frac {i \left (2 x^{2}+1\right ) \ln \left (i x +1\right )}{8 x^{4}}+\frac {i \left (3 \ln \left (x -i\right ) x^{4}-3 \ln \left (x +i\right ) x^{4}+6 i x^{3}-6 x^{2} \ln \left (-i x +1\right )+2 i x -3 \ln \left (-i x +1\right )\right )}{24 x^{4}}\) \(80\)

[In]

int((x^2+1)*arctan(x)/x^5,x,method=_RETURNVERBOSE)

[Out]

-1/2*arctan(x)/x^2-1/4*arctan(x)/x^4-1/4*arctan(x)-1/12/x^3-1/4/x

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.84 \[ \int \frac {\left (1+x^2\right ) \arctan (x)}{x^5} \, dx=-\frac {3 \, x^{3} + 3 \, {\left (x^{4} + 2 \, x^{2} + 1\right )} \arctan \left (x\right ) + x}{12 \, x^{4}} \]

[In]

integrate((x^2+1)*arctan(x)/x^5,x, algorithm="fricas")

[Out]

-1/12*(3*x^3 + 3*(x^4 + 2*x^2 + 1)*arctan(x) + x)/x^4

Sympy [A] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.10 \[ \int \frac {\left (1+x^2\right ) \arctan (x)}{x^5} \, dx=- \frac {\operatorname {atan}{\left (x \right )}}{4} - \frac {1}{4 x} - \frac {\operatorname {atan}{\left (x \right )}}{2 x^{2}} - \frac {1}{12 x^{3}} - \frac {\operatorname {atan}{\left (x \right )}}{4 x^{4}} \]

[In]

integrate((x**2+1)*atan(x)/x**5,x)

[Out]

-atan(x)/4 - 1/(4*x) - atan(x)/(2*x**2) - 1/(12*x**3) - atan(x)/(4*x**4)

Maxima [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.00 \[ \int \frac {\left (1+x^2\right ) \arctan (x)}{x^5} \, dx=-\frac {3 \, x^{2} + 1}{12 \, x^{3}} - \frac {{\left (2 \, x^{2} + 1\right )} \arctan \left (x\right )}{4 \, x^{4}} - \frac {1}{4} \, \arctan \left (x\right ) \]

[In]

integrate((x^2+1)*arctan(x)/x^5,x, algorithm="maxima")

[Out]

-1/12*(3*x^2 + 1)/x^3 - 1/4*(2*x^2 + 1)*arctan(x)/x^4 - 1/4*arctan(x)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.00 \[ \int \frac {\left (1+x^2\right ) \arctan (x)}{x^5} \, dx=-\frac {3 \, x^{2} + 1}{12 \, x^{3}} - \frac {{\left (2 \, x^{2} + 1\right )} \arctan \left (x\right )}{4 \, x^{4}} - \frac {1}{4} \, \arctan \left (x\right ) \]

[In]

integrate((x^2+1)*arctan(x)/x^5,x, algorithm="giac")

[Out]

-1/12*(3*x^2 + 1)/x^3 - 1/4*(2*x^2 + 1)*arctan(x)/x^4 - 1/4*arctan(x)

Mupad [B] (verification not implemented)

Time = 0.38 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.97 \[ \int \frac {\left (1+x^2\right ) \arctan (x)}{x^5} \, dx=-\frac {\mathrm {atan}\left (x\right )}{4}-\frac {\frac {x}{12}+\frac {\mathrm {atan}\left (x\right )}{4}+\frac {x^2\,\mathrm {atan}\left (x\right )}{2}+\frac {x^3}{4}}{x^4} \]

[In]

int((atan(x)*(x^2 + 1))/x^5,x)

[Out]

- atan(x)/4 - (x/12 + atan(x)/4 + (x^2*atan(x))/2 + x^3/4)/x^4