\(\int (1-4 x^3+e^{4 x} (-18 x^2-48 x^3-54 x^4-24 x^5)+e^{8 x} (-18 x-126 x^2-252 x^3-306 x^4-198 x^5-72 x^6)) \, dx\) [1489]

   Optimal result
   Rubi [B] (verified)
   Mathematica [B] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 69, antiderivative size = 25 \[ \int \left (1-4 x^3+e^{4 x} \left (-18 x^2-48 x^3-54 x^4-24 x^5\right )+e^{8 x} \left (-18 x-126 x^2-252 x^3-306 x^4-198 x^5-72 x^6\right )\right ) \, dx=3+x-x^2 \left (x+3 e^{4 x} \left (1+x+x^2\right )\right )^2 \]

[Out]

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(87\) vs. \(2(25)=50\).

Time = 0.29 (sec) , antiderivative size = 87, normalized size of antiderivative = 3.48, number of steps used = 50, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.043, Rules used = {2227, 2207, 2225} \[ \int \left (1-4 x^3+e^{4 x} \left (-18 x^2-48 x^3-54 x^4-24 x^5\right )+e^{8 x} \left (-18 x-126 x^2-252 x^3-306 x^4-198 x^5-72 x^6\right )\right ) \, dx=-9 e^{8 x} x^6-6 e^{4 x} x^5-18 e^{8 x} x^5-6 e^{4 x} x^4-27 e^{8 x} x^4-x^4-6 e^{4 x} x^3-18 e^{8 x} x^3-9 e^{8 x} x^2+x \]

[In]

Int[1 - 4*x^3 + E^(4*x)*(-18*x^2 - 48*x^3 - 54*x^4 - 24*x^5) + E^(8*x)*(-18*x - 126*x^2 - 252*x^3 - 306*x^4 -
198*x^5 - 72*x^6),x]

[Out]

x - 9*E^(8*x)*x^2 - 6*E^(4*x)*x^3 - 18*E^(8*x)*x^3 - x^4 - 6*E^(4*x)*x^4 - 27*E^(8*x)*x^4 - 6*E^(4*x)*x^5 - 18
*E^(8*x)*x^5 - 9*E^(8*x)*x^6

Rule 2207

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] &&  !TrueQ[$UseGamma]

Rule 2225

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 2227

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] &&  !TrueQ[$UseGamma]

Rubi steps \begin{align*} \text {integral}& = x-x^4+\int e^{4 x} \left (-18 x^2-48 x^3-54 x^4-24 x^5\right ) \, dx+\int e^{8 x} \left (-18 x-126 x^2-252 x^3-306 x^4-198 x^5-72 x^6\right ) \, dx \\ & = x-x^4+\int \left (-18 e^{4 x} x^2-48 e^{4 x} x^3-54 e^{4 x} x^4-24 e^{4 x} x^5\right ) \, dx+\int \left (-18 e^{8 x} x-126 e^{8 x} x^2-252 e^{8 x} x^3-306 e^{8 x} x^4-198 e^{8 x} x^5-72 e^{8 x} x^6\right ) \, dx \\ & = x-x^4-18 \int e^{8 x} x \, dx-18 \int e^{4 x} x^2 \, dx-24 \int e^{4 x} x^5 \, dx-48 \int e^{4 x} x^3 \, dx-54 \int e^{4 x} x^4 \, dx-72 \int e^{8 x} x^6 \, dx-126 \int e^{8 x} x^2 \, dx-198 \int e^{8 x} x^5 \, dx-252 \int e^{8 x} x^3 \, dx-306 \int e^{8 x} x^4 \, dx \\ & = x-\frac {9}{4} e^{8 x} x-\frac {9}{2} e^{4 x} x^2-\frac {63}{4} e^{8 x} x^2-12 e^{4 x} x^3-\frac {63}{2} e^{8 x} x^3-x^4-\frac {27}{2} e^{4 x} x^4-\frac {153}{4} e^{8 x} x^4-6 e^{4 x} x^5-\frac {99}{4} e^{8 x} x^5-9 e^{8 x} x^6+\frac {9}{4} \int e^{8 x} \, dx+9 \int e^{4 x} x \, dx+30 \int e^{4 x} x^4 \, dx+\frac {63}{2} \int e^{8 x} x \, dx+36 \int e^{4 x} x^2 \, dx+54 \int e^{4 x} x^3 \, dx+54 \int e^{8 x} x^5 \, dx+\frac {189}{2} \int e^{8 x} x^2 \, dx+\frac {495}{4} \int e^{8 x} x^4 \, dx+153 \int e^{8 x} x^3 \, dx \\ & = \frac {9 e^{8 x}}{32}+x+\frac {9}{4} e^{4 x} x+\frac {27}{16} e^{8 x} x+\frac {9}{2} e^{4 x} x^2-\frac {63}{16} e^{8 x} x^2+\frac {3}{2} e^{4 x} x^3-\frac {99}{8} e^{8 x} x^3-x^4-6 e^{4 x} x^4-\frac {729}{32} e^{8 x} x^4-6 e^{4 x} x^5-18 e^{8 x} x^5-9 e^{8 x} x^6-\frac {9}{4} \int e^{4 x} \, dx-\frac {63}{16} \int e^{8 x} \, dx-18 \int e^{4 x} x \, dx-\frac {189}{8} \int e^{8 x} x \, dx-30 \int e^{4 x} x^3 \, dx-\frac {135}{4} \int e^{8 x} x^4 \, dx-\frac {81}{2} \int e^{4 x} x^2 \, dx-\frac {459}{8} \int e^{8 x} x^2 \, dx-\frac {495}{8} \int e^{8 x} x^3 \, dx \\ & = -\frac {9 e^{4 x}}{16}-\frac {27 e^{8 x}}{128}+x-\frac {9}{4} e^{4 x} x-\frac {81}{64} e^{8 x} x-\frac {45}{8} e^{4 x} x^2-\frac {711}{64} e^{8 x} x^2-6 e^{4 x} x^3-\frac {1287}{64} e^{8 x} x^3-x^4-6 e^{4 x} x^4-27 e^{8 x} x^4-6 e^{4 x} x^5-18 e^{8 x} x^5-9 e^{8 x} x^6+\frac {189}{64} \int e^{8 x} \, dx+\frac {9}{2} \int e^{4 x} \, dx+\frac {459}{32} \int e^{8 x} x \, dx+\frac {135}{8} \int e^{8 x} x^3 \, dx+\frac {81}{4} \int e^{4 x} x \, dx+\frac {45}{2} \int e^{4 x} x^2 \, dx+\frac {1485}{64} \int e^{8 x} x^2 \, dx \\ & = \frac {9 e^{4 x}}{16}+\frac {81 e^{8 x}}{512}+x+\frac {45}{16} e^{4 x} x+\frac {135}{256} e^{8 x} x-\frac {4203}{512} e^{8 x} x^2-6 e^{4 x} x^3-18 e^{8 x} x^3-x^4-6 e^{4 x} x^4-27 e^{8 x} x^4-6 e^{4 x} x^5-18 e^{8 x} x^5-9 e^{8 x} x^6-\frac {459}{256} \int e^{8 x} \, dx-\frac {81}{16} \int e^{4 x} \, dx-\frac {1485}{256} \int e^{8 x} x \, dx-\frac {405}{64} \int e^{8 x} x^2 \, dx-\frac {45}{4} \int e^{4 x} x \, dx \\ & = -\frac {45 e^{4 x}}{64}-\frac {135 e^{8 x}}{2048}+x-\frac {405 e^{8 x} x}{2048}-9 e^{8 x} x^2-6 e^{4 x} x^3-18 e^{8 x} x^3-x^4-6 e^{4 x} x^4-27 e^{8 x} x^4-6 e^{4 x} x^5-18 e^{8 x} x^5-9 e^{8 x} x^6+\frac {1485 \int e^{8 x} \, dx}{2048}+\frac {405}{256} \int e^{8 x} x \, dx+\frac {45}{16} \int e^{4 x} \, dx \\ & = \frac {405 e^{8 x}}{16384}+x-9 e^{8 x} x^2-6 e^{4 x} x^3-18 e^{8 x} x^3-x^4-6 e^{4 x} x^4-27 e^{8 x} x^4-6 e^{4 x} x^5-18 e^{8 x} x^5-9 e^{8 x} x^6-\frac {405 \int e^{8 x} \, dx}{2048} \\ & = x-9 e^{8 x} x^2-6 e^{4 x} x^3-18 e^{8 x} x^3-x^4-6 e^{4 x} x^4-27 e^{8 x} x^4-6 e^{4 x} x^5-18 e^{8 x} x^5-9 e^{8 x} x^6 \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(59\) vs. \(2(25)=50\).

Time = 0.66 (sec) , antiderivative size = 59, normalized size of antiderivative = 2.36 \[ \int \left (1-4 x^3+e^{4 x} \left (-18 x^2-48 x^3-54 x^4-24 x^5\right )+e^{8 x} \left (-18 x-126 x^2-252 x^3-306 x^4-198 x^5-72 x^6\right )\right ) \, dx=x-x^4-6 e^{4 x} \left (x^3+x^4+x^5\right )-18 e^{8 x} \left (\frac {x^2}{2}+x^3+\frac {3 x^4}{2}+x^5+\frac {x^6}{2}\right ) \]

[In]

Integrate[1 - 4*x^3 + E^(4*x)*(-18*x^2 - 48*x^3 - 54*x^4 - 24*x^5) + E^(8*x)*(-18*x - 126*x^2 - 252*x^3 - 306*
x^4 - 198*x^5 - 72*x^6),x]

[Out]

x - x^4 - 6*E^(4*x)*(x^3 + x^4 + x^5) - 18*E^(8*x)*(x^2/2 + x^3 + (3*x^4)/2 + x^5 + x^6/2)

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(59\) vs. \(2(26)=52\).

Time = 0.10 (sec) , antiderivative size = 60, normalized size of antiderivative = 2.40

method result size
risch \(\left (-9 x^{6}-18 x^{5}-27 x^{4}-18 x^{3}-9 x^{2}\right ) {\mathrm e}^{8 x}+\left (-6 x^{5}-6 x^{4}-6 x^{3}\right ) {\mathrm e}^{4 x}-x^{4}+x\) \(60\)
derivativedivides \(-9 \,{\mathrm e}^{8 x} x^{6}-18 \,{\mathrm e}^{8 x} x^{5}-6 x^{5} {\mathrm e}^{4 x}-27 \,{\mathrm e}^{8 x} x^{4}-6 x^{4} {\mathrm e}^{4 x}-18 \,{\mathrm e}^{8 x} x^{3}-6 x^{3} {\mathrm e}^{4 x}-x^{4}-9 \,{\mathrm e}^{8 x} x^{2}+x\) \(96\)
default \(-9 \,{\mathrm e}^{8 x} x^{6}-18 \,{\mathrm e}^{8 x} x^{5}-6 x^{5} {\mathrm e}^{4 x}-27 \,{\mathrm e}^{8 x} x^{4}-6 x^{4} {\mathrm e}^{4 x}-18 \,{\mathrm e}^{8 x} x^{3}-6 x^{3} {\mathrm e}^{4 x}-x^{4}-9 \,{\mathrm e}^{8 x} x^{2}+x\) \(96\)
parallelrisch \(-9 \,{\mathrm e}^{8 x} x^{6}-18 \,{\mathrm e}^{8 x} x^{5}-6 x^{5} {\mathrm e}^{4 x}-27 \,{\mathrm e}^{8 x} x^{4}-6 x^{4} {\mathrm e}^{4 x}-18 \,{\mathrm e}^{8 x} x^{3}-6 x^{3} {\mathrm e}^{4 x}-x^{4}-9 \,{\mathrm e}^{8 x} x^{2}+x\) \(96\)
parts \(-9 \,{\mathrm e}^{8 x} x^{6}-18 \,{\mathrm e}^{8 x} x^{5}-6 x^{5} {\mathrm e}^{4 x}-27 \,{\mathrm e}^{8 x} x^{4}-6 x^{4} {\mathrm e}^{4 x}-18 \,{\mathrm e}^{8 x} x^{3}-6 x^{3} {\mathrm e}^{4 x}-x^{4}-9 \,{\mathrm e}^{8 x} x^{2}+x\) \(96\)

[In]

int((-72*x^6-198*x^5-306*x^4-252*x^3-126*x^2-18*x)*exp(2*x)^4+(-24*x^5-54*x^4-48*x^3-18*x^2)*exp(2*x)^2-4*x^3+
1,x,method=_RETURNVERBOSE)

[Out]

(-9*x^6-18*x^5-27*x^4-18*x^3-9*x^2)*exp(8*x)+(-6*x^5-6*x^4-6*x^3)*exp(4*x)-x^4+x

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 51 vs. \(2 (24) = 48\).

Time = 0.26 (sec) , antiderivative size = 51, normalized size of antiderivative = 2.04 \[ \int \left (1-4 x^3+e^{4 x} \left (-18 x^2-48 x^3-54 x^4-24 x^5\right )+e^{8 x} \left (-18 x-126 x^2-252 x^3-306 x^4-198 x^5-72 x^6\right )\right ) \, dx=-x^{4} - 9 \, {\left (x^{6} + 2 \, x^{5} + 3 \, x^{4} + 2 \, x^{3} + x^{2}\right )} e^{\left (8 \, x\right )} - 6 \, {\left (x^{5} + x^{4} + x^{3}\right )} e^{\left (4 \, x\right )} + x \]

[In]

integrate((-72*x^6-198*x^5-306*x^4-252*x^3-126*x^2-18*x)*exp(2*x)^4+(-24*x^5-54*x^4-48*x^3-18*x^2)*exp(2*x)^2-
4*x^3+1,x, algorithm="fricas")

[Out]

-x^4 - 9*(x^6 + 2*x^5 + 3*x^4 + 2*x^3 + x^2)*e^(8*x) - 6*(x^5 + x^4 + x^3)*e^(4*x) + x

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 58 vs. \(2 (22) = 44\).

Time = 0.06 (sec) , antiderivative size = 58, normalized size of antiderivative = 2.32 \[ \int \left (1-4 x^3+e^{4 x} \left (-18 x^2-48 x^3-54 x^4-24 x^5\right )+e^{8 x} \left (-18 x-126 x^2-252 x^3-306 x^4-198 x^5-72 x^6\right )\right ) \, dx=- x^{4} + x + \left (- 6 x^{5} - 6 x^{4} - 6 x^{3}\right ) e^{4 x} + \left (- 9 x^{6} - 18 x^{5} - 27 x^{4} - 18 x^{3} - 9 x^{2}\right ) e^{8 x} \]

[In]

integrate((-72*x**6-198*x**5-306*x**4-252*x**3-126*x**2-18*x)*exp(2*x)**4+(-24*x**5-54*x**4-48*x**3-18*x**2)*e
xp(2*x)**2-4*x**3+1,x)

[Out]

-x**4 + x + (-6*x**5 - 6*x**4 - 6*x**3)*exp(4*x) + (-9*x**6 - 18*x**5 - 27*x**4 - 18*x**3 - 9*x**2)*exp(8*x)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 51 vs. \(2 (24) = 48\).

Time = 0.18 (sec) , antiderivative size = 51, normalized size of antiderivative = 2.04 \[ \int \left (1-4 x^3+e^{4 x} \left (-18 x^2-48 x^3-54 x^4-24 x^5\right )+e^{8 x} \left (-18 x-126 x^2-252 x^3-306 x^4-198 x^5-72 x^6\right )\right ) \, dx=-x^{4} - 9 \, {\left (x^{6} + 2 \, x^{5} + 3 \, x^{4} + 2 \, x^{3} + x^{2}\right )} e^{\left (8 \, x\right )} - 6 \, {\left (x^{5} + x^{4} + x^{3}\right )} e^{\left (4 \, x\right )} + x \]

[In]

integrate((-72*x^6-198*x^5-306*x^4-252*x^3-126*x^2-18*x)*exp(2*x)^4+(-24*x^5-54*x^4-48*x^3-18*x^2)*exp(2*x)^2-
4*x^3+1,x, algorithm="maxima")

[Out]

-x^4 - 9*(x^6 + 2*x^5 + 3*x^4 + 2*x^3 + x^2)*e^(8*x) - 6*(x^5 + x^4 + x^3)*e^(4*x) + x

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 51 vs. \(2 (24) = 48\).

Time = 0.27 (sec) , antiderivative size = 51, normalized size of antiderivative = 2.04 \[ \int \left (1-4 x^3+e^{4 x} \left (-18 x^2-48 x^3-54 x^4-24 x^5\right )+e^{8 x} \left (-18 x-126 x^2-252 x^3-306 x^4-198 x^5-72 x^6\right )\right ) \, dx=-x^{4} - 9 \, {\left (x^{6} + 2 \, x^{5} + 3 \, x^{4} + 2 \, x^{3} + x^{2}\right )} e^{\left (8 \, x\right )} - 6 \, {\left (x^{5} + x^{4} + x^{3}\right )} e^{\left (4 \, x\right )} + x \]

[In]

integrate((-72*x^6-198*x^5-306*x^4-252*x^3-126*x^2-18*x)*exp(2*x)^4+(-24*x^5-54*x^4-48*x^3-18*x^2)*exp(2*x)^2-
4*x^3+1,x, algorithm="giac")

[Out]

-x^4 - 9*(x^6 + 2*x^5 + 3*x^4 + 2*x^3 + x^2)*e^(8*x) - 6*(x^5 + x^4 + x^3)*e^(4*x) + x

Mupad [B] (verification not implemented)

Time = 9.25 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.84 \[ \int \left (1-4 x^3+e^{4 x} \left (-18 x^2-48 x^3-54 x^4-24 x^5\right )+e^{8 x} \left (-18 x-126 x^2-252 x^3-306 x^4-198 x^5-72 x^6\right )\right ) \, dx=-x\,\left (x^2+x+1\right )\,\left (x+9\,x\,{\mathrm {e}}^{8\,x}+6\,x^2\,{\mathrm {e}}^{4\,x}+9\,x^2\,{\mathrm {e}}^{8\,x}+9\,x^3\,{\mathrm {e}}^{8\,x}-1\right ) \]

[In]

int(1 - 4*x^3 - exp(8*x)*(18*x + 126*x^2 + 252*x^3 + 306*x^4 + 198*x^5 + 72*x^6) - exp(4*x)*(18*x^2 + 48*x^3 +
 54*x^4 + 24*x^5),x)

[Out]

-x*(x + x^2 + 1)*(x + 9*x*exp(8*x) + 6*x^2*exp(4*x) + 9*x^2*exp(8*x) + 9*x^3*exp(8*x) - 1)