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

   Optimal result
   Rubi [B] (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 = 61, antiderivative size = 29 \[ \int \frac {e^{-2+x} \left (20+10 e^{2-x}-20 x+15 x^2+15 x^3+\left (10 x^3+5 x^4\right ) \log (3)-10 e^{2-x} \log (x)\right )}{2 x^2} \, dx=\frac {5 \left (e^{-2+x} \left (-2+\frac {1}{2} x^2 (3+x \log (3))\right )+\log (x)\right )}{x} \]

[Out]

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(87\) vs. \(2(29)=58\).

Time = 1.01 (sec) , antiderivative size = 87, normalized size of antiderivative = 3.00, number of steps used = 15, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.131, Rules used = {12, 6874, 2230, 2225, 2208, 2209, 2207, 2340} \[ \int \frac {e^{-2+x} \left (20+10 e^{2-x}-20 x+15 x^2+15 x^3+\left (10 x^3+5 x^4\right ) \log (3)-10 e^{2-x} \log (x)\right )}{2 x^2} \, dx=\frac {5}{2} e^{x-2} x^2 \log (3)+\frac {15 e^{x-2}}{2}-\frac {10 e^{x-2}}{x}+\frac {5}{2} e^{x-2} x (3+\log (9))-5 e^{x-2} x \log (3)-\frac {5}{2} e^{x-2} (3+\log (9))+5 e^{x-2} \log (3)+\frac {5 \log (x)}{x} \]

[In]

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

[Out]

(15*E^(-2 + x))/2 - (10*E^(-2 + x))/x + 5*E^(-2 + x)*Log[3] - 5*E^(-2 + x)*x*Log[3] + (5*E^(-2 + x)*x^2*Log[3]
)/2 - (5*E^(-2 + x)*(3 + Log[9]))/2 + (5*E^(-2 + x)*x*(3 + Log[9]))/2 + (5*Log[x])/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 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 2340

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

Rule 6874

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

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.75 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.07

method result size
risch \(\frac {5 \ln \left (x \right )}{x}+\frac {5 \left (x^{3} \ln \left (3\right )+3 x^{2}-4\right ) {\mathrm e}^{-2+x}}{2 x}\) \(31\)
norman \(\frac {\left (-10+\frac {15 x^{2}}{2}+\frac {5 x^{3} \ln \left (3\right )}{2}+5 \,{\mathrm e}^{2-x} \ln \left (x \right )\right ) {\mathrm e}^{-2+x}}{x}\) \(37\)
parallelrisch \(\frac {\left (5 x^{3} \ln \left (3\right )-20+15 x^{2}+10 \,{\mathrm e}^{2-x} \ln \left (x \right )\right ) {\mathrm e}^{-2+x}}{2 x}\) \(38\)
default \(\frac {5 \ln \left (x \right )}{x}+\frac {5 \ln \left (3\right ) {\mathrm e}^{-2+x} x^{2}}{2}-\frac {10 \,{\mathrm e}^{-2+x}}{x}+\frac {105 \,{\mathrm e}^{-2+x}}{2}-\frac {15 \left (-x +7\right ) {\mathrm e}^{-2+x}}{2}\) \(46\)
parts \(\frac {5 \ln \left (x \right )}{x}+\frac {5 \ln \left (3\right ) {\mathrm e}^{-2+x} x^{2}}{2}-\frac {10 \,{\mathrm e}^{-2+x}}{x}+\frac {105 \,{\mathrm e}^{-2+x}}{2}-\frac {15 \left (-x +7\right ) {\mathrm e}^{-2+x}}{2}\) \(46\)

[In]

int(1/2*(-10*exp(2-x)*ln(x)+10*exp(2-x)+(5*x^4+10*x^3)*ln(3)+15*x^3+15*x^2-20*x+20)/x^2/exp(2-x),x,method=_RET
URNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

integrate(1/2*(-10*exp(2-x)*log(x)+10*exp(2-x)+(5*x^4+10*x^3)*log(3)+15*x^3+15*x^2-20*x+20)/x^2/exp(2-x),x, al
gorithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

(5*x**3*log(3) + 15*x**2 - 20)*exp(x - 2)/(2*x) + 5*log(x)/x

Maxima [C] (verification not implemented)

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

Time = 0.22 (sec) , antiderivative size = 65, normalized size of antiderivative = 2.24 \[ \int \frac {e^{-2+x} \left (20+10 e^{2-x}-20 x+15 x^2+15 x^3+\left (10 x^3+5 x^4\right ) \log (3)-10 e^{2-x} \log (x)\right )}{2 x^2} \, dx=\frac {5}{2} \, {\left (x^{2} - 2 \, x + 2\right )} e^{\left (x - 2\right )} \log \left (3\right ) + 5 \, {\left (x - 1\right )} e^{\left (x - 2\right )} \log \left (3\right ) - 10 \, {\rm Ei}\left (x\right ) e^{\left (-2\right )} + \frac {15}{2} \, {\left (x - 1\right )} e^{\left (x - 2\right )} + 10 \, e^{\left (-2\right )} \Gamma \left (-1, -x\right ) + \frac {5 \, \log \left (x\right )}{x} + \frac {15}{2} \, e^{\left (x - 2\right )} \]

[In]

integrate(1/2*(-10*exp(2-x)*log(x)+10*exp(2-x)+(5*x^4+10*x^3)*log(3)+15*x^3+15*x^2-20*x+20)/x^2/exp(2-x),x, al
gorithm="maxima")

[Out]

5/2*(x^2 - 2*x + 2)*e^(x - 2)*log(3) + 5*(x - 1)*e^(x - 2)*log(3) - 10*Ei(x)*e^(-2) + 15/2*(x - 1)*e^(x - 2) +
 10*e^(-2)*gamma(-1, -x) + 5*log(x)/x + 15/2*e^(x - 2)

Giac [A] (verification not implemented)

none

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

[In]

integrate(1/2*(-10*exp(2-x)*log(x)+10*exp(2-x)+(5*x^4+10*x^3)*log(3)+15*x^3+15*x^2-20*x+20)/x^2/exp(2-x),x, al
gorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 9.18 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.21 \[ \int \frac {e^{-2+x} \left (20+10 e^{2-x}-20 x+15 x^2+15 x^3+\left (10 x^3+5 x^4\right ) \log (3)-10 e^{2-x} \log (x)\right )}{2 x^2} \, dx=\frac {15\,x\,{\mathrm {e}}^{x-2}}{2}-\frac {10\,{\mathrm {e}}^{x-2}-5\,\ln \left (x\right )}{x}+\frac {5\,x^2\,{\mathrm {e}}^{x-2}\,\ln \left (3\right )}{2} \]

[In]

int((exp(x - 2)*(5*exp(2 - x) - 10*x + (log(3)*(10*x^3 + 5*x^4))/2 + (15*x^2)/2 + (15*x^3)/2 - 5*exp(2 - x)*lo
g(x) + 10))/x^2,x)

[Out]

(15*x*exp(x - 2))/2 - (10*exp(x - 2) - 5*log(x))/x + (5*x^2*exp(x - 2)*log(3))/2