\(\int \frac {12 x-3 x^2+e (-64+64 x-16 x^2)}{e (4-4 x+x^2)} \, dx\) [8934]

   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 = 20 \[ \int \frac {12 x-3 x^2+e \left (-64+64 x-16 x^2\right )}{e \left (4-4 x+x^2\right )} \, dx=x \left (-16-\frac {8}{x}-\frac {3 x}{e (-2+x)}\right ) \]

[Out]

(-16-8/x-3*x/(-2+x)/exp(1))*x

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.20, 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 {12 x-3 x^2+e \left (-64+64 x-16 x^2\right )}{e \left (4-4 x+x^2\right )} \, dx=\frac {12}{e (2-x)}-\frac {(3+16 e) x}{e} \]

[In]

Int[(12*x - 3*x^2 + E*(-64 + 64*x - 16*x^2))/(E*(4 - 4*x + x^2)),x]

[Out]

12/(E*(2 - x)) - ((3 + 16*E)*x)/E

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 {12 x-3 x^2+e \left (-64+64 x-16 x^2\right )}{4-4 x+x^2} \, dx}{e} \\ & = \frac {\int \frac {12 x-3 x^2+e \left (-64+64 x-16 x^2\right )}{(-2+x)^2} \, dx}{e} \\ & = \frac {\int \left (-3-16 e+\frac {12}{(-2+x)^2}\right ) \, dx}{e} \\ & = \frac {12}{e (2-x)}-\frac {(3+16 e) x}{e} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00 \[ \int \frac {12 x-3 x^2+e \left (-64+64 x-16 x^2\right )}{e \left (4-4 x+x^2\right )} \, dx=-\frac {12}{e (-2+x)}-16 x-\frac {3 x}{e} \]

[In]

Integrate[(12*x - 3*x^2 + E*(-64 + 64*x - 16*x^2))/(E*(4 - 4*x + x^2)),x]

[Out]

-12/(E*(-2 + x)) - 16*x - (3*x)/E

Maple [A] (verified)

Time = 0.63 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.10

method result size
default \({\mathrm e}^{-1} \left (-16 x \,{\mathrm e}-3 x -\frac {12}{-2+x}\right )\) \(22\)
risch \(-16 \,{\mathrm e}^{-1} x \,{\mathrm e}-3 \,{\mathrm e}^{-1} x -\frac {12 \,{\mathrm e}^{-1}}{-2+x}\) \(23\)
norman \(\frac {-{\mathrm e}^{-1} \left (16 \,{\mathrm e}+3\right ) x^{2}+64}{-2+x}\) \(24\)
gosper \(-\frac {\left (16 x^{2} {\mathrm e}+3 x^{2}-64 \,{\mathrm e}\right ) {\mathrm e}^{-1}}{-2+x}\) \(29\)
parallelrisch \(-\frac {\left (16 x^{2} {\mathrm e}+3 x^{2}-64 \,{\mathrm e}\right ) {\mathrm e}^{-1}}{-2+x}\) \(29\)
meijerg \(-8 \left (-4 \,{\mathrm e}-\frac {3}{4}\right ) {\mathrm e}^{-1} \left (-\frac {x \left (-\frac {3 x}{2}+6\right )}{6 \left (1-\frac {x}{2}\right )}-2 \ln \left (1-\frac {x}{2}\right )\right )+4 \,{\mathrm e}^{-1} \left (16 \,{\mathrm e}+3\right ) \left (\frac {x}{2-x}+\ln \left (1-\frac {x}{2}\right )\right )-\frac {16 x}{1-\frac {x}{2}}\) \(73\)

[In]

int(((-16*x^2+64*x-64)*exp(1)-3*x^2+12*x)/(x^2-4*x+4)/exp(1),x,method=_RETURNVERBOSE)

[Out]

1/exp(1)*(-16*x*exp(1)-3*x-12/(-2+x))

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.50 \[ \int \frac {12 x-3 x^2+e \left (-64+64 x-16 x^2\right )}{e \left (4-4 x+x^2\right )} \, dx=-\frac {{\left (3 \, x^{2} + 16 \, {\left (x^{2} - 2 \, x\right )} e - 6 \, x + 12\right )} e^{\left (-1\right )}}{x - 2} \]

[In]

integrate(((-16*x^2+64*x-64)*exp(1)-3*x^2+12*x)/(x^2-4*x+4)/exp(1),x, algorithm="fricas")

[Out]

-(3*x^2 + 16*(x^2 - 2*x)*e - 6*x + 12)*e^(-1)/(x - 2)

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00 \[ \int \frac {12 x-3 x^2+e \left (-64+64 x-16 x^2\right )}{e \left (4-4 x+x^2\right )} \, dx=- x \left (\frac {3}{e} + 16\right ) - \frac {12}{e x - 2 e} \]

[In]

integrate(((-16*x**2+64*x-64)*exp(1)-3*x**2+12*x)/(x**2-4*x+4)/exp(1),x)

[Out]

-x*(3*exp(-1) + 16) - 12/(E*x - 2*E)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00 \[ \int \frac {12 x-3 x^2+e \left (-64+64 x-16 x^2\right )}{e \left (4-4 x+x^2\right )} \, dx=-{\left (x {\left (16 \, e + 3\right )} + \frac {12}{x - 2}\right )} e^{\left (-1\right )} \]

[In]

integrate(((-16*x^2+64*x-64)*exp(1)-3*x^2+12*x)/(x^2-4*x+4)/exp(1),x, algorithm="maxima")

[Out]

-(x*(16*e + 3) + 12/(x - 2))*e^(-1)

Giac [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00 \[ \int \frac {12 x-3 x^2+e \left (-64+64 x-16 x^2\right )}{e \left (4-4 x+x^2\right )} \, dx=-{\left (16 \, x e + 3 \, x + \frac {12}{x - 2}\right )} e^{\left (-1\right )} \]

[In]

integrate(((-16*x^2+64*x-64)*exp(1)-3*x^2+12*x)/(x^2-4*x+4)/exp(1),x, algorithm="giac")

[Out]

-(16*x*e + 3*x + 12/(x - 2))*e^(-1)

Mupad [B] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.30 \[ \int \frac {12 x-3 x^2+e \left (-64+64 x-16 x^2\right )}{e \left (4-4 x+x^2\right )} \, dx=\frac {12}{2\,\mathrm {e}-x\,\mathrm {e}}-x\,{\mathrm {e}}^{-1}\,\left (16\,\mathrm {e}+3\right ) \]

[In]

int(-(exp(-1)*(exp(1)*(16*x^2 - 64*x + 64) - 12*x + 3*x^2))/(x^2 - 4*x + 4),x)

[Out]

12/(2*exp(1) - x*exp(1)) - x*exp(-1)*(16*exp(1) + 3)