\(\int \frac {e^{-x} (-40 x-40 x^2+24 x^3+e^2 (-10-10 x+x^2)+e^x (-5 e^2 x^2-20 x^3)+(20 x^3-20 x^4+e^2 (5 x^2-5 x^3)) \log (e^2+4 x))}{5 e^2 x^2+20 x^3} \, dx\) [5848]

   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 [F(-1)]

Optimal result

Integrand size = 101, antiderivative size = 29 \[ \int \frac {e^{-x} \left (-40 x-40 x^2+24 x^3+e^2 \left (-10-10 x+x^2\right )+e^x \left (-5 e^2 x^2-20 x^3\right )+\left (20 x^3-20 x^4+e^2 \left (5 x^2-5 x^3\right )\right ) \log \left (e^2+4 x\right )\right )}{5 e^2 x^2+20 x^3} \, dx=-x+e^{-x} \left (-\frac {1}{5}+\frac {2}{x}+x \log \left (e^2+4 x\right )\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 2.30 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.97, number of steps used = 19, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.099, Rules used = {1607, 6874, 6820, 2225, 2208, 2209, 2207, 2634, 12, 2230} \[ \int \frac {e^{-x} \left (-40 x-40 x^2+24 x^3+e^2 \left (-10-10 x+x^2\right )+e^x \left (-5 e^2 x^2-20 x^3\right )+\left (20 x^3-20 x^4+e^2 \left (5 x^2-5 x^3\right )\right ) \log \left (e^2+4 x\right )\right )}{5 e^2 x^2+20 x^3} \, dx=-x-\frac {e^{-x}}{5}+\frac {2 e^{-x}}{x}+e^{-x} \log \left (4 x+e^2\right )-e^{-x} (1-x) \log \left (4 x+e^2\right ) \]

[In]

Int[(-40*x - 40*x^2 + 24*x^3 + E^2*(-10 - 10*x + x^2) + E^x*(-5*E^2*x^2 - 20*x^3) + (20*x^3 - 20*x^4 + E^2*(5*
x^2 - 5*x^3))*Log[E^2 + 4*x])/(E^x*(5*E^2*x^2 + 20*x^3)),x]

[Out]

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

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

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 2208

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[(c + d*x)^(m
+ 1)*((b*F^(g*(e + f*x)))^n/(d*(m + 1))), x] - Dist[f*g*n*(Log[F]/(d*(m + 1))), 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] && LtQ[m, -1] && IntegerQ[2*m] &&  !TrueQ[$UseGamm
a]

Rule 2209

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - c*(f/d)))/d)*ExpInteg
ralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !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]

Rule 2230

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), w*NormalizePo
werOfLinear[u, x]^m, x], x] /; FreeQ[{F, c}, x] && PolynomialQ[w, x] && LinearQ[v, x] && PowerOfLinearQ[u, x]
&& IntegerQ[m] &&  !TrueQ[$UseGamma]

Rule 2634

Int[Log[u_]*(v_), x_Symbol] :> With[{w = IntHide[v, x]}, Dist[Log[u], w, x] - Int[SimplifyIntegrand[w*(D[u, x]
/u), x], x] /; InverseFunctionFreeQ[w, x]] /; InverseFunctionFreeQ[u, x]

Rule 6820

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

Rule 6874

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

Rubi steps \begin{align*} \text {integral}& = \int \frac {e^{-x} \left (-40 x-40 x^2+24 x^3+e^2 \left (-10-10 x+x^2\right )+e^x \left (-5 e^2 x^2-20 x^3\right )+\left (20 x^3-20 x^4+e^2 \left (5 x^2-5 x^3\right )\right ) \log \left (e^2+4 x\right )\right )}{x^2 \left (5 e^2+20 x\right )} \, dx \\ & = \int \left (-1+\frac {e^{-x} \left (-10 e^2-40 \left (1+\frac {e^2}{4}\right ) x-40 \left (1-\frac {e^2}{40}\right ) x^2+24 x^3+5 e^2 x^2 \log \left (e^2+4 x\right )+20 \left (1-\frac {e^2}{4}\right ) x^3 \log \left (e^2+4 x\right )-20 x^4 \log \left (e^2+4 x\right )\right )}{5 x^2 \left (e^2+4 x\right )}\right ) \, dx \\ & = -x+\frac {1}{5} \int \frac {e^{-x} \left (-10 e^2-40 \left (1+\frac {e^2}{4}\right ) x-40 \left (1-\frac {e^2}{40}\right ) x^2+24 x^3+5 e^2 x^2 \log \left (e^2+4 x\right )+20 \left (1-\frac {e^2}{4}\right ) x^3 \log \left (e^2+4 x\right )-20 x^4 \log \left (e^2+4 x\right )\right )}{x^2 \left (e^2+4 x\right )} \, dx \\ & = -x+\frac {1}{5} \int \frac {e^{-x} \left (e^2 \left (-10-10 x+x^2\right )+8 x \left (-5-5 x+3 x^2\right )-5 (-1+x) x^2 \left (e^2+4 x\right ) \log \left (e^2+4 x\right )\right )}{x^2 \left (e^2+4 x\right )} \, dx \\ & = -x+\frac {1}{5} \int \left (\frac {e^{-x} \left (-10 e^2-10 \left (4+e^2\right ) x-\left (40-e^2\right ) x^2+24 x^3\right )}{x^2 \left (e^2+4 x\right )}-5 e^{-x} (-1+x) \log \left (e^2+4 x\right )\right ) \, dx \\ & = -x+\frac {1}{5} \int \frac {e^{-x} \left (-10 e^2-10 \left (4+e^2\right ) x-\left (40-e^2\right ) x^2+24 x^3\right )}{x^2 \left (e^2+4 x\right )} \, dx-\int e^{-x} (-1+x) \log \left (e^2+4 x\right ) \, dx \\ & = -x+e^{-x} \log \left (e^2+4 x\right )-e^{-x} (1-x) \log \left (e^2+4 x\right )+\frac {1}{5} \int \left (6 e^{-x}-\frac {10 e^{-x}}{x^2}-\frac {10 e^{-x}}{x}-\frac {5 e^{2-x}}{e^2+4 x}\right ) \, dx+\int \frac {4 e^{-x} x}{-e^2-4 x} \, dx \\ & = -x+e^{-x} \log \left (e^2+4 x\right )-e^{-x} (1-x) \log \left (e^2+4 x\right )+\frac {6}{5} \int e^{-x} \, dx-2 \int \frac {e^{-x}}{x^2} \, dx-2 \int \frac {e^{-x}}{x} \, dx+4 \int \frac {e^{-x} x}{-e^2-4 x} \, dx-\int \frac {e^{2-x}}{e^2+4 x} \, dx \\ & = -\frac {6 e^{-x}}{5}+\frac {2 e^{-x}}{x}-x-\frac {1}{4} e^{2+\frac {e^2}{4}} \text {Ei}\left (\frac {1}{4} \left (-e^2-4 x\right )\right )-2 \text {Ei}(-x)+e^{-x} \log \left (e^2+4 x\right )-e^{-x} (1-x) \log \left (e^2+4 x\right )+2 \int \frac {e^{-x}}{x} \, dx+4 \int \left (-\frac {e^{-x}}{4}+\frac {e^{2-x}}{4 \left (e^2+4 x\right )}\right ) \, dx \\ & = -\frac {6 e^{-x}}{5}+\frac {2 e^{-x}}{x}-x-\frac {1}{4} e^{2+\frac {e^2}{4}} \text {Ei}\left (\frac {1}{4} \left (-e^2-4 x\right )\right )+e^{-x} \log \left (e^2+4 x\right )-e^{-x} (1-x) \log \left (e^2+4 x\right )-\int e^{-x} \, dx+\int \frac {e^{2-x}}{e^2+4 x} \, dx \\ & = -\frac {e^{-x}}{5}+\frac {2 e^{-x}}{x}-x+e^{-x} \log \left (e^2+4 x\right )-e^{-x} (1-x) \log \left (e^2+4 x\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.28 \[ \int \frac {e^{-x} \left (-40 x-40 x^2+24 x^3+e^2 \left (-10-10 x+x^2\right )+e^x \left (-5 e^2 x^2-20 x^3\right )+\left (20 x^3-20 x^4+e^2 \left (5 x^2-5 x^3\right )\right ) \log \left (e^2+4 x\right )\right )}{5 e^2 x^2+20 x^3} \, dx=\frac {1}{5} \left (e^{-x} \left (-1+\frac {10}{x}\right )-5 x+5 e^{-x} x \log \left (e^2+4 x\right )\right ) \]

[In]

Integrate[(-40*x - 40*x^2 + 24*x^3 + E^2*(-10 - 10*x + x^2) + E^x*(-5*E^2*x^2 - 20*x^3) + (20*x^3 - 20*x^4 + E
^2*(5*x^2 - 5*x^3))*Log[E^2 + 4*x])/(E^x*(5*E^2*x^2 + 20*x^3)),x]

[Out]

((-1 + 10/x)/E^x - 5*x + (5*x*Log[E^2 + 4*x])/E^x)/5

Maple [A] (verified)

Time = 0.69 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.00

method result size
parts \(-x +\frac {\left (2+x^{2} \ln \left ({\mathrm e}^{2}+4 x \right )-\frac {x}{5}\right ) {\mathrm e}^{-x}}{x}\) \(29\)
default \(-x +\frac {\left (10-x +5 x^{2} \ln \left ({\mathrm e}^{2}+4 x \right )\right ) {\mathrm e}^{-x}}{5 x}\) \(31\)
norman \(\frac {\left (2+x^{2} \ln \left ({\mathrm e}^{2}+4 x \right )-\frac {x}{5}-{\mathrm e}^{x} x^{2}\right ) {\mathrm e}^{-x}}{x}\) \(32\)
risch \(x \,{\mathrm e}^{-x} \ln \left ({\mathrm e}^{2}+4 x \right )-\frac {\left (5 \,{\mathrm e}^{x} x^{2}+x -10\right ) {\mathrm e}^{-x}}{5 x}\) \(34\)
parallelrisch \(\frac {\left (160+40 x \,{\mathrm e}^{2} {\mathrm e}^{x}-80 \,{\mathrm e}^{x} x^{2}+80 x^{2} \ln \left ({\mathrm e}^{2}+4 x \right )-16 x \right ) {\mathrm e}^{-x}}{80 x}\) \(41\)

[In]

int((((-5*x^3+5*x^2)*exp(2)-20*x^4+20*x^3)*ln(exp(2)+4*x)+(-5*x^2*exp(2)-20*x^3)*exp(x)+(x^2-10*x-10)*exp(2)+2
4*x^3-40*x^2-40*x)/(5*x^2*exp(2)+20*x^3)/exp(x),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.07 \[ \int \frac {e^{-x} \left (-40 x-40 x^2+24 x^3+e^2 \left (-10-10 x+x^2\right )+e^x \left (-5 e^2 x^2-20 x^3\right )+\left (20 x^3-20 x^4+e^2 \left (5 x^2-5 x^3\right )\right ) \log \left (e^2+4 x\right )\right )}{5 e^2 x^2+20 x^3} \, dx=-\frac {{\left (5 \, x^{2} e^{x} - 5 \, x^{2} \log \left (4 \, x + e^{2}\right ) + x - 10\right )} e^{\left (-x\right )}}{5 \, x} \]

[In]

integrate((((-5*x^3+5*x^2)*exp(2)-20*x^4+20*x^3)*log(exp(2)+4*x)+(-5*x^2*exp(2)-20*x^3)*exp(x)+(x^2-10*x-10)*e
xp(2)+24*x^3-40*x^2-40*x)/(5*x^2*exp(2)+20*x^3)/exp(x),x, algorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.83 \[ \int \frac {e^{-x} \left (-40 x-40 x^2+24 x^3+e^2 \left (-10-10 x+x^2\right )+e^x \left (-5 e^2 x^2-20 x^3\right )+\left (20 x^3-20 x^4+e^2 \left (5 x^2-5 x^3\right )\right ) \log \left (e^2+4 x\right )\right )}{5 e^2 x^2+20 x^3} \, dx=- x + \frac {\left (5 x^{2} \log {\left (4 x + e^{2} \right )} - x + 10\right ) e^{- x}}{5 x} \]

[In]

integrate((((-5*x**3+5*x**2)*exp(2)-20*x**4+20*x**3)*ln(exp(2)+4*x)+(-5*x**2*exp(2)-20*x**3)*exp(x)+(x**2-10*x
-10)*exp(2)+24*x**3-40*x**2-40*x)/(5*x**2*exp(2)+20*x**3)/exp(x),x)

[Out]

-x + (5*x**2*log(4*x + exp(2)) - x + 10)*exp(-x)/(5*x)

Maxima [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.24 \[ \int \frac {e^{-x} \left (-40 x-40 x^2+24 x^3+e^2 \left (-10-10 x+x^2\right )+e^x \left (-5 e^2 x^2-20 x^3\right )+\left (20 x^3-20 x^4+e^2 \left (5 x^2-5 x^3\right )\right ) \log \left (e^2+4 x\right )\right )}{5 e^2 x^2+20 x^3} \, dx=\frac {5 \, x^{2} e^{\left (-x\right )} \log \left (4 \, x + e^{2}\right ) - 5 \, x^{2} - {\left (x - 10\right )} e^{\left (-x\right )}}{5 \, x} \]

[In]

integrate((((-5*x^3+5*x^2)*exp(2)-20*x^4+20*x^3)*log(exp(2)+4*x)+(-5*x^2*exp(2)-20*x^3)*exp(x)+(x^2-10*x-10)*e
xp(2)+24*x^3-40*x^2-40*x)/(5*x^2*exp(2)+20*x^3)/exp(x),x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.07 \[ \int \frac {e^{-x} \left (-40 x-40 x^2+24 x^3+e^2 \left (-10-10 x+x^2\right )+e^x \left (-5 e^2 x^2-20 x^3\right )+\left (20 x^3-20 x^4+e^2 \left (5 x^2-5 x^3\right )\right ) \log \left (e^2+4 x\right )\right )}{5 e^2 x^2+20 x^3} \, dx=-\frac {{\left (5 \, x^{2} e^{x} - 5 \, x^{2} \log \left (4 \, x + e^{2}\right ) + x - 10\right )} e^{\left (-x\right )}}{5 \, x} \]

[In]

integrate((((-5*x^3+5*x^2)*exp(2)-20*x^4+20*x^3)*log(exp(2)+4*x)+(-5*x^2*exp(2)-20*x^3)*exp(x)+(x^2-10*x-10)*e
xp(2)+24*x^3-40*x^2-40*x)/(5*x^2*exp(2)+20*x^3)/exp(x),x, algorithm="giac")

[Out]

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

Mupad [F(-1)]

Timed out. \[ \int \frac {e^{-x} \left (-40 x-40 x^2+24 x^3+e^2 \left (-10-10 x+x^2\right )+e^x \left (-5 e^2 x^2-20 x^3\right )+\left (20 x^3-20 x^4+e^2 \left (5 x^2-5 x^3\right )\right ) \log \left (e^2+4 x\right )\right )}{5 e^2 x^2+20 x^3} \, dx=\int -\frac {{\mathrm {e}}^{-x}\,\left (40\,x+{\mathrm {e}}^2\,\left (-x^2+10\,x+10\right )+{\mathrm {e}}^x\,\left (20\,x^3+5\,{\mathrm {e}}^2\,x^2\right )-\ln \left (4\,x+{\mathrm {e}}^2\right )\,\left ({\mathrm {e}}^2\,\left (5\,x^2-5\,x^3\right )+20\,x^3-20\,x^4\right )+40\,x^2-24\,x^3\right )}{20\,x^3+5\,{\mathrm {e}}^2\,x^2} \,d x \]

[In]

int(-(exp(-x)*(40*x + exp(2)*(10*x - x^2 + 10) + exp(x)*(5*x^2*exp(2) + 20*x^3) - log(4*x + exp(2))*(exp(2)*(5
*x^2 - 5*x^3) + 20*x^3 - 20*x^4) + 40*x^2 - 24*x^3))/(5*x^2*exp(2) + 20*x^3),x)

[Out]

int(-(exp(-x)*(40*x + exp(2)*(10*x - x^2 + 10) + exp(x)*(5*x^2*exp(2) + 20*x^3) - log(4*x + exp(2))*(exp(2)*(5
*x^2 - 5*x^3) + 20*x^3 - 20*x^4) + 40*x^2 - 24*x^3))/(5*x^2*exp(2) + 20*x^3), x)