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

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

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 38, normalized size of antiderivative = 1.73, number of steps used = 4, number of rules used = 3, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {12, 27, 1850} \begin {gather*} -\frac {2 (2+e) x^2}{e}+\frac {4 (1+2 e) x}{e}+\frac {4 (1+2 e)}{e (x+1)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 1850

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

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 37, normalized size = 1.68 \begin {gather*} -\frac {4 \left (\frac {-1-2 e}{1+x}-3 (1+e) (1+x)+\frac {1}{2} (2+e) (1+x)^2\right )}{e} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.75, size = 35, normalized size = 1.59 \begin {gather*} -\frac {2 \, {\left (2 \, x^{3} + {\left (x^{3} - 3 \, x^{2} - 4 \, x - 4\right )} e - 2 \, x - 2\right )} e^{\left (-1\right )}}{x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.29, size = 37, normalized size = 1.68 \begin {gather*} -2 \, {\left (x^{2} e + 2 \, x^{2} - 4 \, x e - 2 \, x - \frac {2 \, {\left (2 \, e + 1\right )}}{x + 1}\right )} e^{\left (-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.17, size = 26, normalized size = 1.18




method result size



norman \(\frac {6 x^{2}-2 \left ({\mathrm e}+2\right ) {\mathrm e}^{-1} x^{3}}{x +1}\) \(26\)
gosper \(-\frac {2 x^{2} \left (x \,{\mathrm e}-3 \,{\mathrm e}+2 x \right ) {\mathrm e}^{-1}}{x +1}\) \(27\)
default \({\mathrm e}^{-1} \left (-2 x^{2} {\mathrm e}+8 x \,{\mathrm e}-4 x^{2}+4 x -\frac {4 \left (-2 \,{\mathrm e}-1\right )}{x +1}\right )\) \(40\)
risch \(-2 x^{2}+8 x -4 x^{2} {\mathrm e}^{-1}+4 \,{\mathrm e}^{-1} x +\frac {4 \,{\mathrm e}^{-1}}{x +1}+\frac {8 \,{\mathrm e}^{-1} {\mathrm e}}{x +1}\) \(42\)
meijerg \(-12 \,{\mathrm e}^{-1} \left (\frac {x \left (6+3 x \right )}{3 x +3}-2 \ln \left (x +1\right )\right )+\left (-4 \,{\mathrm e}-8\right ) {\mathrm e}^{-1} \left (-\frac {x \left (-2 x^{2}+6 x +12\right )}{4 \left (x +1\right )}+3 \ln \left (x +1\right )\right )-\frac {12 x}{x +1}+12 \ln \left (x +1\right )\) \(74\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.44, size = 35, normalized size = 1.59 \begin {gather*} -2 \, {\left (x^{2} {\left (e + 2\right )} - 2 \, x {\left (2 \, e + 1\right )} - \frac {2 \, {\left (2 \, e + 1\right )}}{x + 1}\right )} e^{\left (-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.55, size = 48, normalized size = 2.18 \begin {gather*} \frac {8\,\mathrm {e}+4}{\mathrm {e}+x\,\mathrm {e}}-x\,\left (12\,{\mathrm {e}}^{-1}-2\,{\mathrm {e}}^{-1}\,\left (4\,\mathrm {e}+8\right )\right )-\frac {x^2\,{\mathrm {e}}^{-1}\,\left (4\,\mathrm {e}+8\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(8*exp(1) + 4)/(exp(1) + x*exp(1)) - x*(12*exp(-1) - 2*exp(-1)*(4*exp(1) + 8)) - (x^2*exp(-1)*(4*exp(1) + 8))/
2

________________________________________________________________________________________

sympy [A]  time = 0.17, size = 37, normalized size = 1.68 \begin {gather*} - x^{2} \left (\frac {4}{e} + 2\right ) - x \left (-8 - \frac {4}{e}\right ) - \frac {- 8 e - 4}{e x + e} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x**2*(4*exp(-1) + 2) - x*(-8 - 4*exp(-1)) - (-8*E - 4)/(E*x + E)

________________________________________________________________________________________