\(\int e^x (-e^{-x}+e^x)^3 \, dx\) [723]

   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 [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

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

[Out]

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

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {2320, 272, 45} \[ \int e^x \left (-e^{-x}+e^x\right )^3 \, dx=3 x+\frac {e^{-2 x}}{2}-\frac {3 e^{2 x}}{2}+\frac {e^{4 x}}{4} \]

[In]

Int[E^x*(-E^(-x) + E^x)^3,x]

[Out]

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

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

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

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.97 \[ \int e^x \left (-e^{-x}+e^x\right )^3 \, dx=\frac {1}{4} e^{-2 x} \left (2-6 e^{4 x}+e^{6 x}\right )+3 \log \left (e^x\right ) \]

[In]

Integrate[E^x*(-E^(-x) + E^x)^3,x]

[Out]

(2 - 6*E^(4*x) + E^(6*x))/(4*E^(2*x)) + 3*Log[E^x]

Maple [A] (verified)

Time = 0.04 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.74

method result size
risch \(3 x +\frac {{\mathrm e}^{4 x}}{4}-\frac {3 \,{\mathrm e}^{2 x}}{2}+\frac {{\mathrm e}^{-2 x}}{2}\) \(23\)
parts \(3 x +\frac {{\mathrm e}^{4 x}}{4}-\frac {3 \,{\mathrm e}^{2 x}}{2}+\frac {{\mathrm e}^{-2 x}}{2}\) \(23\)
derivativedivides \(\frac {{\mathrm e}^{4 x}}{4}-\frac {3 \,{\mathrm e}^{2 x}}{2}+3 \ln \left ({\mathrm e}^{x}\right )+\frac {{\mathrm e}^{-2 x}}{2}\) \(25\)
default \(\frac {{\mathrm e}^{4 x}}{4}-\frac {3 \,{\mathrm e}^{2 x}}{2}+3 \ln \left ({\mathrm e}^{x}\right )+\frac {{\mathrm e}^{-2 x}}{2}\) \(25\)
norman \(\left (-\frac {3 \,{\mathrm e}^{5 x}}{2}+\frac {{\mathrm e}^{7 x}}{4}+3 \,{\mathrm e}^{3 x} x +\frac {{\mathrm e}^{x}}{2}\right ) {\mathrm e}^{-3 x}\) \(30\)
parallelrisch \(-\frac {\left (-{\mathrm e}^{6 x}-2+6 \,{\mathrm e}^{4 x}-12 \ln \left ({\mathrm e}^{x}\right ) {\mathrm e}^{2 x}\right ) {\mathrm e}^{-2 x}}{4}\) \(30\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.81 \[ \int e^x \left (-e^{-x}+e^x\right )^3 \, dx=\frac {1}{4} \, {\left (12 \, x e^{\left (2 \, x\right )} + e^{\left (6 \, x\right )} - 6 \, e^{\left (4 \, x\right )} + 2\right )} e^{\left (-2 \, x\right )} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.71 \[ \int e^x \left (-e^{-x}+e^x\right )^3 \, dx=3\,x+\frac {{\mathrm {e}}^{-2\,x}}{2}-\frac {3\,{\mathrm {e}}^{2\,x}}{2}+\frac {{\mathrm {e}}^{4\,x}}{4} \]

[In]

int(-exp(x)*(exp(-x) - exp(x))^3,x)

[Out]

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