3.2.48 \(\int \frac {1+x^2+x^4}{(1+x^2)^4} \, dx\) [148]

Optimal. Leaf size=43 \[ \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) \]

[Out]

1/6*x/(x^2+1)^3-1/24*x/(x^2+1)^2+7/16*x/(x^2+1)+7/16*arctan(x)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {1171, 393, 205, 209} \begin {gather*} \frac {7 \text {ArcTan}(x)}{16}+\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} \end {gather*}

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 205

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] && (
IntegerQ[2*p] || (n == 2 && IntegerQ[4*p]) || (n == 2 && IntegerQ[3*p]) || Denominator[p + 1/n] < Denominator[
p])

Rule 209

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

Rule 393

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 1171

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] &&
 NeQ[c*d^2 - b*d*e + a*e^2, 0] && IGtQ[p, 0] && LtQ[q, -1]

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.01, size = 30, normalized size = 0.70 \begin {gather*} \frac {1}{48} \left (\frac {x \left (27+40 x^2+21 x^4\right )}{\left (1+x^2\right )^3}+21 \tan ^{-1}(x)\right ) \end {gather*}

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.05, size = 28, normalized size = 0.65

method result size
default \(\frac {\frac {7}{16} x^{5}+\frac {5}{6} x^{3}+\frac {9}{16} x}{\left (x^{2}+1\right )^{3}}+\frac {7 \arctan \left (x \right )}{16}\) \(28\)
risch \(\frac {\frac {7}{16} x^{5}+\frac {5}{6} x^{3}+\frac {9}{16} x}{\left (x^{2}+1\right )^{3}}+\frac {7 \arctan \left (x \right )}{16}\) \(28\)
meijerg \(\frac {x \left (15 x^{4}+40 x^{2}+33\right )}{48 \left (x^{2}+1\right )^{3}}+\frac {7 \arctan \left (x \right )}{16}-\frac {x \left (-15 x^{4}+40 x^{2}+15\right )}{240 \left (x^{2}+1\right )^{3}}-\frac {x \left (-3 x^{4}-8 x^{2}+3\right )}{48 \left (x^{2}+1\right )^{3}}\) \(72\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^4+x^2+1)/(x^2+1)^4,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 7.24, size = 38, normalized size = 0.88 \begin {gather*} \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 {gather*}

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 = 0.54, size = 52, normalized size = 1.21 \begin {gather*} \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 {gather*}

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.05, size = 36, normalized size = 0.84 \begin {gather*} \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 {gather*}

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 = 0.45, size = 28, normalized size = 0.65 \begin {gather*} \frac {21 \, x^{5} + 40 \, x^{3} + 27 \, x}{48 \, {\left (x^{2} + 1\right )}^{3}} + \frac {7}{16} \, \arctan \left (x\right ) \end {gather*}

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)

________________________________________________________________________________________

Mupad [B]
time = 0.18, size = 27, normalized size = 0.63 \begin {gather*} \frac {7\,\mathrm {atan}\left (x\right )}{16}+\frac {\frac {7\,x^5}{16}+\frac {5\,x^3}{6}+\frac {9\,x}{16}}{{\left (x^2+1\right )}^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________