\(\int \frac {e^{-2+x^2} (-32-40 x+32 x^2+70 x^3+36 x^4-20 x^5+2 x^6) \log ^2(8)}{25 x^3} \, dx\) [5751]

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

Optimal result

Integrand size = 48, antiderivative size = 30 \[ \int \frac {e^{-2+x^2} \left (-32-40 x+32 x^2+70 x^3+36 x^4-20 x^5+2 x^6\right ) \log ^2(8)}{25 x^3} \, dx=\frac {e^{-2+x^2} \left (x+\frac {1}{5} \left (4-x^2\right )\right )^2 \log ^2(8)}{x^2} \]

[Out]

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(86\) vs. \(2(30)=60\).

Time = 0.39 (sec) , antiderivative size = 86, normalized size of antiderivative = 2.87, number of steps used = 16, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {12, 6873, 6874, 2235, 2245, 2241, 2240, 2243} \[ \int \frac {e^{-2+x^2} \left (-32-40 x+32 x^2+70 x^3+36 x^4-20 x^5+2 x^6\right ) \log ^2(8)}{25 x^3} \, dx=\frac {1}{25} e^{x^2-2} x^2 \log ^2(8)-\frac {2}{5} e^{x^2-2} x \log ^2(8)+\frac {17}{25} e^{x^2-2} \log ^2(8)+\frac {8 e^{x^2-2} \log ^2(8)}{5 x}+\frac {16 e^{x^2-2} \log ^2(8)}{25 x^2} \]

[In]

Int[(E^(-2 + x^2)*(-32 - 40*x + 32*x^2 + 70*x^3 + 36*x^4 - 20*x^5 + 2*x^6)*Log[8]^2)/(25*x^3),x]

[Out]

(17*E^(-2 + x^2)*Log[8]^2)/25 + (16*E^(-2 + x^2)*Log[8]^2)/(25*x^2) + (8*E^(-2 + x^2)*Log[8]^2)/(5*x) - (2*E^(
-2 + x^2)*x*Log[8]^2)/5 + (E^(-2 + x^2)*x^2*Log[8]^2)/25

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, 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 2240

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

Rule 2241

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

Rule 2243

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

Rule 2245

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^(m
+ 1)*(F^(a + b*(c + d*x)^n)/(d*(m + 1))), x] - Dist[b*n*(Log[F]/(m + 1)), Int[(c + d*x)^(m + n)*F^(a + b*(c +
d*x)^n), x], x] /; FreeQ[{F, a, b, c, d}, x] && IntegerQ[2*((m + 1)/n)] && LtQ[-4, (m + 1)/n, 5] && IntegerQ[n
] && ((GtQ[n, 0] && LtQ[m, -1]) || (GtQ[-n, 0] && LeQ[-n, m + 1]))

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}{25} \log ^2(8) \int \frac {e^{-2+x^2} \left (-32-40 x+32 x^2+70 x^3+36 x^4-20 x^5+2 x^6\right )}{x^3} \, dx \\ & = \frac {1}{25} \log ^2(8) \int \frac {2 e^{-2+x^2} \left (-16-20 x+16 x^2+35 x^3+18 x^4-10 x^5+x^6\right )}{x^3} \, dx \\ & = \frac {1}{25} \left (2 \log ^2(8)\right ) \int \frac {e^{-2+x^2} \left (-16-20 x+16 x^2+35 x^3+18 x^4-10 x^5+x^6\right )}{x^3} \, dx \\ & = \frac {1}{25} \left (2 \log ^2(8)\right ) \int \left (35 e^{-2+x^2}-\frac {16 e^{-2+x^2}}{x^3}-\frac {20 e^{-2+x^2}}{x^2}+\frac {16 e^{-2+x^2}}{x}+18 e^{-2+x^2} x-10 e^{-2+x^2} x^2+e^{-2+x^2} x^3\right ) \, dx \\ & = \frac {1}{25} \left (2 \log ^2(8)\right ) \int e^{-2+x^2} x^3 \, dx-\frac {1}{5} \left (4 \log ^2(8)\right ) \int e^{-2+x^2} x^2 \, dx-\frac {1}{25} \left (32 \log ^2(8)\right ) \int \frac {e^{-2+x^2}}{x^3} \, dx+\frac {1}{25} \left (32 \log ^2(8)\right ) \int \frac {e^{-2+x^2}}{x} \, dx+\frac {1}{25} \left (36 \log ^2(8)\right ) \int e^{-2+x^2} x \, dx-\frac {1}{5} \left (8 \log ^2(8)\right ) \int \frac {e^{-2+x^2}}{x^2} \, dx+\frac {1}{5} \left (14 \log ^2(8)\right ) \int e^{-2+x^2} \, dx \\ & = \frac {18}{25} e^{-2+x^2} \log ^2(8)+\frac {16 e^{-2+x^2} \log ^2(8)}{25 x^2}+\frac {8 e^{-2+x^2} \log ^2(8)}{5 x}-\frac {2}{5} e^{-2+x^2} x \log ^2(8)+\frac {1}{25} e^{-2+x^2} x^2 \log ^2(8)+\frac {7 \sqrt {\pi } \text {erfi}(x) \log ^2(8)}{5 e^2}+\frac {16 \text {Ei}\left (x^2\right ) \log ^2(8)}{25 e^2}-\frac {1}{25} \left (2 \log ^2(8)\right ) \int e^{-2+x^2} x \, dx+\frac {1}{5} \left (2 \log ^2(8)\right ) \int e^{-2+x^2} \, dx-\frac {1}{25} \left (32 \log ^2(8)\right ) \int \frac {e^{-2+x^2}}{x} \, dx-\frac {1}{5} \left (16 \log ^2(8)\right ) \int e^{-2+x^2} \, dx \\ & = \frac {17}{25} e^{-2+x^2} \log ^2(8)+\frac {16 e^{-2+x^2} \log ^2(8)}{25 x^2}+\frac {8 e^{-2+x^2} \log ^2(8)}{5 x}-\frac {2}{5} e^{-2+x^2} x \log ^2(8)+\frac {1}{25} e^{-2+x^2} x^2 \log ^2(8) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.92 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.93 \[ \int \frac {e^{-2+x^2} \left (-32-40 x+32 x^2+70 x^3+36 x^4-20 x^5+2 x^6\right ) \log ^2(8)}{25 x^3} \, dx=\frac {e^{-2+x^2} \left (-4-5 x+x^2\right )^2 \log ^2(8)}{25 x^2} \]

[In]

Integrate[(E^(-2 + x^2)*(-32 - 40*x + 32*x^2 + 70*x^3 + 36*x^4 - 20*x^5 + 2*x^6)*Log[8]^2)/(25*x^3),x]

[Out]

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

Maple [A] (verified)

Time = 0.17 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.87

method result size
gosper \(\frac {9 \left (x^{2}-5 x -4\right )^{2} \ln \left (2\right )^{2} {\mathrm e}^{x^{2}-2}}{25 x^{2}}\) \(26\)
risch \(\frac {9 \ln \left (2\right )^{2} \left (x^{4}-10 x^{3}+17 x^{2}+40 x +16\right ) {\mathrm e}^{x^{2}-2}}{25 x^{2}}\) \(34\)
parallelrisch \(\frac {9 \ln \left (2\right )^{2} \left (x^{4} {\mathrm e}^{x^{2}-2}-10 x^{3} {\mathrm e}^{x^{2}-2}+17 \,{\mathrm e}^{x^{2}-2} x^{2}+40 x \,{\mathrm e}^{x^{2}-2}+16 \,{\mathrm e}^{x^{2}-2}\right )}{25 x^{2}}\) \(60\)
norman \(\frac {\frac {144 \ln \left (2\right )^{2} {\mathrm e}^{x^{2}-2}}{25}+\frac {72 x \ln \left (2\right )^{2} {\mathrm e}^{x^{2}-2}}{5}+\frac {153 x^{2} \ln \left (2\right )^{2} {\mathrm e}^{x^{2}-2}}{25}-\frac {18 x^{3} \ln \left (2\right )^{2} {\mathrm e}^{x^{2}-2}}{5}+\frac {9 x^{4} \ln \left (2\right )^{2} {\mathrm e}^{x^{2}-2}}{25}}{x^{2}}\) \(76\)
default \(\frac {18 \ln \left (2\right )^{2} \left ({\mathrm e}^{-2} \left (\frac {x^{2} {\mathrm e}^{x^{2}}}{2}-\frac {{\mathrm e}^{x^{2}}}{2}\right )+\frac {35 \,{\mathrm e}^{-2} \sqrt {\pi }\, \operatorname {erfi}\left (x \right )}{2}-16 \,{\mathrm e}^{-2} \left (-\frac {{\mathrm e}^{x^{2}}}{2 x^{2}}-\frac {\operatorname {Ei}_{1}\left (-x^{2}\right )}{2}\right )-20 \,{\mathrm e}^{-2} \left (-\frac {{\mathrm e}^{x^{2}}}{x}+\sqrt {\pi }\, \operatorname {erfi}\left (x \right )\right )-8 \,{\mathrm e}^{-2} \operatorname {Ei}_{1}\left (-x^{2}\right )+9 \,{\mathrm e}^{x^{2}} {\mathrm e}^{-2}-10 \,{\mathrm e}^{-2} \left (\frac {{\mathrm e}^{x^{2}} x}{2}-\frac {\sqrt {\pi }\, \operatorname {erfi}\left (x \right )}{4}\right )\right )}{25}\) \(117\)
meijerg \(\frac {144 \ln \left (2\right )^{2} {\mathrm e}^{-2} \left (\frac {1}{x^{2}}+1-2 \ln \left (x \right )-i \pi -\frac {2 x^{2}+2}{2 x^{2}}+\frac {{\mathrm e}^{x^{2}}}{x^{2}}+\ln \left (-x^{2}\right )+\operatorname {Ei}_{1}\left (-x^{2}\right )\right )}{25}+\frac {9 \ln \left (2\right )^{2} {\mathrm e}^{-2} \left (1-\frac {\left (-2 x^{2}+2\right ) {\mathrm e}^{x^{2}}}{2}\right )}{25}-\frac {18 i \ln \left (2\right )^{2} {\mathrm e}^{-2} \left (-i {\mathrm e}^{x^{2}} x +\frac {i \sqrt {\pi }\, \operatorname {erfi}\left (x \right )}{2}\right )}{5}-\frac {162 \ln \left (2\right )^{2} {\mathrm e}^{-2} \left (1-{\mathrm e}^{x^{2}}\right )}{25}+\frac {63 \ln \left (2\right )^{2} {\mathrm e}^{-2} \sqrt {\pi }\, \operatorname {erfi}\left (x \right )}{5}+\frac {144 \ln \left (2\right )^{2} {\mathrm e}^{-2} \left (2 \ln \left (x \right )+i \pi -\ln \left (-x^{2}\right )-\operatorname {Ei}_{1}\left (-x^{2}\right )\right )}{25}-\frac {36 i \ln \left (2\right )^{2} {\mathrm e}^{-2} \left (\frac {2 i {\mathrm e}^{x^{2}}}{x}-2 i \sqrt {\pi }\, \operatorname {erfi}\left (x \right )\right )}{5}\) \(196\)

[In]

int(9/25*(2*x^6-20*x^5+36*x^4+70*x^3+32*x^2-40*x-32)*ln(2)^2*exp(x^2-2)/x^3,x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.10 \[ \int \frac {e^{-2+x^2} \left (-32-40 x+32 x^2+70 x^3+36 x^4-20 x^5+2 x^6\right ) \log ^2(8)}{25 x^3} \, dx=\frac {9 \, {\left (x^{4} - 10 \, x^{3} + 17 \, x^{2} + 40 \, x + 16\right )} e^{\left (x^{2} - 2\right )} \log \left (2\right )^{2}}{25 \, x^{2}} \]

[In]

integrate(9/25*(2*x^6-20*x^5+36*x^4+70*x^3+32*x^2-40*x-32)*log(2)^2*exp(x^2-2)/x^3,x, algorithm="fricas")

[Out]

9/25*(x^4 - 10*x^3 + 17*x^2 + 40*x + 16)*e^(x^2 - 2)*log(2)^2/x^2

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 56 vs. \(2 (27) = 54\).

Time = 0.11 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.87 \[ \int \frac {e^{-2+x^2} \left (-32-40 x+32 x^2+70 x^3+36 x^4-20 x^5+2 x^6\right ) \log ^2(8)}{25 x^3} \, dx=\frac {\left (9 x^{4} \log {\left (2 \right )}^{2} - 90 x^{3} \log {\left (2 \right )}^{2} + 153 x^{2} \log {\left (2 \right )}^{2} + 360 x \log {\left (2 \right )}^{2} + 144 \log {\left (2 \right )}^{2}\right ) e^{x^{2} - 2}}{25 x^{2}} \]

[In]

integrate(9/25*(2*x**6-20*x**5+36*x**4+70*x**3+32*x**2-40*x-32)*ln(2)**2*exp(x**2-2)/x**3,x)

[Out]

(9*x**4*log(2)**2 - 90*x**3*log(2)**2 + 153*x**2*log(2)**2 + 360*x*log(2)**2 + 144*log(2)**2)*exp(x**2 - 2)/(2
5*x**2)

Maxima [C] (verification not implemented)

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

Time = 0.21 (sec) , antiderivative size = 88, normalized size of antiderivative = 2.93 \[ \int \frac {e^{-2+x^2} \left (-32-40 x+32 x^2+70 x^3+36 x^4-20 x^5+2 x^6\right ) \log ^2(8)}{25 x^3} \, dx=-\frac {9}{25} \, {\left (40 i \, \sqrt {\pi } \operatorname {erf}\left (i \, x\right ) e^{\left (-2\right )} - 16 \, {\rm Ei}\left (x^{2}\right ) e^{\left (-2\right )} - {\left (x^{2} - 1\right )} e^{\left (x^{2} - 2\right )} + 10 \, x e^{\left (x^{2} - 2\right )} + 16 \, e^{\left (-2\right )} \Gamma \left (-1, -x^{2}\right ) - \frac {20 \, \sqrt {-x^{2}} e^{\left (-2\right )} \Gamma \left (-\frac {1}{2}, -x^{2}\right )}{x} - 18 \, e^{\left (x^{2} - 2\right )}\right )} \log \left (2\right )^{2} \]

[In]

integrate(9/25*(2*x^6-20*x^5+36*x^4+70*x^3+32*x^2-40*x-32)*log(2)^2*exp(x^2-2)/x^3,x, algorithm="maxima")

[Out]

-9/25*(40*I*sqrt(pi)*erf(I*x)*e^(-2) - 16*Ei(x^2)*e^(-2) - (x^2 - 1)*e^(x^2 - 2) + 10*x*e^(x^2 - 2) + 16*e^(-2
)*gamma(-1, -x^2) - 20*sqrt(-x^2)*e^(-2)*gamma(-1/2, -x^2)/x - 18*e^(x^2 - 2))*log(2)^2

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 51 vs. \(2 (25) = 50\).

Time = 0.26 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.70 \[ \int \frac {e^{-2+x^2} \left (-32-40 x+32 x^2+70 x^3+36 x^4-20 x^5+2 x^6\right ) \log ^2(8)}{25 x^3} \, dx=\frac {9 \, {\left (x^{4} e^{\left (x^{2}\right )} - 10 \, x^{3} e^{\left (x^{2}\right )} + 17 \, x^{2} e^{\left (x^{2}\right )} + 40 \, x e^{\left (x^{2}\right )} + 16 \, e^{\left (x^{2}\right )}\right )} e^{\left (-2\right )} \log \left (2\right )^{2}}{25 \, x^{2}} \]

[In]

integrate(9/25*(2*x^6-20*x^5+36*x^4+70*x^3+32*x^2-40*x-32)*log(2)^2*exp(x^2-2)/x^3,x, algorithm="giac")

[Out]

9/25*(x^4*e^(x^2) - 10*x^3*e^(x^2) + 17*x^2*e^(x^2) + 40*x*e^(x^2) + 16*e^(x^2))*e^(-2)*log(2)^2/x^2

Mupad [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.90 \[ \int \frac {e^{-2+x^2} \left (-32-40 x+32 x^2+70 x^3+36 x^4-20 x^5+2 x^6\right ) \log ^2(8)}{25 x^3} \, dx=\frac {9\,{\mathrm {e}}^{x^2-2}\,{\ln \left (2\right )}^2\,{\left (-x^2+5\,x+4\right )}^2}{25\,x^2} \]

[In]

int((9*exp(x^2 - 2)*log(2)^2*(32*x^2 - 40*x + 70*x^3 + 36*x^4 - 20*x^5 + 2*x^6 - 32))/(25*x^3),x)

[Out]

(9*exp(x^2 - 2)*log(2)^2*(5*x - x^2 + 4)^2)/(25*x^2)