\(\int \frac {5-5 x+7 x^2+x^3}{(-1+x)^2 (1+x)^3} \, dx\) [303]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (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 = 24, antiderivative size = 15 \[ \int \frac {5-5 x+7 x^2+x^3}{(-1+x)^2 (1+x)^3} \, dx=\frac {1}{1-x}-\frac {2}{(1+x)^2} \]

[Out]

1/(1-x)-2/(1+x)^2

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.042, Rules used = {1634} \[ \int \frac {5-5 x+7 x^2+x^3}{(-1+x)^2 (1+x)^3} \, dx=\frac {1}{1-x}-\frac {2}{(x+1)^2} \]

[In]

Int[(5 - 5*x + 7*x^2 + x^3)/((-1 + x)^2*(1 + x)^3),x]

[Out]

(1 - x)^(-1) - 2/(1 + x)^2

Rule 1634

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)
^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2]) &&
GtQ[Expon[Px, x], 2]

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

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.00 \[ \int \frac {5-5 x+7 x^2+x^3}{(-1+x)^2 (1+x)^3} \, dx=-\frac {1}{-1+x}-\frac {2}{(1+x)^2} \]

[In]

Integrate[(5 - 5*x + 7*x^2 + x^3)/((-1 + x)^2*(1 + x)^3),x]

[Out]

-(-1 + x)^(-1) - 2/(1 + x)^2

Maple [A] (verified)

Time = 0.78 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.07

method result size
default \(-\frac {1}{x -1}-\frac {2}{\left (x +1\right )^{2}}\) \(16\)
gosper \(-\frac {x^{2}+4 x -1}{\left (x -1\right ) \left (x +1\right )^{2}}\) \(21\)
norman \(\frac {-x^{2}-4 x +1}{\left (x -1\right ) \left (x +1\right )^{2}}\) \(22\)
risch \(\frac {-x^{2}-4 x +1}{\left (x -1\right ) \left (x +1\right )^{2}}\) \(22\)
parallelrisch \(\frac {-x^{2}-4 x +1}{\left (x -1\right ) \left (x +1\right )^{2}}\) \(22\)

[In]

int((x^3+7*x^2-5*x+5)/(x-1)^2/(x+1)^3,x,method=_RETURNVERBOSE)

[Out]

-1/(x-1)-2/(x+1)^2

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.53 \[ \int \frac {5-5 x+7 x^2+x^3}{(-1+x)^2 (1+x)^3} \, dx=-\frac {x^{2} + 4 \, x - 1}{x^{3} + x^{2} - x - 1} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.13 \[ \int \frac {5-5 x+7 x^2+x^3}{(-1+x)^2 (1+x)^3} \, dx=\frac {- x^{2} - 4 x + 1}{x^{3} + x^{2} - x - 1} \]

[In]

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

[Out]

(-x**2 - 4*x + 1)/(x**3 + x**2 - x - 1)

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.53 \[ \int \frac {5-5 x+7 x^2+x^3}{(-1+x)^2 (1+x)^3} \, dx=-\frac {x^{2} + 4 \, x - 1}{x^{3} + x^{2} - x - 1} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

-1/(x - 1) + 1/2*(4/(x - 1) + 1)/(2/(x - 1) + 1)^2

Mupad [B] (verification not implemented)

Time = 9.22 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.00 \[ \int \frac {5-5 x+7 x^2+x^3}{(-1+x)^2 (1+x)^3} \, dx=-\frac {1}{x-1}-\frac {2}{{\left (x+1\right )}^2} \]

[In]

int((7*x^2 - 5*x + x^3 + 5)/((x - 1)^2*(x + 1)^3),x)

[Out]

- 1/(x - 1) - 2/(x + 1)^2