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

   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 = 30, antiderivative size = 29 \[ \int \frac {-12 x^2-8 x^3+e^4 (8+4 x)}{2 x+x^2} \, dx=4 \left (x-x^2+e^4 (-3+\log (x))-\log \left (\frac {1}{2} (2+x)^2\right )\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.76, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {1607, 1634} \[ \int \frac {-12 x^2-8 x^3+e^4 (8+4 x)}{2 x+x^2} \, dx=-4 x^2+4 x+4 e^4 \log (x)-8 \log (x+2) \]

[In]

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

[Out]

4*x - 4*x^2 + 4*E^4*Log[x] - 8*Log[2 + x]

Rule 1607

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

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

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.90 \[ \int \frac {-12 x^2-8 x^3+e^4 (8+4 x)}{2 x+x^2} \, dx=20 (2+x)-4 (2+x)^2+4 e^4 \log (x)-8 \log (2+x) \]

[In]

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

[Out]

20*(2 + x) - 4*(2 + x)^2 + 4*E^4*Log[x] - 8*Log[2 + x]

Maple [A] (verified)

Time = 0.30 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.76

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

[In]

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

[Out]

4*x-4*x^2+4*exp(4)*ln(x)-8*ln(2+x)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.72 \[ \int \frac {-12 x^2-8 x^3+e^4 (8+4 x)}{2 x+x^2} \, dx=-4 \, x^{2} + 4 \, e^{4} \log \left (x\right ) + 4 \, x - 8 \, \log \left (x + 2\right ) \]

[In]

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

[Out]

-4*x^2 + 4*e^4*log(x) + 4*x - 8*log(x + 2)

Sympy [A] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.17 \[ \int \frac {-12 x^2-8 x^3+e^4 (8+4 x)}{2 x+x^2} \, dx=- 4 x^{2} + 4 x + 4 e^{4} \log {\left (x \right )} - 8 \log {\left (x + \frac {8 + 4 e^{4}}{4 + 2 e^{4}} \right )} \]

[In]

integrate(((4*x+8)*exp(4)-8*x**3-12*x**2)/(x**2+2*x),x)

[Out]

-4*x**2 + 4*x + 4*exp(4)*log(x) - 8*log(x + (8 + 4*exp(4))/(4 + 2*exp(4)))

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.72 \[ \int \frac {-12 x^2-8 x^3+e^4 (8+4 x)}{2 x+x^2} \, dx=-4 \, x^{2} + 4 \, e^{4} \log \left (x\right ) + 4 \, x - 8 \, \log \left (x + 2\right ) \]

[In]

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

[Out]

-4*x^2 + 4*e^4*log(x) + 4*x - 8*log(x + 2)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.79 \[ \int \frac {-12 x^2-8 x^3+e^4 (8+4 x)}{2 x+x^2} \, dx=-4 \, x^{2} + 4 \, e^{4} \log \left ({\left | x \right |}\right ) + 4 \, x - 8 \, \log \left ({\left | x + 2 \right |}\right ) \]

[In]

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

[Out]

-4*x^2 + 4*e^4*log(abs(x)) + 4*x - 8*log(abs(x + 2))

Mupad [B] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.72 \[ \int \frac {-12 x^2-8 x^3+e^4 (8+4 x)}{2 x+x^2} \, dx=4\,x-8\,\ln \left (x+2\right )+4\,{\mathrm {e}}^4\,\ln \left (x\right )-4\,x^2 \]

[In]

int(-(12*x^2 + 8*x^3 - exp(4)*(4*x + 8))/(2*x + x^2),x)

[Out]

4*x - 8*log(x + 2) + 4*exp(4)*log(x) - 4*x^2