3.5.24 \(\int \frac {-24 x^3+e^{2 x} (-5+10 x)+5 x^2 \log (2)+e^{2 x} (24 x^2+e^x (-5+15 x)+(5-10 x) \log (2))+e^x (7 x^2-5 x^3+(5-5 x) \log (2))}{x^2} \, dx\) [424]

Optimal. Leaf size=33 \[ \left (e^x+e^{2 x}-x^2\right ) \left (2+\frac {5 \left (e^x+2 x-\log (2)\right )}{x}\right ) \]

[Out]

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

________________________________________________________________________________________

Rubi [C] Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.
time = 0.20, antiderivative size = 87, normalized size of antiderivative = 2.64, number of steps used = 17, number of rules used = 7, integrand size = 80, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.088, Rules used = {14, 2228, 2230, 2225, 2209, 2208, 2207} \begin {gather*} -2 (5-\log (32)) \text {Ei}(2 x)+10 (1-\log (2)) \text {Ei}(2 x)-12 x^2-5 e^x x+12 e^x+12 e^{2 x}+\frac {5 e^{3 x}}{x}+x \log (32)-\frac {e^x \log (32)}{x}+\frac {e^{2 x} (5-\log (32))}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

12*E^x + 12*E^(2*x) + (5*E^(3*x))/x - 5*E^x*x - 12*x^2 + 10*ExpIntegralEi[2*x]*(1 - Log[2]) + (E^(2*x)*(5 - Lo
g[32]))/x - 2*ExpIntegralEi[2*x]*(5 - Log[32]) - (E^x*Log[32])/x + x*Log[32]

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 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 2228

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> With[{b = Coefficient[v, x, 1], d = Coefficient[u, x, 0],
e = Coefficient[u, x, 1], f = Coefficient[w, x, 0], g = Coefficient[w, x, 1]}, Simp[g*u^(m + 1)*(F^(c*v)/(b*c*
e*Log[F])), x] /; EqQ[e*g*(m + 1) - b*c*(e*f - d*g)*Log[F], 0]] /; FreeQ[{F, c, m}, x] && LinearQ[{u, v, w}, 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]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-24 x+\frac {5 e^{3 x} (-1+3 x)}{x^2}+\log (32)+\frac {e^{2 x} \left (-5+24 x^2+10 x (1-\log (2))+\log (32)\right )}{x^2}-\frac {e^x \left (-7 x^2+5 x^3-\log (32)+x \log (32)\right )}{x^2}\right ) \, dx\\ &=-12 x^2+x \log (32)+5 \int \frac {e^{3 x} (-1+3 x)}{x^2} \, dx+\int \frac {e^{2 x} \left (-5+24 x^2+10 x (1-\log (2))+\log (32)\right )}{x^2} \, dx-\int \frac {e^x \left (-7 x^2+5 x^3-\log (32)+x \log (32)\right )}{x^2} \, dx\\ &=\frac {5 e^{3 x}}{x}-12 x^2+x \log (32)+\int \left (24 e^{2 x}-\frac {10 e^{2 x} (-1+\log (2))}{x}+\frac {e^{2 x} (-5+\log (32))}{x^2}\right ) \, dx-\int \left (-7 e^x+5 e^x x-\frac {e^x \log (32)}{x^2}+\frac {e^x \log (32)}{x}\right ) \, dx\\ &=\frac {5 e^{3 x}}{x}-12 x^2+x \log (32)-5 \int e^x x \, dx+7 \int e^x \, dx+24 \int e^{2 x} \, dx+(10 (1-\log (2))) \int \frac {e^{2 x}}{x} \, dx+(-5+\log (32)) \int \frac {e^{2 x}}{x^2} \, dx+\log (32) \int \frac {e^x}{x^2} \, dx-\log (32) \int \frac {e^x}{x} \, dx\\ &=7 e^x+12 e^{2 x}+\frac {5 e^{3 x}}{x}-5 e^x x-12 x^2+10 \text {Ei}(2 x) (1-\log (2))+\frac {e^{2 x} (5-\log (32))}{x}-\frac {e^x \log (32)}{x}+x \log (32)-\text {Ei}(x) \log (32)+5 \int e^x \, dx-(2 (5-\log (32))) \int \frac {e^{2 x}}{x} \, dx+\log (32) \int \frac {e^x}{x} \, dx\\ &=12 e^x+12 e^{2 x}+\frac {5 e^{3 x}}{x}-5 e^x x-12 x^2+10 \text {Ei}(2 x) (1-\log (2))+\frac {e^{2 x} (5-\log (32))}{x}-2 \text {Ei}(2 x) (5-\log (32))-\frac {e^x \log (32)}{x}+x \log (32)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.11, size = 31, normalized size = 0.94 \begin {gather*} \frac {\left (e^x+e^{2 x}-x^2\right ) \left (5 e^x+12 x-\log (32)\right )}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

((E^x + E^(2*x) - x^2)*(5*E^x + 12*x - Log[32]))/x

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(64\) vs. \(2(30)=60\).
time = 0.38, size = 65, normalized size = 1.97

method result size
risch \(5 x \ln \left (2\right )-12 x^{2}+\frac {5 \,{\mathrm e}^{3 x}}{x}-\frac {\left (-12 x +5 \ln \left (2\right )-5\right ) {\mathrm e}^{2 x}}{x}-\frac {\left (5 x^{2}+5 \ln \left (2\right )-12 x \right ) {\mathrm e}^{x}}{x}\) \(59\)
norman \(\frac {\left (-5 \ln \left (2\right )+5\right ) {\mathrm e}^{2 x}-12 x^{3}+5 \,{\mathrm e}^{3 x}+12 x \,{\mathrm e}^{2 x}+5 x^{2} \ln \left (2\right )+12 \,{\mathrm e}^{x} x -5 \,{\mathrm e}^{x} x^{2}-5 \,{\mathrm e}^{x} \ln \left (2\right )}{x}\) \(60\)
default \(-12 x^{2}+12 \,{\mathrm e}^{2 x}+\frac {5 \,{\mathrm e}^{3 x}}{x}-5 \,{\mathrm e}^{x} x +12 \,{\mathrm e}^{x}+\frac {5 \,{\mathrm e}^{2 x}}{x}-\frac {5 \ln \left (2\right ) {\mathrm e}^{x}}{x}-\frac {5 \ln \left (2\right ) {\mathrm e}^{2 x}}{x}+5 x \ln \left (2\right )\) \(65\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((((15*x-5)*exp(x)+(-10*x+5)*ln(2)+24*x^2)*exp(2*x)+(10*x-5)*exp(x)^2+((-5*x+5)*ln(2)-5*x^3+7*x^2)*exp(x)+5
*x^2*ln(2)-24*x^3)/x^2,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [C] Result contains higher order function than in optimal. Order 4 vs. order 3.
time = 0.32, size = 86, normalized size = 2.61 \begin {gather*} -12 \, x^{2} - 5 \, {\left (x - 1\right )} e^{x} + 5 \, x \log \left (2\right ) - 10 \, {\rm Ei}\left (2 \, x\right ) \log \left (2\right ) - 5 \, {\rm Ei}\left (x\right ) \log \left (2\right ) + 5 \, \Gamma \left (-1, -x\right ) \log \left (2\right ) + 10 \, \Gamma \left (-1, -2 \, x\right ) \log \left (2\right ) + 15 \, {\rm Ei}\left (3 \, x\right ) + 10 \, {\rm Ei}\left (2 \, x\right ) + 12 \, e^{\left (2 \, x\right )} + 7 \, e^{x} - 10 \, \Gamma \left (-1, -2 \, x\right ) - 15 \, \Gamma \left (-1, -3 \, x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((15*x-5)*exp(x)+(-10*x+5)*log(2)+24*x^2)*exp(2*x)+(10*x-5)*exp(x)^2+((-5*x+5)*log(2)-5*x^3+7*x^2)*
exp(x)+5*x^2*log(2)-24*x^3)/x^2,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 55, normalized size = 1.67 \begin {gather*} -\frac {12 \, x^{3} - 5 \, x^{2} \log \left (2\right ) - {\left (12 \, x - 5 \, \log \left (2\right ) + 5\right )} e^{\left (2 \, x\right )} + {\left (5 \, x^{2} - 12 \, x + 5 \, \log \left (2\right )\right )} e^{x} - 5 \, e^{\left (3 \, x\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((15*x-5)*exp(x)+(-10*x+5)*log(2)+24*x^2)*exp(2*x)+(10*x-5)*exp(x)^2+((-5*x+5)*log(2)-5*x^3+7*x^2)*
exp(x)+5*x^2*log(2)-24*x^3)/x^2,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 70 vs. \(2 (27) = 54\).
time = 0.09, size = 70, normalized size = 2.12 \begin {gather*} - 12 x^{2} + 5 x \log {\left (2 \right )} + \frac {5 x^{2} e^{3 x} + \left (12 x^{3} - 5 x^{2} \log {\left (2 \right )} + 5 x^{2}\right ) e^{2 x} + \left (- 5 x^{4} + 12 x^{3} - 5 x^{2} \log {\left (2 \right )}\right ) e^{x}}{x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((15*x-5)*exp(x)+(-10*x+5)*ln(2)+24*x**2)*exp(2*x)+(10*x-5)*exp(x)**2+((-5*x+5)*ln(2)-5*x**3+7*x**2
)*exp(x)+5*x**2*ln(2)-24*x**3)/x**2,x)

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.43, size = 63, normalized size = 1.91 \begin {gather*} -\frac {12 \, x^{3} + 5 \, x^{2} e^{x} - 5 \, x^{2} \log \left (2\right ) - 12 \, x e^{\left (2 \, x\right )} - 12 \, x e^{x} + 5 \, e^{\left (2 \, x\right )} \log \left (2\right ) + 5 \, e^{x} \log \left (2\right ) - 5 \, e^{\left (3 \, x\right )} - 5 \, e^{\left (2 \, x\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((15*x-5)*exp(x)+(-10*x+5)*log(2)+24*x^2)*exp(2*x)+(10*x-5)*exp(x)^2+((-5*x+5)*log(2)-5*x^3+7*x^2)*
exp(x)+5*x^2*log(2)-24*x^3)/x^2,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.48, size = 28, normalized size = 0.85 \begin {gather*} \frac {\left (12\,x-\ln \left (32\right )+5\,{\mathrm {e}}^x\right )\,\left ({\mathrm {e}}^{2\,x}+{\mathrm {e}}^x-x^2\right )}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((5*x^2*log(2) - exp(x)*(log(2)*(5*x - 5) - 7*x^2 + 5*x^3) + exp(2*x)*(exp(x)*(15*x - 5) - log(2)*(10*x - 5
) + 24*x^2) + exp(2*x)*(10*x - 5) - 24*x^3)/x^2,x)

[Out]

((12*x - log(32) + 5*exp(x))*(exp(2*x) + exp(x) - x^2))/x

________________________________________________________________________________________