3.94.26 \(\int (2 x-6 x^2+4 x^3+e^x (8 x-8 x^2-4 x^3)+e^{3 x} (12 x^2+12 x^3)+e^{2 x} (8 x+14 x^2-4 x^3-4 x^4)+e^{4 x} (4 x^3+4 x^4)) \, dx\)

Optimal. Leaf size=22 \[ \left (-x+x^2-e^x x \left (2+e^x x\right )\right )^2 \]

________________________________________________________________________________________

Rubi [B]  time = 0.46, antiderivative size = 77, normalized size of antiderivative = 3.50, number of steps used = 51, number of rules used = 5, integrand size = 91, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.055, Rules used = {1594, 2196, 2176, 2194, 1593} \begin {gather*} -2 e^{2 x} x^4+e^{4 x} x^4+x^4-4 e^x x^3+2 e^{2 x} x^3+4 e^{3 x} x^3-2 x^3+4 e^x x^2+4 e^{2 x} x^2+x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 1594

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

Rule 2176

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^m
*(b*F^(g*(e + f*x)))^n)/(f*g*n*Log[F]), x] - Dist[(d*m)/(f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !$UseGamma === True

Rule 2194

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 2196

Int[(F_)^((c_.)*(v_))*(u_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), u, x], x] /; FreeQ[{F, c
}, x] && PolynomialQ[u, x] && LinearQ[v, x] &&  !$UseGamma === True

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=x^2-2 x^3+x^4+\int e^x \left (8 x-8 x^2-4 x^3\right ) \, dx+\int e^{3 x} \left (12 x^2+12 x^3\right ) \, dx+\int e^{2 x} \left (8 x+14 x^2-4 x^3-4 x^4\right ) \, dx+\int e^{4 x} \left (4 x^3+4 x^4\right ) \, dx\\ &=x^2-2 x^3+x^4+\int e^{4 x} x^3 (4+4 x) \, dx+\int e^{3 x} x^2 (12+12 x) \, dx+\int e^x x \left (8-8 x-4 x^2\right ) \, dx+\int \left (8 e^{2 x} x+14 e^{2 x} x^2-4 e^{2 x} x^3-4 e^{2 x} x^4\right ) \, dx\\ &=x^2-2 x^3+x^4-4 \int e^{2 x} x^3 \, dx-4 \int e^{2 x} x^4 \, dx+8 \int e^{2 x} x \, dx+14 \int e^{2 x} x^2 \, dx+\int \left (8 e^x x-8 e^x x^2-4 e^x x^3\right ) \, dx+\int \left (12 e^{3 x} x^2+12 e^{3 x} x^3\right ) \, dx+\int \left (4 e^{4 x} x^3+4 e^{4 x} x^4\right ) \, dx\\ &=4 e^{2 x} x+x^2+7 e^{2 x} x^2-2 x^3-2 e^{2 x} x^3+x^4-2 e^{2 x} x^4-4 \int e^{2 x} \, dx-4 \int e^x x^3 \, dx+4 \int e^{4 x} x^3 \, dx+4 \int e^{4 x} x^4 \, dx+6 \int e^{2 x} x^2 \, dx+8 \int e^x x \, dx-8 \int e^x x^2 \, dx+8 \int e^{2 x} x^3 \, dx+12 \int e^{3 x} x^2 \, dx+12 \int e^{3 x} x^3 \, dx-14 \int e^{2 x} x \, dx\\ &=-2 e^{2 x}+8 e^x x-3 e^{2 x} x+x^2-8 e^x x^2+10 e^{2 x} x^2+4 e^{3 x} x^2-2 x^3-4 e^x x^3+2 e^{2 x} x^3+4 e^{3 x} x^3+e^{4 x} x^3+x^4-2 e^{2 x} x^4+e^{4 x} x^4-3 \int e^{4 x} x^2 \, dx-4 \int e^{4 x} x^3 \, dx-6 \int e^{2 x} x \, dx+7 \int e^{2 x} \, dx-8 \int e^x \, dx-8 \int e^{3 x} x \, dx+12 \int e^x x^2 \, dx-12 \int e^{2 x} x^2 \, dx-12 \int e^{3 x} x^2 \, dx+16 \int e^x x \, dx\\ &=-8 e^x+\frac {3 e^{2 x}}{2}+24 e^x x-6 e^{2 x} x-\frac {8}{3} e^{3 x} x+x^2+4 e^x x^2+4 e^{2 x} x^2-\frac {3}{4} e^{4 x} x^2-2 x^3-4 e^x x^3+2 e^{2 x} x^3+4 e^{3 x} x^3+x^4-2 e^{2 x} x^4+e^{4 x} x^4+\frac {3}{2} \int e^{4 x} x \, dx+\frac {8}{3} \int e^{3 x} \, dx+3 \int e^{2 x} \, dx+3 \int e^{4 x} x^2 \, dx+8 \int e^{3 x} x \, dx+12 \int e^{2 x} x \, dx-16 \int e^x \, dx-24 \int e^x x \, dx\\ &=-24 e^x+3 e^{2 x}+\frac {8 e^{3 x}}{9}+\frac {3}{8} e^{4 x} x+x^2+4 e^x x^2+4 e^{2 x} x^2-2 x^3-4 e^x x^3+2 e^{2 x} x^3+4 e^{3 x} x^3+x^4-2 e^{2 x} x^4+e^{4 x} x^4-\frac {3}{8} \int e^{4 x} \, dx-\frac {3}{2} \int e^{4 x} x \, dx-\frac {8}{3} \int e^{3 x} \, dx-6 \int e^{2 x} \, dx+24 \int e^x \, dx\\ &=-\frac {3 e^{4 x}}{32}+x^2+4 e^x x^2+4 e^{2 x} x^2-2 x^3-4 e^x x^3+2 e^{2 x} x^3+4 e^{3 x} x^3+x^4-2 e^{2 x} x^4+e^{4 x} x^4+\frac {3}{8} \int e^{4 x} \, dx\\ &=x^2+4 e^x x^2+4 e^{2 x} x^2-2 x^3-4 e^x x^3+2 e^{2 x} x^3+4 e^{3 x} x^3+x^4-2 e^{2 x} x^4+e^{4 x} x^4\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.13, size = 23, normalized size = 1.05 \begin {gather*} x^2 \left (1+2 e^x-x+e^{2 x} x\right )^2 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.57, size = 62, normalized size = 2.82 \begin {gather*} x^{4} e^{\left (4 \, x\right )} + x^{4} + 4 \, x^{3} e^{\left (3 \, x\right )} - 2 \, x^{3} + x^{2} - 2 \, {\left (x^{4} - x^{3} - 2 \, x^{2}\right )} e^{\left (2 \, x\right )} - 4 \, {\left (x^{3} - x^{2}\right )} e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.15, size = 62, normalized size = 2.82 \begin {gather*} x^{4} e^{\left (4 \, x\right )} + x^{4} + 4 \, x^{3} e^{\left (3 \, x\right )} - 2 \, x^{3} + x^{2} - 2 \, {\left (x^{4} - x^{3} - 2 \, x^{2}\right )} e^{\left (2 \, x\right )} - 4 \, {\left (x^{3} - x^{2}\right )} e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [B]  time = 0.05, size = 65, normalized size = 2.95




method result size



risch \(4 x^{3} {\mathrm e}^{3 x}+x^{4} {\mathrm e}^{4 x}+\left (-2 x^{4}+2 x^{3}+4 x^{2}\right ) {\mathrm e}^{2 x}+\left (-4 x^{3}+4 x^{2}\right ) {\mathrm e}^{x}+x^{4}-2 x^{3}+x^{2}\) \(65\)
default \(4 x^{3} {\mathrm e}^{3 x}+x^{4} {\mathrm e}^{4 x}+4 \,{\mathrm e}^{x} x^{2}-4 \,{\mathrm e}^{x} x^{3}+4 \,{\mathrm e}^{2 x} x^{2}+2 \,{\mathrm e}^{2 x} x^{3}-2 \,{\mathrm e}^{2 x} x^{4}+x^{2}-2 x^{3}+x^{4}\) \(71\)
norman \(4 x^{3} {\mathrm e}^{3 x}+x^{4} {\mathrm e}^{4 x}+4 \,{\mathrm e}^{x} x^{2}-4 \,{\mathrm e}^{x} x^{3}+4 \,{\mathrm e}^{2 x} x^{2}+2 \,{\mathrm e}^{2 x} x^{3}-2 \,{\mathrm e}^{2 x} x^{4}+x^{2}-2 x^{3}+x^{4}\) \(71\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4*x^3*exp(3*x)+x^4*exp(4*x)+(-2*x^4+2*x^3+4*x^2)*exp(2*x)+(-4*x^3+4*x^2)*exp(x)+x^4-2*x^3+x^2

________________________________________________________________________________________

maxima [B]  time = 0.40, size = 62, normalized size = 2.82 \begin {gather*} x^{4} e^{\left (4 \, x\right )} + x^{4} + 4 \, x^{3} e^{\left (3 \, x\right )} - 2 \, x^{3} + x^{2} - 2 \, {\left (x^{4} - x^{3} - 2 \, x^{2}\right )} e^{\left (2 \, x\right )} - 4 \, {\left (x^{3} - x^{2}\right )} e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 7.06, size = 21, normalized size = 0.95 \begin {gather*} x^2\,{\left (2\,{\mathrm {e}}^x-x+x\,{\mathrm {e}}^{2\,x}+1\right )}^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2*(2*exp(x) - x + x*exp(2*x) + 1)^2

________________________________________________________________________________________

sympy [B]  time = 0.19, size = 63, normalized size = 2.86 \begin {gather*} x^{4} e^{4 x} + x^{4} + 4 x^{3} e^{3 x} - 2 x^{3} + x^{2} + \left (- 4 x^{3} + 4 x^{2}\right ) e^{x} + \left (- 2 x^{4} + 2 x^{3} + 4 x^{2}\right ) e^{2 x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x**4*exp(4*x) + x**4 + 4*x**3*exp(3*x) - 2*x**3 + x**2 + (-4*x**3 + 4*x**2)*exp(x) + (-2*x**4 + 2*x**3 + 4*x**
2)*exp(2*x)

________________________________________________________________________________________