3.685 \(\int (e^{-x}+e^x) x \, dx\)

Optimal. Leaf size=26 \[ -e^{-x} x+e^x x-e^{-x}-e^x \]

[Out]

-1/exp(x)-exp(x)-x/exp(x)+exp(x)*x

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 3, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {14, 2176, 2194} \[ -e^{-x} x+e^x x-e^{-x}-e^x \]

Antiderivative was successfully verified.

[In]

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

[Out]

-E^(-x) - E^x - x/E^x + E^x*x

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

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]

Rubi steps

\begin {align*} \int \left (e^{-x}+e^x\right ) x \, dx &=\int \left (e^{-x} x+e^x x\right ) \, dx\\ &=\int e^{-x} x \, dx+\int e^x x \, dx\\ &=-e^{-x} x+e^x x+\int e^{-x} \, dx-\int e^x \, dx\\ &=-e^{-x}-e^x-e^{-x} x+e^x x\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 20, normalized size = 0.77 \[ e^{-x} \left (e^{2 x} (x-1)-x-1\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.40, size = 18, normalized size = 0.69 \[ {\left ({\left (x - 1\right )} e^{\left (2 \, x\right )} - x - 1\right )} e^{\left (-x\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((exp(-x)+exp(x))*x,x, algorithm="fricas")

[Out]

((x - 1)*e^(2*x) - x - 1)*e^(-x)

________________________________________________________________________________________

giac [A]  time = 0.18, size = 16, normalized size = 0.62 \[ -{\left (x + 1\right )} e^{\left (-x\right )} + {\left (x - 1\right )} e^{x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((exp(-x)+exp(x))*x,x, algorithm="giac")

[Out]

-(x + 1)*e^(-x) + (x - 1)*e^x

________________________________________________________________________________________

maple [A]  time = 0.03, size = 23, normalized size = 0.88 \[ x \,{\mathrm e}^{x}-x \,{\mathrm e}^{-x}-{\mathrm e}^{x}-{\mathrm e}^{-x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((exp(-x)+exp(x))*x,x)

[Out]

-1/exp(x)-exp(x)-x/exp(x)+x*exp(x)

________________________________________________________________________________________

maxima [A]  time = 0.82, size = 16, normalized size = 0.62 \[ -{\left (x + 1\right )} e^{\left (-x\right )} + {\left (x - 1\right )} e^{x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((exp(-x)+exp(x))*x,x, algorithm="maxima")

[Out]

-(x + 1)*e^(-x) + (x - 1)*e^x

________________________________________________________________________________________

mupad [B]  time = 0.06, size = 10, normalized size = 0.38 \[ 2\,x\,\mathrm {sinh}\relax (x)-2\,\mathrm {cosh}\relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(exp(-x) + exp(x)),x)

[Out]

2*x*sinh(x) - 2*cosh(x)

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 14, normalized size = 0.54 \[ \left (- x - 1\right ) e^{- x} + \left (x - 1\right ) e^{x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((exp(-x)+exp(x))*x,x)

[Out]

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

________________________________________________________________________________________