\(\int \frac {e^5+e^{\frac {3+x}{e}} (-e-x)+e (2-4 x+4 x^3)}{e} \, dx\) [2685]

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

Optimal result

Integrand size = 37, antiderivative size = 26 \[ \int \frac {e^5+e^{\frac {3+x}{e}} (-e-x)+e \left (2-4 x+4 x^3\right )}{e} \, dx=2+x \left (2+e^4-e^{\frac {3+x}{e}}-2 x+x^3\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.62, number of steps used = 5, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.081, Rules used = {12, 2207, 2225} \[ \int \frac {e^5+e^{\frac {3+x}{e}} (-e-x)+e \left (2-4 x+4 x^3\right )}{e} \, dx=x^4-2 x^2+e^4 x+2 x+e^{\frac {x+3}{e}+1}-e^{\frac {x+3}{e}} (x+e) \]

[In]

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

[Out]

E^(1 + (3 + x)/E) + 2*x + E^4*x - 2*x^2 + x^4 - E^((3 + x)/E)*(E + 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 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]

Rubi steps \begin{align*} \text {integral}& = \frac {\int \left (e^5+e^{\frac {3+x}{e}} (-e-x)+e \left (2-4 x+4 x^3\right )\right ) \, dx}{e} \\ & = e^4 x+\frac {\int e^{\frac {3+x}{e}} (-e-x) \, dx}{e}+\int \left (2-4 x+4 x^3\right ) \, dx \\ & = 2 x+e^4 x-2 x^2+x^4-e^{\frac {3+x}{e}} (e+x)+\int e^{\frac {3+x}{e}} \, dx \\ & = e^{1+\frac {3+x}{e}}+2 x+e^4 x-2 x^2+x^4-e^{\frac {3+x}{e}} (e+x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.09 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.92 \[ \int \frac {e^5+e^{\frac {3+x}{e}} (-e-x)+e \left (2-4 x+4 x^3\right )}{e} \, dx=x \left (2+e^4-e^{\frac {3+x}{e}}-2 x+x^3\right ) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.20 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.04

method result size
risch \(x \,{\mathrm e}^{4}+x^{4}-2 x^{2}+2 x -{\mathrm e}^{\left (3+x \right ) {\mathrm e}^{-1}} x\) \(27\)
norman \(x^{4}+\left (2+{\mathrm e}^{4}\right ) x -2 x^{2}-{\mathrm e}^{\left (3+x \right ) {\mathrm e}^{-1}} x\) \(28\)
parallelrisch \({\mathrm e}^{-1} \left (x^{4} {\mathrm e}-2 x^{2} {\mathrm e}-x \,{\mathrm e} \,{\mathrm e}^{\left (3+x \right ) {\mathrm e}^{-1}}+2 x \,{\mathrm e}+{\mathrm e} \,{\mathrm e}^{4} x \right )\) \(45\)
parts \(x^{4}-2 x^{2}+2 x -{\mathrm e} \,{\mathrm e}^{{\mathrm e}^{-1} x +3 \,{\mathrm e}^{-1}}-{\mathrm e} \left ({\mathrm e}^{{\mathrm e}^{-1} x +3 \,{\mathrm e}^{-1}} \left ({\mathrm e}^{-1} x +3 \,{\mathrm e}^{-1}\right )-{\mathrm e}^{{\mathrm e}^{-1} x +3 \,{\mathrm e}^{-1}}\right )+3 \,{\mathrm e}^{{\mathrm e}^{-1} x +3 \,{\mathrm e}^{-1}}+x \,{\mathrm e}^{4}\) \(100\)
default \({\mathrm e}^{-1} \left ({\mathrm e} \left (-{\mathrm e} \,{\mathrm e}^{{\mathrm e}^{-1} x +3 \,{\mathrm e}^{-1}}-{\mathrm e} \left ({\mathrm e}^{{\mathrm e}^{-1} x +3 \,{\mathrm e}^{-1}} \left ({\mathrm e}^{-1} x +3 \,{\mathrm e}^{-1}\right )-{\mathrm e}^{{\mathrm e}^{-1} x +3 \,{\mathrm e}^{-1}}\right )+3 \,{\mathrm e}^{{\mathrm e}^{-1} x +3 \,{\mathrm e}^{-1}}\right )+2 \,{\mathrm e} \left (\frac {1}{2} x^{4}-x^{2}+x \right )+{\mathrm e} \,{\mathrm e}^{4} x \right )\) \(116\)
derivativedivides \(-{\mathrm e} \,{\mathrm e}^{{\mathrm e}^{-1} x +3 \,{\mathrm e}^{-1}}-{\mathrm e} \left ({\mathrm e}^{{\mathrm e}^{-1} x +3 \,{\mathrm e}^{-1}} \left ({\mathrm e}^{-1} x +3 \,{\mathrm e}^{-1}\right )-{\mathrm e}^{{\mathrm e}^{-1} x +3 \,{\mathrm e}^{-1}}\right )+3 \,{\mathrm e}^{{\mathrm e}^{-1} x +3 \,{\mathrm e}^{-1}}+2 \,{\mathrm e} \left (\frac {{\mathrm e}^{3} \left ({\mathrm e}^{-1} x +3 \,{\mathrm e}^{-1}\right )^{4}}{2}-6 \,{\mathrm e}^{2} \left ({\mathrm e}^{-1} x +3 \,{\mathrm e}^{-1}\right )^{3}+26 \left ({\mathrm e}^{-1} x +3 \,{\mathrm e}^{-1}\right )^{2} {\mathrm e}-47 \,{\mathrm e}^{-1} x -141 \,{\mathrm e}^{-1}\right )+{\mathrm e} \,{\mathrm e}^{4} \left ({\mathrm e}^{-1} x +3 \,{\mathrm e}^{-1}\right )\) \(182\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00 \[ \int \frac {e^5+e^{\frac {3+x}{e}} (-e-x)+e \left (2-4 x+4 x^3\right )}{e} \, dx=x^{4} - 2 \, x^{2} + x e^{4} - x e^{\left ({\left (x + 3\right )} e^{\left (-1\right )}\right )} + 2 \, x \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.92 \[ \int \frac {e^5+e^{\frac {3+x}{e}} (-e-x)+e \left (2-4 x+4 x^3\right )}{e} \, dx=x^{4} - 2 x^{2} - x e^{\frac {x + 3}{e}} + x \left (2 + e^{4}\right ) \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.42 \[ \int \frac {e^5+e^{\frac {3+x}{e}} (-e-x)+e \left (2-4 x+4 x^3\right )}{e} \, dx={\left (x e^{5} + {\left (x^{4} - 2 \, x^{2} + 2 \, x\right )} e - x e^{\left (x e^{\left (-1\right )} + 3 \, e^{\left (-1\right )} + 1\right )}\right )} e^{\left (-1\right )} \]

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 54 vs. \(2 (23) = 46\).

Time = 0.25 (sec) , antiderivative size = 54, normalized size of antiderivative = 2.08 \[ \int \frac {e^5+e^{\frac {3+x}{e}} (-e-x)+e \left (2-4 x+4 x^3\right )}{e} \, dx={\left (x e^{5} + {\left (x^{4} - 2 \, x^{2} + 2 \, x\right )} e - {\left (x e - e^{2}\right )} e^{\left ({\left (x + 3\right )} e^{\left (-1\right )}\right )} - e^{\left ({\left (x + e + 3\right )} e^{\left (-1\right )} + 1\right )}\right )} e^{\left (-1\right )} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.12 \[ \int \frac {e^5+e^{\frac {3+x}{e}} (-e-x)+e \left (2-4 x+4 x^3\right )}{e} \, dx=2\,x+x\,{\mathrm {e}}^4-2\,x^2+x^4-x\,{\mathrm {e}}^{3\,{\mathrm {e}}^{-1}}\,{\mathrm {e}}^{x\,{\mathrm {e}}^{-1}} \]

[In]

int(exp(-1)*(exp(5) + exp(1)*(4*x^3 - 4*x + 2) - exp(exp(-1)*(x + 3))*(x + exp(1))),x)

[Out]

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