3.152 \(\int \frac{4+3 x^4}{x^2 (1+x^2)^3} \, dx\)

Optimal. Leaf size=36 \[ -\frac{25 x}{8 \left (x^2+1\right )}-\frac{7 x}{4 \left (x^2+1\right )^2}-\frac{4}{x}-\frac{57}{8} \tan ^{-1}(x) \]

[Out]

-4/x - (7*x)/(4*(1 + x^2)^2) - (25*x)/(8*(1 + x^2)) - (57*ArcTan[x])/8

________________________________________________________________________________________

Rubi [A]  time = 0.0232351, antiderivative size = 36, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {1260, 456, 453, 203} \[ -\frac{25 x}{8 \left (x^2+1\right )}-\frac{7 x}{4 \left (x^2+1\right )^2}-\frac{4}{x}-\frac{57}{8} \tan ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

Int[(4 + 3*x^4)/(x^2*(1 + x^2)^3),x]

[Out]

-4/x - (7*x)/(4*(1 + x^2)^2) - (25*x)/(8*(1 + x^2)) - (57*ArcTan[x])/8

Rule 1260

Int[(x_)^(m_)*((d_) + (e_.)*(x_)^2)^(q_)*((a_) + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Simp[((-d)^(m/2 - 1)*(c*d^2
 + a*e^2)^p*x*(d + e*x^2)^(q + 1))/(2*e^(2*p + m/2)*(q + 1)), x] + Dist[(-d)^(m/2 - 1)/(2*e^(2*p)*(q + 1)), In
t[x^m*(d + e*x^2)^(q + 1)*ExpandToSum[Together[(1*(2*(-d)^(-(m/2) + 1)*e^(2*p)*(q + 1)*(a + c*x^4)^p - ((c*d^2
 + a*e^2)^p/(e^(m/2)*x^m))*(d + e*(2*q + 3)*x^2)))/(d + e*x^2)], x], x], x] /; FreeQ[{a, c, d, e}, x] && IGtQ[
p, 0] && ILtQ[q, -1] && ILtQ[m/2, 0]

Rule 456

Int[(x_)^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[((-a)^(m/2 - 1)*(b*c - a*d)*
x*(a + b*x^2)^(p + 1))/(2*b^(m/2 + 1)*(p + 1)), x] + Dist[1/(2*b^(m/2 + 1)*(p + 1)), Int[x^m*(a + b*x^2)^(p +
1)*ExpandToSum[2*b*(p + 1)*Together[(b^(m/2)*(c + d*x^2) - (-a)^(m/2 - 1)*(b*c - a*d)*x^(-m + 2))/(a + b*x^2)]
 - ((-a)^(m/2 - 1)*(b*c - a*d))/x^m, x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] &
& ILtQ[m/2, 0] && (IntegerQ[p] || EqQ[m + 2*p + 1, 0])

Rule 453

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(c*(e*x)^(m
+ 1)*(a + b*x^n)^(p + 1))/(a*e*(m + 1)), x] + Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(a*e^n*(m + 1)), In
t[(e*x)^(m + n)*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[n] ||
GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1])) &&  !ILtQ[p, -1]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{4+3 x^4}{x^2 \left (1+x^2\right )^3} \, dx &=-\frac{7 x}{4 \left (1+x^2\right )^2}-\frac{1}{4} \int \frac{-16+9 x^2}{x^2 \left (1+x^2\right )^2} \, dx\\ &=-\frac{7 x}{4 \left (1+x^2\right )^2}-\frac{25 x}{8 \left (1+x^2\right )}+\frac{1}{8} \int \frac{32-25 x^2}{x^2 \left (1+x^2\right )} \, dx\\ &=-\frac{4}{x}-\frac{7 x}{4 \left (1+x^2\right )^2}-\frac{25 x}{8 \left (1+x^2\right )}-\frac{57}{8} \int \frac{1}{1+x^2} \, dx\\ &=-\frac{4}{x}-\frac{7 x}{4 \left (1+x^2\right )^2}-\frac{25 x}{8 \left (1+x^2\right )}-\frac{57}{8} \tan ^{-1}(x)\\ \end{align*}

Mathematica [A]  time = 0.0160468, size = 33, normalized size = 0.92 \[ -\frac{57 x^4+103 x^2+32}{8 x \left (x^2+1\right )^2}-\frac{57}{8} \tan ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

Integrate[(4 + 3*x^4)/(x^2*(1 + x^2)^3),x]

[Out]

-(32 + 103*x^2 + 57*x^4)/(8*x*(1 + x^2)^2) - (57*ArcTan[x])/8

________________________________________________________________________________________

Maple [A]  time = 0.009, size = 29, normalized size = 0.8 \begin{align*} -{\frac{1}{ \left ({x}^{2}+1 \right ) ^{2}} \left ({\frac{25\,{x}^{3}}{8}}+{\frac{39\,x}{8}} \right ) }-{\frac{57\,\arctan \left ( x \right ) }{8}}-4\,{x}^{-1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((3*x^4+4)/x^2/(x^2+1)^3,x)

[Out]

-(25/8*x^3+39/8*x)/(x^2+1)^2-57/8*arctan(x)-4/x

________________________________________________________________________________________

Maxima [A]  time = 1.44727, size = 42, normalized size = 1.17 \begin{align*} -\frac{57 \, x^{4} + 103 \, x^{2} + 32}{8 \,{\left (x^{5} + 2 \, x^{3} + x\right )}} - \frac{57}{8} \, \arctan \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3*x^4+4)/x^2/(x^2+1)^3,x, algorithm="maxima")

[Out]

-1/8*(57*x^4 + 103*x^2 + 32)/(x^5 + 2*x^3 + x) - 57/8*arctan(x)

________________________________________________________________________________________

Fricas [A]  time = 1.94532, size = 109, normalized size = 3.03 \begin{align*} -\frac{57 \, x^{4} + 103 \, x^{2} + 57 \,{\left (x^{5} + 2 \, x^{3} + x\right )} \arctan \left (x\right ) + 32}{8 \,{\left (x^{5} + 2 \, x^{3} + x\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3*x^4+4)/x^2/(x^2+1)^3,x, algorithm="fricas")

[Out]

-1/8*(57*x^4 + 103*x^2 + 57*(x^5 + 2*x^3 + x)*arctan(x) + 32)/(x^5 + 2*x^3 + x)

________________________________________________________________________________________

Sympy [A]  time = 0.133365, size = 32, normalized size = 0.89 \begin{align*} - \frac{57 x^{4} + 103 x^{2} + 32}{8 x^{5} + 16 x^{3} + 8 x} - \frac{57 \operatorname{atan}{\left (x \right )}}{8} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3*x**4+4)/x**2/(x**2+1)**3,x)

[Out]

-(57*x**4 + 103*x**2 + 32)/(8*x**5 + 16*x**3 + 8*x) - 57*atan(x)/8

________________________________________________________________________________________

Giac [A]  time = 1.05531, size = 38, normalized size = 1.06 \begin{align*} -\frac{25 \, x^{3} + 39 \, x}{8 \,{\left (x^{2} + 1\right )}^{2}} - \frac{4}{x} - \frac{57}{8} \, \arctan \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3*x^4+4)/x^2/(x^2+1)^3,x, algorithm="giac")

[Out]

-1/8*(25*x^3 + 39*x)/(x^2 + 1)^2 - 4/x - 57/8*arctan(x)