\(\int (4+e^{-16-4 e^{3 x}+4 x} (4-12 e^{3 x})+6 x) \, dx\) [9500]

   Optimal result
   Rubi [C] (verified)
   Mathematica [C] (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 = 29, antiderivative size = 30 \[ \int \left (4+e^{-16-4 e^{3 x}+4 x} \left (4-12 e^{3 x}\right )+6 x\right ) \, dx=e^{4 \left (-4-e^{3 x}+x\right )}+x+\frac {x+3 x \left (x+x^2\right )}{x} \]

[Out]

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

Rubi [C] (verified)

Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.

Time = 0.09 (sec) , antiderivative size = 81, normalized size of antiderivative = 2.70, number of steps used = 7, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {2320, 12, 2258, 2250} \[ \int \left (4+e^{-16-4 e^{3 x}+4 x} \left (4-12 e^{3 x}\right )+6 x\right ) \, dx=3 x^2+4 x-\frac {e^{4 x-16} \Gamma \left (\frac {4}{3},4 e^{3 x}\right )}{3\ 2^{2/3} \left (e^{3 x}\right )^{4/3}}+\frac {e^{7 x-16} \Gamma \left (\frac {7}{3},4 e^{3 x}\right )}{4\ 2^{2/3} \left (e^{3 x}\right )^{7/3}} \]

[In]

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

[Out]

4*x + 3*x^2 - (E^(-16 + 4*x)*Gamma[4/3, 4*E^(3*x)])/(3*2^(2/3)*(E^(3*x))^(4/3)) + (E^(-16 + 7*x)*Gamma[7/3, 4*
E^(3*x)])/(4*2^(2/3)*(E^(3*x))^(7/3))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2250

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Simp[(-F^a)*((e +
f*x)^(m + 1)/(f*n*((-b)*(c + d*x)^n*Log[F])^((m + 1)/n)))*Gamma[(m + 1)/n, (-b)*(c + d*x)^n*Log[F]], x] /; Fre
eQ[{F, a, b, c, d, e, f, m, n}, x] && EqQ[d*e - c*f, 0]

Rule 2258

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*(u_), x_Symbol] :> Int[ExpandLinearProduct[F^(a + b*(c + d*
x)^n), u, c, d, x], x] /; FreeQ[{F, a, b, c, d, n}, x] && PolynomialQ[u, x]

Rule 2320

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rubi steps \begin{align*} \text {integral}& = 4 x+3 x^2+\int e^{-16-4 e^{3 x}+4 x} \left (4-12 e^{3 x}\right ) \, dx \\ & = 4 x+3 x^2+\text {Subst}\left (\int 4 e^{-16-4 x^3} x^3 \left (1-3 x^3\right ) \, dx,x,e^x\right ) \\ & = 4 x+3 x^2+4 \text {Subst}\left (\int e^{-16-4 x^3} x^3 \left (1-3 x^3\right ) \, dx,x,e^x\right ) \\ & = 4 x+3 x^2+4 \text {Subst}\left (\int \left (e^{-16-4 x^3} x^3-3 e^{-16-4 x^3} x^6\right ) \, dx,x,e^x\right ) \\ & = 4 x+3 x^2+4 \text {Subst}\left (\int e^{-16-4 x^3} x^3 \, dx,x,e^x\right )-12 \text {Subst}\left (\int e^{-16-4 x^3} x^6 \, dx,x,e^x\right ) \\ & = 4 x+3 x^2-\frac {e^{-16+4 x} \Gamma \left (\frac {4}{3},4 e^{3 x}\right )}{3\ 2^{2/3} \left (e^{3 x}\right )^{4/3}}+\frac {e^{-16+7 x} \Gamma \left (\frac {7}{3},4 e^{3 x}\right )}{4\ 2^{2/3} \left (e^{3 x}\right )^{7/3}} \\ \end{align*}

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.

Time = 0.14 (sec) , antiderivative size = 81, normalized size of antiderivative = 2.70 \[ \int \left (4+e^{-16-4 e^{3 x}+4 x} \left (4-12 e^{3 x}\right )+6 x\right ) \, dx=4 x+3 x^2-\frac {e^{-16-2 x} \left (e^{3 x}\right )^{2/3} \Gamma \left (\frac {4}{3},4 e^{3 x}\right )}{3\ 2^{2/3}}+\frac {e^{-16-2 x} \left (e^{3 x}\right )^{2/3} \Gamma \left (\frac {7}{3},4 e^{3 x}\right )}{4\ 2^{2/3}} \]

[In]

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

[Out]

4*x + 3*x^2 - (E^(-16 - 2*x)*(E^(3*x))^(2/3)*Gamma[4/3, 4*E^(3*x)])/(3*2^(2/3)) + (E^(-16 - 2*x)*(E^(3*x))^(2/
3)*Gamma[7/3, 4*E^(3*x)])/(4*2^(2/3))

Maple [A] (verified)

Time = 0.19 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.73

method result size
default \(4 x +{\mathrm e}^{-4 \,{\mathrm e}^{3 x}+4 x -16}+3 x^{2}\) \(22\)
norman \(4 x +{\mathrm e}^{-4 \,{\mathrm e}^{3 x}+4 x -16}+3 x^{2}\) \(22\)
risch \(4 x +{\mathrm e}^{-4 \,{\mathrm e}^{3 x}+4 x -16}+3 x^{2}\) \(22\)
parallelrisch \(4 x +{\mathrm e}^{-4 \,{\mathrm e}^{3 x}+4 x -16}+3 x^{2}\) \(22\)

[In]

int((-12*exp(3*x)+4)*exp(-4*exp(3*x)+4*x-16)+6*x+4,x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.70 \[ \int \left (4+e^{-16-4 e^{3 x}+4 x} \left (4-12 e^{3 x}\right )+6 x\right ) \, dx=3 \, x^{2} + 4 \, x + e^{\left (4 \, x - 4 \, e^{\left (3 \, x\right )} - 16\right )} \]

[In]

integrate((-12*exp(3*x)+4)*exp(-4*exp(3*x)+4*x-16)+6*x+4,x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.67 \[ \int \left (4+e^{-16-4 e^{3 x}+4 x} \left (4-12 e^{3 x}\right )+6 x\right ) \, dx=3 x^{2} + 4 x + e^{4 x - 4 e^{3 x} - 16} \]

[In]

integrate((-12*exp(3*x)+4)*exp(-4*exp(3*x)+4*x-16)+6*x+4,x)

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

integrate((-12*exp(3*x)+4)*exp(-4*exp(3*x)+4*x-16)+6*x+4,x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.70 \[ \int \left (4+e^{-16-4 e^{3 x}+4 x} \left (4-12 e^{3 x}\right )+6 x\right ) \, dx=3 \, x^{2} + 4 \, x + e^{\left (4 \, x - 4 \, e^{\left (3 \, x\right )} - 16\right )} \]

[In]

integrate((-12*exp(3*x)+4)*exp(-4*exp(3*x)+4*x-16)+6*x+4,x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.77 \[ \int \left (4+e^{-16-4 e^{3 x}+4 x} \left (4-12 e^{3 x}\right )+6 x\right ) \, dx=4\,x+3\,x^2+{\mathrm {e}}^{-4\,{\mathrm {e}}^{3\,x}}\,{\mathrm {e}}^{4\,x}\,{\mathrm {e}}^{-16} \]

[In]

int(6*x - exp(4*x - 4*exp(3*x) - 16)*(12*exp(3*x) - 4) + 4,x)

[Out]

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