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

Optimal. Leaf size=43 \[ \frac{7 x}{16 \left (x^2+1\right )}-\frac{x}{24 \left (x^2+1\right )^2}+\frac{x}{6 \left (x^2+1\right )^3}+\frac{7}{16} \tan ^{-1}(x) \]

[Out]

x/(6*(1 + x^2)^3) - x/(24*(1 + x^2)^2) + (7*x)/(16*(1 + x^2)) + (7*ArcTan[x])/16

________________________________________________________________________________________

Rubi [A]  time = 0.0135686, antiderivative size = 43, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {1157, 385, 199, 203} \[ \frac{7 x}{16 \left (x^2+1\right )}-\frac{x}{24 \left (x^2+1\right )^2}+\frac{x}{6 \left (x^2+1\right )^3}+\frac{7}{16} \tan ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

x/(6*(1 + x^2)^3) - x/(24*(1 + x^2)^2) + (7*x)/(16*(1 + x^2)) + (7*ArcTan[x])/16

Rule 1157

Int[((d_) + (e_.)*(x_)^2)^(q_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> With[{Qx = PolynomialQ
uotient[(a + b*x^2 + c*x^4)^p, d + e*x^2, x], R = Coeff[PolynomialRemainder[(a + b*x^2 + c*x^4)^p, d + e*x^2,
x], x, 0]}, -Simp[(R*x*(d + e*x^2)^(q + 1))/(2*d*(q + 1)), x] + Dist[1/(2*d*(q + 1)), Int[(d + e*x^2)^(q + 1)*
ExpandToSum[2*d*(q + 1)*Qx + R*(2*q + 3), x], x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && N
eQ[c*d^2 - b*d*e + a*e^2, 0] && IGtQ[p, 0] && LtQ[q, -1]

Rule 385

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

Rule 199

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> -Simp[(x*(a + b*x^n)^(p + 1))/(a*n*(p + 1)), x] + Dist[(n*(p +
 1) + 1)/(a*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && LtQ[p, -1] && (In
tegerQ[2*p] || (n == 2 && IntegerQ[4*p]) || (n == 2 && IntegerQ[3*p]) || Denominator[p + 1/n] < Denominator[p]
)

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{1+x^2+x^4}{\left (1+x^2\right )^4} \, dx &=\frac{x}{6 \left (1+x^2\right )^3}-\frac{1}{6} \int \frac{-5-6 x^2}{\left (1+x^2\right )^3} \, dx\\ &=\frac{x}{6 \left (1+x^2\right )^3}-\frac{x}{24 \left (1+x^2\right )^2}+\frac{7}{8} \int \frac{1}{\left (1+x^2\right )^2} \, dx\\ &=\frac{x}{6 \left (1+x^2\right )^3}-\frac{x}{24 \left (1+x^2\right )^2}+\frac{7 x}{16 \left (1+x^2\right )}+\frac{7}{16} \int \frac{1}{1+x^2} \, dx\\ &=\frac{x}{6 \left (1+x^2\right )^3}-\frac{x}{24 \left (1+x^2\right )^2}+\frac{7 x}{16 \left (1+x^2\right )}+\frac{7}{16} \tan ^{-1}(x)\\ \end{align*}

Mathematica [A]  time = 0.0119681, size = 30, normalized size = 0.7 \[ \frac{1}{48} \left (\frac{x \left (21 x^4+40 x^2+27\right )}{\left (x^2+1\right )^3}+21 \tan ^{-1}(x)\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

((x*(27 + 40*x^2 + 21*x^4))/(1 + x^2)^3 + 21*ArcTan[x])/48

________________________________________________________________________________________

Maple [A]  time = 0.006, size = 28, normalized size = 0.7 \begin{align*}{\frac{1}{ \left ({x}^{2}+1 \right ) ^{3}} \left ({\frac{7\,{x}^{5}}{16}}+{\frac{5\,{x}^{3}}{6}}+{\frac{9\,x}{16}} \right ) }+{\frac{7\,\arctan \left ( x \right ) }{16}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(7/16*x^5+5/6*x^3+9/16*x)/(x^2+1)^3+7/16*arctan(x)

________________________________________________________________________________________

Maxima [A]  time = 1.40947, size = 51, normalized size = 1.19 \begin{align*} \frac{21 \, x^{5} + 40 \, x^{3} + 27 \, x}{48 \,{\left (x^{6} + 3 \, x^{4} + 3 \, x^{2} + 1\right )}} + \frac{7}{16} \, \arctan \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/48*(21*x^5 + 40*x^3 + 27*x)/(x^6 + 3*x^4 + 3*x^2 + 1) + 7/16*arctan(x)

________________________________________________________________________________________

Fricas [A]  time = 2.04415, size = 132, normalized size = 3.07 \begin{align*} \frac{21 \, x^{5} + 40 \, x^{3} + 21 \,{\left (x^{6} + 3 \, x^{4} + 3 \, x^{2} + 1\right )} \arctan \left (x\right ) + 27 \, x}{48 \,{\left (x^{6} + 3 \, x^{4} + 3 \, x^{2} + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/48*(21*x^5 + 40*x^3 + 21*(x^6 + 3*x^4 + 3*x^2 + 1)*arctan(x) + 27*x)/(x^6 + 3*x^4 + 3*x^2 + 1)

________________________________________________________________________________________

Sympy [A]  time = 0.13525, size = 36, normalized size = 0.84 \begin{align*} \frac{21 x^{5} + 40 x^{3} + 27 x}{48 x^{6} + 144 x^{4} + 144 x^{2} + 48} + \frac{7 \operatorname{atan}{\left (x \right )}}{16} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(21*x**5 + 40*x**3 + 27*x)/(48*x**6 + 144*x**4 + 144*x**2 + 48) + 7*atan(x)/16

________________________________________________________________________________________

Giac [A]  time = 1.05616, size = 38, normalized size = 0.88 \begin{align*} \frac{21 \, x^{5} + 40 \, x^{3} + 27 \, x}{48 \,{\left (x^{2} + 1\right )}^{3}} + \frac{7}{16} \, \arctan \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/48*(21*x^5 + 40*x^3 + 27*x)/(x^2 + 1)^3 + 7/16*arctan(x)