3.1.44 \(\int \frac {(-1+x^2)^4}{(1+x^2)^5} \, dx\) [44]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {424, 21, 209} \begin {gather*} \frac {3 \text {ArcTan}(x)}{8}+\frac {x \left (1-x^2\right )^3}{4 \left (x^2+1\right )^4}+\frac {3 x \left (1-x^2\right )}{8 \left (x^2+1\right )^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

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 424

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 41, normalized size = 0.87 \begin {gather*} \frac {5 x-3 x^3+3 x^5-5 x^7+3 \left (1+x^2\right )^4 \tan ^{-1}(x)}{8 \left (1+x^2\right )^4} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.10, size = 33, normalized size = 0.70

method result size
default \(\frac {-\frac {5}{8} x^{7}+\frac {3}{8} x^{5}-\frac {3}{8} x^{3}+\frac {5}{8} x}{\left (x^{2}+1\right )^{4}}+\frac {3 \arctan \left (x \right )}{8}\) \(33\)
risch \(\frac {-\frac {5}{8} x^{7}+\frac {3}{8} x^{5}-\frac {3}{8} x^{3}+\frac {5}{8} x}{\left (x^{2}+1\right )^{4}}+\frac {3 \arctan \left (x \right )}{8}\) \(33\)
meijerg \(\frac {x \left (105 x^{6}+385 x^{4}+511 x^{2}+279\right )}{384 \left (x^{2}+1\right )^{4}}+\frac {3 \arctan \left (x \right )}{8}-\frac {x \left (837 x^{6}+1533 x^{4}+1155 x^{2}+315\right )}{1152 \left (x^{2}+1\right )^{4}}+\frac {x \left (-105 x^{6}+511 x^{4}+385 x^{2}+105\right )}{672 \left (x^{2}+1\right )^{4}}-\frac {3 x \left (-15 x^{6}-55 x^{4}+55 x^{2}+15\right )}{320 \left (x^{2}+1\right )^{4}}+\frac {x \left (-15 x^{6}-55 x^{4}-73 x^{2}+15\right )}{96 \left (x^{2}+1\right )^{4}}\) \(141\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(-5/8*x^7+3/8*x^5-3/8*x^3+5/8*x)/(x^2+1)^4+3/8*arctan(x)

________________________________________________________________________________________

Maxima [A]
time = 0.53, size = 48, normalized size = 1.02 \begin {gather*} -\frac {5 \, x^{7} - 3 \, x^{5} + 3 \, x^{3} - 5 \, x}{8 \, {\left (x^{8} + 4 \, x^{6} + 6 \, x^{4} + 4 \, x^{2} + 1\right )}} + \frac {3}{8} \, \arctan \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/8*(5*x^7 - 3*x^5 + 3*x^3 - 5*x)/(x^8 + 4*x^6 + 6*x^4 + 4*x^2 + 1) + 3/8*arctan(x)

________________________________________________________________________________________

Fricas [A]
time = 0.91, size = 67, normalized size = 1.43 \begin {gather*} -\frac {5 \, x^{7} - 3 \, x^{5} + 3 \, x^{3} - 3 \, {\left (x^{8} + 4 \, x^{6} + 6 \, x^{4} + 4 \, x^{2} + 1\right )} \arctan \left (x\right ) - 5 \, x}{8 \, {\left (x^{8} + 4 \, x^{6} + 6 \, x^{4} + 4 \, x^{2} + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/8*(5*x^7 - 3*x^5 + 3*x^3 - 3*(x^8 + 4*x^6 + 6*x^4 + 4*x^2 + 1)*arctan(x) - 5*x)/(x^8 + 4*x^6 + 6*x^4 + 4*x^
2 + 1)

________________________________________________________________________________________

Sympy [A]
time = 0.06, size = 46, normalized size = 0.98 \begin {gather*} \frac {- 5 x^{7} + 3 x^{5} - 3 x^{3} + 5 x}{8 x^{8} + 32 x^{6} + 48 x^{4} + 32 x^{2} + 8} + \frac {3 \operatorname {atan}{\left (x \right )}}{8} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(-5*x**7 + 3*x**5 - 3*x**3 + 5*x)/(8*x**8 + 32*x**6 + 48*x**4 + 32*x**2 + 8) + 3*atan(x)/8

________________________________________________________________________________________

Giac [A]
time = 0.91, size = 54, normalized size = 1.15 \begin {gather*} \frac {3}{32} \, \pi \mathrm {sgn}\left (x\right ) - \frac {5 \, {\left (x - \frac {1}{x}\right )}^{3} + 12 \, x - \frac {12}{x}}{8 \, {\left ({\left (x - \frac {1}{x}\right )}^{2} + 4\right )}^{2}} + \frac {3}{16} \, \arctan \left (\frac {x^{2} - 1}{2 \, x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

3/32*pi*sgn(x) - 1/8*(5*(x - 1/x)^3 + 12*x - 12/x)/((x - 1/x)^2 + 4)^2 + 3/16*arctan(1/2*(x^2 - 1)/x)

________________________________________________________________________________________

Mupad [B]
time = 0.04, size = 47, normalized size = 1.00 \begin {gather*} \frac {3\,\mathrm {atan}\left (x\right )}{8}+\frac {-\frac {5\,x^7}{8}+\frac {3\,x^5}{8}-\frac {3\,x^3}{8}+\frac {5\,x}{8}}{x^8+4\,x^6+6\,x^4+4\,x^2+1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(3*atan(x))/8 + ((5*x)/8 - (3*x^3)/8 + (3*x^5)/8 - (5*x^7)/8)/(4*x^2 + 6*x^4 + 4*x^6 + x^8 + 1)

________________________________________________________________________________________