3.98.16 \(\int \frac {1}{20} (1-40 e^{-2 x}+40 e^{2 x}+e^x (-40-40 x)+e^{-x} (40-40 x)+40 x) \, dx\)

Optimal. Leaf size=21 \[ -1+\frac {x}{20}+\left (e^{-x}-e^x+x\right )^2 \]

________________________________________________________________________________________

Rubi [B]  time = 0.04, antiderivative size = 51, normalized size of antiderivative = 2.43, number of steps used = 8, number of rules used = 3, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.070, Rules used = {12, 2194, 2176} \begin {gather*} x^2+\frac {x}{20}+e^{-2 x}+2 e^{-x}+2 e^x+e^{2 x}-2 e^{-x} (1-x)-2 e^x (x+1) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 - 40/E^(2*x) + 40*E^(2*x) + E^x*(-40 - 40*x) + (40 - 40*x)/E^x + 40*x)/20,x]

[Out]

E^(-2*x) + 2/E^x + 2*E^x + E^(2*x) - (2*(1 - x))/E^x + x/20 + x^2 - 2*E^x*(1 + 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 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 {gather*} \begin {aligned} \text {integral} &=\frac {1}{20} \int \left (1-40 e^{-2 x}+40 e^{2 x}+e^x (-40-40 x)+e^{-x} (40-40 x)+40 x\right ) \, dx\\ &=\frac {x}{20}+x^2+\frac {1}{20} \int e^x (-40-40 x) \, dx+\frac {1}{20} \int e^{-x} (40-40 x) \, dx-2 \int e^{-2 x} \, dx+2 \int e^{2 x} \, dx\\ &=e^{-2 x}+e^{2 x}-2 e^{-x} (1-x)+\frac {x}{20}+x^2-2 e^x (1+x)-2 \int e^{-x} \, dx+2 \int e^x \, dx\\ &=e^{-2 x}+2 e^{-x}+2 e^x+e^{2 x}-2 e^{-x} (1-x)+\frac {x}{20}+x^2-2 e^x (1+x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 33, normalized size = 1.57 \begin {gather*} e^{-2 x}+e^{2 x}+\frac {x}{20}+2 e^{-x} x-2 e^x x+x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 - 40/E^(2*x) + 40*E^(2*x) + E^x*(-40 - 40*x) + (40 - 40*x)/E^x + 40*x)/20,x]

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.58, size = 39, normalized size = 1.86 \begin {gather*} -\frac {1}{20} \, {\left (40 \, x e^{\left (3 \, x\right )} - {\left (20 \, x^{2} + x\right )} e^{\left (2 \, x\right )} - 40 \, x e^{x} - 20 \, e^{\left (4 \, x\right )} - 20\right )} e^{\left (-2 \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 3.94, size = 27, normalized size = 1.29 \begin {gather*} x^{2} + 2 \, x e^{\left (-x\right )} - 2 \, x e^{x} + \frac {1}{20} \, x + e^{\left (2 \, x\right )} + e^{\left (-2 \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2 + 2*x*e^(-x) - 2*x*e^x + 1/20*x + e^(2*x) + e^(-2*x)

________________________________________________________________________________________

maple [A]  time = 0.03, size = 28, normalized size = 1.33




method result size



risch \(\frac {x}{20}+x^{2}+{\mathrm e}^{2 x}+{\mathrm e}^{-2 x}-2 \,{\mathrm e}^{x} x +2 x \,{\mathrm e}^{-x}\) \(28\)
default \(\frac {x}{20}+x^{2}+{\mathrm e}^{2 x}+{\mathrm e}^{-2 x}-2 \,{\mathrm e}^{x} x +2 x \,{\mathrm e}^{-x}\) \(30\)
norman \(\left (1+{\mathrm e}^{4 x}+{\mathrm e}^{2 x} x^{2}+\frac {x \,{\mathrm e}^{2 x}}{20}-2 x \,{\mathrm e}^{3 x}+2 \,{\mathrm e}^{x} x \right ) {\mathrm e}^{-2 x}\) \(39\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/20*x+x^2+exp(2*x)+exp(-2*x)-2*exp(x)*x+2*x*exp(-x)

________________________________________________________________________________________

maxima [A]  time = 0.34, size = 27, normalized size = 1.29 \begin {gather*} x^{2} + 2 \, x e^{\left (-x\right )} - 2 \, x e^{x} + \frac {1}{20} \, x + e^{\left (2 \, x\right )} + e^{\left (-2 \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2 + 2*x*e^(-x) - 2*x*e^x + 1/20*x + e^(2*x) + e^(-2*x)

________________________________________________________________________________________

mupad [B]  time = 0.10, size = 27, normalized size = 1.29 \begin {gather*} \frac {x}{20}+{\mathrm {e}}^{-2\,x}+{\mathrm {e}}^{2\,x}+2\,x\,{\mathrm {e}}^{-x}-2\,x\,{\mathrm {e}}^x+x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(2*x - 2*exp(-2*x) + 2*exp(2*x) - (exp(x)*(40*x + 40))/20 - (exp(-x)*(40*x - 40))/20 + 1/20,x)

[Out]

x/20 + exp(-2*x) + exp(2*x) + 2*x*exp(-x) - 2*x*exp(x) + x^2

________________________________________________________________________________________

sympy [B]  time = 0.15, size = 31, normalized size = 1.48 \begin {gather*} x^{2} - 2 x e^{x} + \frac {x}{20} + 2 x e^{- x} + e^{2 x} + e^{- 2 x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(2*exp(x)**2+1/20*(-40*x-40)*exp(x)-2*exp(-x)**2+1/20*(-40*x+40)*exp(-x)+2*x+1/20,x)

[Out]

x**2 - 2*x*exp(x) + x/20 + 2*x*exp(-x) + exp(2*x) + exp(-2*x)

________________________________________________________________________________________