\(\int \frac {-20+e^2 (-16-56 x+31 x^2-4 x^3)}{e^2 (16-8 x+x^2)} \, dx\) [1264]

   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 = 35, antiderivative size = 24 \[ \int \frac {-20+e^2 \left (-16-56 x+31 x^2-4 x^3\right )}{e^2 \left (16-8 x+x^2\right )} \, dx=\left (-1+\frac {5}{e^2 (-4+x)}-\frac {27}{4 x}-2 x\right ) x \]

[Out]

x*(5/(x-4)/exp(2)-2*x-1-27/4/x)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.88, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.086, Rules used = {12, 27, 1864} \[ \int \frac {-20+e^2 \left (-16-56 x+31 x^2-4 x^3\right )}{e^2 \left (16-8 x+x^2\right )} \, dx=-2 x^2-x-\frac {20}{e^2 (4-x)} \]

[In]

Int[(-20 + E^2*(-16 - 56*x + 31*x^2 - 4*x^3))/(E^2*(16 - 8*x + x^2)),x]

[Out]

-20/(E^2*(4 - x)) - x - 2*x^2

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 1864

Int[(Pq_)*((a_) + (b_.)*(x_)^(n_.))^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x^n)^p, x], x] /; FreeQ[
{a, b, n}, x] && PolyQ[Pq, x] && (IGtQ[p, 0] || EqQ[n, 1])

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

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.79 \[ \int \frac {-20+e^2 \left (-16-56 x+31 x^2-4 x^3\right )}{e^2 \left (16-8 x+x^2\right )} \, dx=\frac {20}{e^2 (-4+x)}-x-2 x^2 \]

[In]

Integrate[(-20 + E^2*(-16 - 56*x + 31*x^2 - 4*x^3))/(E^2*(16 - 8*x + x^2)),x]

[Out]

20/(E^2*(-4 + x)) - x - 2*x^2

Maple [A] (verified)

Time = 0.20 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.79

method result size
risch \(-2 x^{2}-x +\frac {20 \,{\mathrm e}^{-2}}{x -4}\) \(19\)
default \({\mathrm e}^{-2} \left (-2 x^{2} {\mathrm e}^{2}-{\mathrm e}^{2} x +\frac {20}{x -4}\right )\) \(26\)
norman \(\frac {7 x^{2}-2 x^{3}+4 \left (4 \,{\mathrm e}^{2}+5\right ) {\mathrm e}^{-2}}{x -4}\) \(30\)
gosper \(-\frac {\left (2 x^{3} {\mathrm e}^{2}-7 x^{2} {\mathrm e}^{2}-20-16 \,{\mathrm e}^{2}\right ) {\mathrm e}^{-2}}{x -4}\) \(32\)
parallelrisch \(-\frac {\left (2 x^{3} {\mathrm e}^{2}-7 x^{2} {\mathrm e}^{2}-20-16 \,{\mathrm e}^{2}\right ) {\mathrm e}^{-2}}{x -4}\) \(32\)
meijerg \(-\frac {5 \,{\mathrm e}^{-2} x}{4 \left (-\frac {x}{4}+1\right )}-\frac {4 x \left (-\frac {1}{8} x^{2}-\frac {3}{2} x +12\right )}{-\frac {x}{4}+1}+\frac {31 x \left (-\frac {3 x}{4}+6\right )}{3 \left (-\frac {x}{4}+1\right )}-\frac {15 x}{-\frac {x}{4}+1}\) \(59\)

[In]

int(((-4*x^3+31*x^2-56*x-16)*exp(2)-20)/(x^2-8*x+16)/exp(2),x,method=_RETURNVERBOSE)

[Out]

-2*x^2-x+20/(x-4)*exp(-2)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.17 \[ \int \frac {-20+e^2 \left (-16-56 x+31 x^2-4 x^3\right )}{e^2 \left (16-8 x+x^2\right )} \, dx=-\frac {{\left ({\left (2 \, x^{3} - 7 \, x^{2} - 4 \, x\right )} e^{2} - 20\right )} e^{\left (-2\right )}}{x - 4} \]

[In]

integrate(((-4*x^3+31*x^2-56*x-16)*exp(2)-20)/(x^2-8*x+16)/exp(2),x, algorithm="fricas")

[Out]

-((2*x^3 - 7*x^2 - 4*x)*e^2 - 20)*e^(-2)/(x - 4)

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.71 \[ \int \frac {-20+e^2 \left (-16-56 x+31 x^2-4 x^3\right )}{e^2 \left (16-8 x+x^2\right )} \, dx=- 2 x^{2} - x + \frac {20}{x e^{2} - 4 e^{2}} \]

[In]

integrate(((-4*x**3+31*x**2-56*x-16)*exp(2)-20)/(x**2-8*x+16)/exp(2),x)

[Out]

-2*x**2 - x + 20/(x*exp(2) - 4*exp(2))

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.96 \[ \int \frac {-20+e^2 \left (-16-56 x+31 x^2-4 x^3\right )}{e^2 \left (16-8 x+x^2\right )} \, dx=-{\left (2 \, x^{2} e^{2} + x e^{2} - \frac {20}{x - 4}\right )} e^{\left (-2\right )} \]

[In]

integrate(((-4*x^3+31*x^2-56*x-16)*exp(2)-20)/(x^2-8*x+16)/exp(2),x, algorithm="maxima")

[Out]

-(2*x^2*e^2 + x*e^2 - 20/(x - 4))*e^(-2)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.96 \[ \int \frac {-20+e^2 \left (-16-56 x+31 x^2-4 x^3\right )}{e^2 \left (16-8 x+x^2\right )} \, dx=-{\left (2 \, x^{2} e^{2} + x e^{2} - \frac {20}{x - 4}\right )} e^{\left (-2\right )} \]

[In]

integrate(((-4*x^3+31*x^2-56*x-16)*exp(2)-20)/(x^2-8*x+16)/exp(2),x, algorithm="giac")

[Out]

-(2*x^2*e^2 + x*e^2 - 20/(x - 4))*e^(-2)

Mupad [B] (verification not implemented)

Time = 8.73 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.96 \[ \int \frac {-20+e^2 \left (-16-56 x+31 x^2-4 x^3\right )}{e^2 \left (16-8 x+x^2\right )} \, dx=-x-\frac {20}{4\,{\mathrm {e}}^2-x\,{\mathrm {e}}^2}-2\,x^2 \]

[In]

int(-(exp(-2)*(exp(2)*(56*x - 31*x^2 + 4*x^3 + 16) + 20))/(x^2 - 8*x + 16),x)

[Out]

- x - 20/(4*exp(2) - x*exp(2)) - 2*x^2