\(\int \frac {1}{5} e^{-\frac {-1+e^{23} x}{e^{23}}} (20+e^{\frac {-1+e^{23} x}{e^{23}}} (5+e^{\frac {1}{5} (-5 e^4 x+x^2)} (-5 e^4+2 x))) \, dx\) [7791]

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

Optimal result

Integrand size = 62, antiderivative size = 28 \[ \int \frac {1}{5} e^{-\frac {-1+e^{23} x}{e^{23}}} \left (20+e^{\frac {-1+e^{23} x}{e^{23}}} \left (5+e^{\frac {1}{5} \left (-5 e^4 x+x^2\right )} \left (-5 e^4+2 x\right )\right )\right ) \, dx=-4 e^{\frac {1}{e^{23}}-x}+e^{\left (-e^4+\frac {x}{5}\right ) x}+x \]

[Out]

x-4/exp(x-exp(-23))+exp(x*(1/5*x-exp(4)))

Rubi [A] (verified)

Time = 0.27 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.04, number of steps used = 12, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.145, Rules used = {12, 6873, 6874, 2225, 2267, 2266, 2235, 2276, 2272} \[ \int \frac {1}{5} e^{-\frac {-1+e^{23} x}{e^{23}}} \left (20+e^{\frac {-1+e^{23} x}{e^{23}}} \left (5+e^{\frac {1}{5} \left (-5 e^4 x+x^2\right )} \left (-5 e^4+2 x\right )\right )\right ) \, dx=e^{\frac {x^2}{5}-e^4 x}+x-4 e^{\frac {1}{e^{23}}-x} \]

[In]

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

[Out]

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

Rule 2235

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt[Pi]*(Erfi[(c + d*x)*Rt[b*Log[F], 2
]]/(2*d*Rt[b*Log[F], 2])), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2266

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[F^(a - b^2/(4*c)), Int[F^((b + 2*c*x)^2/(4*c))
, x], x] /; FreeQ[{F, a, b, c}, x]

Rule 2267

Int[(F_)^(v_), x_Symbol] :> Int[F^ExpandToSum[v, x], x] /; FreeQ[F, x] && QuadraticQ[v, x] &&  !QuadraticMatch
Q[v, x]

Rule 2272

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)*((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[e*(F^(a + b*x + c*x^2)/(2
*c*Log[F])), x] - Dist[(b*e - 2*c*d)/(2*c), Int[F^(a + b*x + c*x^2), x], x] /; FreeQ[{F, a, b, c, d, e}, x] &&
 NeQ[b*e - 2*c*d, 0]

Rule 2276

Int[(F_)^(v_)*(u_)^(m_.), x_Symbol] :> Int[ExpandToSum[u, x]^m*F^ExpandToSum[v, x], x] /; FreeQ[{F, m}, x] &&
LinearQ[u, x] && QuadraticQ[v, x] &&  !(LinearMatchQ[u, x] && QuadraticMatchQ[v, x])

Rule 6873

Int[u_, x_Symbol] :> With[{v = NormalizeIntegrand[u, x]}, Int[v, x] /; v =!= u]

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

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

Mathematica [A] (verified)

Time = 0.31 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.04 \[ \int \frac {1}{5} e^{-\frac {-1+e^{23} x}{e^{23}}} \left (20+e^{\frac {-1+e^{23} x}{e^{23}}} \left (5+e^{\frac {1}{5} \left (-5 e^4 x+x^2\right )} \left (-5 e^4+2 x\right )\right )\right ) \, dx=-4 e^{\frac {1}{e^{23}}-x}+e^{-e^4 x+\frac {x^2}{5}}+x \]

[In]

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

[Out]

-4*E^(E^(-23) - x) + E^(-(E^4*x) + x^2/5) + x

Maple [A] (verified)

Time = 0.12 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.93

method result size
default \(x -4 \,{\mathrm e}^{-x} {\mathrm e}^{{\mathrm e}^{-23}}+{\mathrm e}^{-x \,{\mathrm e}^{4}+\frac {x^{2}}{5}}\) \(26\)
risch \(x +{\mathrm e}^{-\frac {x \left (5 \,{\mathrm e}^{4}-x \right )}{5}}-4 \,{\mathrm e}^{-\left (x \,{\mathrm e}^{23}-1\right ) {\mathrm e}^{-23}}\) \(28\)
parts \(x +{\mathrm e}^{-x \,{\mathrm e}^{4}+\frac {x^{2}}{5}}-4 \,{\mathrm e}^{-\left (x \,{\mathrm e}^{23}-1\right ) {\mathrm e}^{-23}}\) \(31\)
norman \(\left (-4+x \,{\mathrm e}^{\left (x \,{\mathrm e}^{23}-1\right ) {\mathrm e}^{-23}}+{\mathrm e}^{-x \,{\mathrm e}^{4}+\frac {x^{2}}{5}} {\mathrm e}^{\left (x \,{\mathrm e}^{23}-1\right ) {\mathrm e}^{-23}}\right ) {\mathrm e}^{-\left (x \,{\mathrm e}^{23}-1\right ) {\mathrm e}^{-23}}\) \(57\)
parallelrisch \(\frac {\left (-20+5 x \,{\mathrm e}^{\left (x \,{\mathrm e}^{23}-1\right ) {\mathrm e}^{-23}}+5 \,{\mathrm e}^{-\frac {x \left (5 \,{\mathrm e}^{4}-x \right )}{5}} {\mathrm e}^{\left (x \,{\mathrm e}^{23}-1\right ) {\mathrm e}^{-23}}\right ) {\mathrm e}^{-\left (x \,{\mathrm e}^{23}-1\right ) {\mathrm e}^{-23}}}{5}\) \(60\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

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

[In]

integrate(1/5*(((-5*exp(4)+2*x)*exp(-x*exp(4)+1/5*x**2)+5)*exp((x*exp(23)-1)/exp(23))+20)/exp((x*exp(23)-1)/ex
p(23)),x)

[Out]

x + exp(x**2/5 - x*exp(4)) - 4*exp(-(x*exp(23) - 1)*exp(-23))

Maxima [C] (verification not implemented)

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

Time = 0.34 (sec) , antiderivative size = 127, normalized size of antiderivative = 4.54 \[ \int \frac {1}{5} e^{-\frac {-1+e^{23} x}{e^{23}}} \left (20+e^{\frac {-1+e^{23} x}{e^{23}}} \left (5+e^{\frac {1}{5} \left (-5 e^4 x+x^2\right )} \left (-5 e^4+2 x\right )\right )\right ) \, dx=\frac {1}{2} i \, \sqrt {5} \sqrt {\pi } \operatorname {erf}\left (\frac {1}{5} i \, \sqrt {5} x - \frac {1}{2} i \, \sqrt {5} e^{4}\right ) e^{\left (-\frac {5}{4} \, e^{8} + 4\right )} + \frac {1}{10} \, \sqrt {5} {\left (\frac {5 \, \sqrt {5} \sqrt {\frac {1}{5}} \sqrt {\pi } {\left (2 \, x - 5 \, e^{4}\right )} {\left (\operatorname {erf}\left (\frac {1}{2} \, \sqrt {\frac {1}{5}} \sqrt {-{\left (2 \, x - 5 \, e^{4}\right )}^{2}}\right ) - 1\right )} e^{4}}{\sqrt {-{\left (2 \, x - 5 \, e^{4}\right )}^{2}}} + 2 \, \sqrt {5} e^{\left (\frac {1}{20} \, {\left (2 \, x - 5 \, e^{4}\right )}^{2}\right )}\right )} e^{\left (-\frac {5}{4} \, e^{8}\right )} + x - 4 \, e^{\left (-x + e^{\left (-23\right )}\right )} \]

[In]

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

[Out]

1/2*I*sqrt(5)*sqrt(pi)*erf(1/5*I*sqrt(5)*x - 1/2*I*sqrt(5)*e^4)*e^(-5/4*e^8 + 4) + 1/10*sqrt(5)*(5*sqrt(5)*sqr
t(1/5)*sqrt(pi)*(2*x - 5*e^4)*(erf(1/2*sqrt(1/5)*sqrt(-(2*x - 5*e^4)^2)) - 1)*e^4/sqrt(-(2*x - 5*e^4)^2) + 2*s
qrt(5)*e^(1/20*(2*x - 5*e^4)^2))*e^(-5/4*e^8) + x - 4*e^(-x + e^(-23))

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.96 \[ \int \frac {1}{5} e^{-\frac {-1+e^{23} x}{e^{23}}} \left (20+e^{\frac {-1+e^{23} x}{e^{23}}} \left (5+e^{\frac {1}{5} \left (-5 e^4 x+x^2\right )} \left (-5 e^4+2 x\right )\right )\right ) \, dx=x + e^{\left (\frac {1}{5} \, x^{2} - x e^{4}\right )} - 4 \, e^{\left (-{\left (x e^{23} - 1\right )} e^{\left (-23\right )}\right )} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 13.67 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.82 \[ \int \frac {1}{5} e^{-\frac {-1+e^{23} x}{e^{23}}} \left (20+e^{\frac {-1+e^{23} x}{e^{23}}} \left (5+e^{\frac {1}{5} \left (-5 e^4 x+x^2\right )} \left (-5 e^4+2 x\right )\right )\right ) \, dx=x-4\,{\mathrm {e}}^{{\mathrm {e}}^{-23}-x}+{\mathrm {e}}^{\frac {x^2}{5}-x\,{\mathrm {e}}^4} \]

[In]

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

[Out]

x - 4*exp(exp(-23) - x) + exp(x^2/5 - x*exp(4))