\(\int \frac {2-8 e^4 x+2 e^9 x+e^{4+x} (-6 x+6 x^2+2 x^3)-4 \log (x)}{e^4 x^3} \, dx\) [3700]

   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 = 45, antiderivative size = 31 \[ \int \frac {2-8 e^4 x+2 e^9 x+e^{4+x} \left (-6 x+6 x^2+2 x^3\right )-4 \log (x)}{e^4 x^3} \, dx=\frac {2 \left (4-e^5+e^x (3+x)+\frac {x+\frac {\log (x)}{x}}{e^4}\right )}{x} \]

[Out]

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

Rubi [A] (verified)

Time = 0.08 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.81, number of steps used = 14, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {6, 12, 14, 2230, 2225, 2208, 2209, 37, 2341} \[ \int \frac {2-8 e^4 x+2 e^9 x+e^{4+x} \left (-6 x+6 x^2+2 x^3\right )-4 \log (x)}{e^4 x^3} \, dx=-\frac {\left (1-e^4 \left (4-e^5\right ) x\right )^2}{e^4 x^2}+\frac {1}{e^4 x^2}+\frac {2 \log (x)}{e^4 x^2}+2 e^x+\frac {6 e^x}{x} \]

[In]

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

[Out]

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

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, 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 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 37

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^(n +
1)/((b*c - a*d)*(m + 1))), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]

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 2341

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^
n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^(m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.84 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.94

method result size
risch \(\frac {2 \,{\mathrm e}^{-4} \ln \left (x \right )}{x^{2}}-\frac {2 \left ({\mathrm e}^{5}-{\mathrm e}^{x} x -3 \,{\mathrm e}^{x}-4\right )}{x}\) \(29\)
norman \(\frac {\left (-2 \,{\mathrm e}^{5}+8\right ) x +6 \,{\mathrm e}^{x} x +2 \,{\mathrm e}^{x} x^{2}+2 \,{\mathrm e}^{-4} \ln \left (x \right )}{x^{2}}\) \(34\)
default \({\mathrm e}^{-4} \left (-\frac {2 \left (-4 \,{\mathrm e}^{4}+{\mathrm e}^{9}\right )}{x}+\frac {2 \ln \left (x \right )}{x^{2}}+2 \,{\mathrm e}^{4} \left (\frac {3 \,{\mathrm e}^{x}}{x}+{\mathrm e}^{x}\right )\right )\) \(40\)
parallelrisch \(-\frac {{\mathrm e}^{-4} \left (-2 x^{2} {\mathrm e}^{4} {\mathrm e}^{x}+2 x \,{\mathrm e}^{4} {\mathrm e}^{5}-6 x \,{\mathrm e}^{4} {\mathrm e}^{x}-8 x \,{\mathrm e}^{4}-2 \ln \left (x \right )\right )}{x^{2}}\) \(43\)
parts \(\frac {2 \,{\mathrm e}^{-4} \ln \left (x \right )}{x^{2}}+\frac {{\mathrm e}^{-4}}{x^{2}}+\frac {6 \,{\mathrm e}^{x}}{x}+2 \,{\mathrm e}^{x}+2 \,{\mathrm e}^{-4} \left (-\frac {-4 \,{\mathrm e}^{4}+{\mathrm e}^{9}}{x}-\frac {1}{2 x^{2}}\right )\) \(56\)

[In]

int((-4*ln(x)+(2*x^3+6*x^2-6*x)*exp(4)*exp(x)+2*x*exp(4)*exp(5)-8*x*exp(4)+2)/x^3/exp(4),x,method=_RETURNVERBO
SE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.10 \[ \int \frac {2-8 e^4 x+2 e^9 x+e^{4+x} \left (-6 x+6 x^2+2 x^3\right )-4 \log (x)}{e^4 x^3} \, dx=-\frac {2 \, {\left (x e^{9} - 4 \, x e^{4} - {\left (x^{2} + 3 \, x\right )} e^{\left (x + 4\right )} - \log \left (x\right )\right )} e^{\left (-4\right )}}{x^{2}} \]

[In]

integrate((-4*log(x)+(2*x^3+6*x^2-6*x)*exp(4)*exp(x)+2*x*exp(4)*exp(5)-8*x*exp(4)+2)/x^3/exp(4),x, algorithm="
fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.94 \[ \int \frac {2-8 e^4 x+2 e^9 x+e^{4+x} \left (-6 x+6 x^2+2 x^3\right )-4 \log (x)}{e^4 x^3} \, dx=\frac {\left (2 x + 6\right ) e^{x}}{x} - \frac {-8 + 2 e^{5}}{x} + \frac {2 \log {\left (x \right )}}{x^{2} e^{4}} \]

[In]

integrate((-4*ln(x)+(2*x**3+6*x**2-6*x)*exp(4)*exp(x)+2*x*exp(4)*exp(5)-8*x*exp(4)+2)/x**3/exp(4),x)

[Out]

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

Maxima [C] (verification not implemented)

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

Time = 0.23 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.42 \[ \int \frac {2-8 e^4 x+2 e^9 x+e^{4+x} \left (-6 x+6 x^2+2 x^3\right )-4 \log (x)}{e^4 x^3} \, dx=2 \, {\left (3 \, {\rm Ei}\left (x\right ) e^{4} - 3 \, e^{4} \Gamma \left (-1, -x\right ) - \frac {e^{9}}{x} + \frac {4 \, e^{4}}{x} + \frac {\log \left (x\right )}{x^{2}} + e^{\left (x + 4\right )}\right )} e^{\left (-4\right )} \]

[In]

integrate((-4*log(x)+(2*x^3+6*x^2-6*x)*exp(4)*exp(x)+2*x*exp(4)*exp(5)-8*x*exp(4)+2)/x^3/exp(4),x, algorithm="
maxima")

[Out]

2*(3*Ei(x)*e^4 - 3*e^4*gamma(-1, -x) - e^9/x + 4*e^4/x + log(x)/x^2 + e^(x + 4))*e^(-4)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.13 \[ \int \frac {2-8 e^4 x+2 e^9 x+e^{4+x} \left (-6 x+6 x^2+2 x^3\right )-4 \log (x)}{e^4 x^3} \, dx=\frac {2 \, {\left (x^{2} e^{\left (x + 4\right )} - x e^{9} + 4 \, x e^{4} + 3 \, x e^{\left (x + 4\right )} + \log \left (x\right )\right )} e^{\left (-4\right )}}{x^{2}} \]

[In]

integrate((-4*log(x)+(2*x^3+6*x^2-6*x)*exp(4)*exp(x)+2*x*exp(4)*exp(5)-8*x*exp(4)+2)/x^3/exp(4),x, algorithm="
giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 8.68 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.90 \[ \int \frac {2-8 e^4 x+2 e^9 x+e^{4+x} \left (-6 x+6 x^2+2 x^3\right )-4 \log (x)}{e^4 x^3} \, dx=2\,{\mathrm {e}}^x+\frac {x\,\left (6\,{\mathrm {e}}^x-2\,{\mathrm {e}}^5+8\right )+2\,{\mathrm {e}}^{-4}\,\ln \left (x\right )}{x^2} \]

[In]

int((exp(-4)*(2*x*exp(9) - 8*x*exp(4) - 4*log(x) + exp(4)*exp(x)*(6*x^2 - 6*x + 2*x^3) + 2))/x^3,x)

[Out]

2*exp(x) + (x*(6*exp(x) - 2*exp(5) + 8) + 2*exp(-4)*log(x))/x^2