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

Optimal. Leaf size=29 \[ 4 \left (x-x^2+e^4 (-3+\log (x))-\log \left (\frac {1}{2} (2+x)^2\right )\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 22, normalized size of antiderivative = 0.76, number of steps used = 3, number of rules used = 2, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {1593, 1620} \begin {gather*} -4 x^2+4 x+4 e^4 \log (x)-8 \log (x+2) \end {gather*}

Antiderivative was successfully verified.

[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 1593

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 1620

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 {gather*} \begin {aligned} \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 {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 26, normalized size = 0.90 \begin {gather*} 20 (2+x)-4 (2+x)^2+4 e^4 \log (x)-8 \log (2+x) \end {gather*}

Antiderivative was successfully verified.

[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]

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 21, normalized size = 0.72 \begin {gather*} -4 \, x^{2} + 4 \, e^{4} \log \relax (x) + 4 \, x - 8 \, \log \left (x + 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________

giac [A]  time = 0.12, size = 23, normalized size = 0.79 \begin {gather*} -4 \, x^{2} + 4 \, e^{4} \log \left ({\left | x \right |}\right ) + 4 \, x - 8 \, \log \left ({\left | x + 2 \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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))

________________________________________________________________________________________

maple [A]  time = 0.14, size = 22, normalized size = 0.76




method result size



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



Verification of antiderivative is not currently implemented for this CAS.

[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-8*ln(2+x)+4*exp(4)*ln(x)

________________________________________________________________________________________

maxima [A]  time = 0.34, size = 21, normalized size = 0.72 \begin {gather*} -4 \, x^{2} + 4 \, e^{4} \log \relax (x) + 4 \, x - 8 \, \log \left (x + 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________

mupad [B]  time = 3.25, size = 21, normalized size = 0.72 \begin {gather*} 4\,x-8\,\ln \left (x+2\right )+4\,{\mathrm {e}}^4\,\ln \relax (x)-4\,x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

sympy [A]  time = 0.38, size = 34, normalized size = 1.17 \begin {gather*} - 4 x^{2} + 4 x + 4 e^{4} \log {\relax (x )} - 8 \log {\left (x + \frac {8 + 4 e^{4}}{4 + 2 e^{4}} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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)))

________________________________________________________________________________________