\(\int \frac {e^4 x^2+e^{2 x} (-16+32 x-16 e^2 x^2+e^4 (1-2 x+3 x^2+2 x^3)) \log ^2(2)}{e^4 x^2} \, dx\) [621]

   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 = 57, antiderivative size = 29 \[ \int \frac {e^4 x^2+e^{2 x} \left (-16+32 x-16 e^2 x^2+e^4 \left (1-2 x+3 x^2+2 x^3\right )\right ) \log ^2(2)}{e^4 x^2} \, dx=x+\frac {e^{2 x} \left (-1+\left (\frac {4}{e^2}-x\right )^2+x\right ) \log ^2(2)}{x} \]

[Out]

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

Rubi [B] (verified)

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

Time = 0.12 (sec) , antiderivative size = 70, normalized size of antiderivative = 2.41, number of steps used = 11, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.123, Rules used = {12, 14, 2230, 2225, 2208, 2209, 2207} \[ \int \frac {e^4 x^2+e^{2 x} \left (-16+32 x-16 e^2 x^2+e^4 \left (1-2 x+3 x^2+2 x^3\right )\right ) \log ^2(2)}{e^4 x^2} \, dx=x+e^{2 x} x \log ^2(2)-\frac {1}{2} e^{2 x} \log ^2(2)-\frac {1}{2} \left (16-3 e^2\right ) e^{2 x-2} \log ^2(2)+\frac {\left (16-e^4\right ) e^{2 x-4} \log ^2(2)}{x} \]

[In]

Int[(E^4*x^2 + E^(2*x)*(-16 + 32*x - 16*E^2*x^2 + E^4*(1 - 2*x + 3*x^2 + 2*x^3))*Log[2]^2)/(E^4*x^2),x]

[Out]

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

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

Rubi steps \begin{align*} \text {integral}& = \frac {\int \frac {e^4 x^2+e^{2 x} \left (-16+32 x-16 e^2 x^2+e^4 \left (1-2 x+3 x^2+2 x^3\right )\right ) \log ^2(2)}{x^2} \, dx}{e^4} \\ & = \frac {\int \left (e^4+\frac {e^{2 x} \left (-16+e^4+2 \left (16-e^4\right ) x-e^2 \left (16-3 e^2\right ) x^2+2 e^4 x^3\right ) \log ^2(2)}{x^2}\right ) \, dx}{e^4} \\ & = x+\frac {\log ^2(2) \int \frac {e^{2 x} \left (-16+e^4+2 \left (16-e^4\right ) x-e^2 \left (16-3 e^2\right ) x^2+2 e^4 x^3\right )}{x^2} \, dx}{e^4} \\ & = x+\frac {\log ^2(2) \int \left (e^{2+2 x} \left (-16+3 e^2\right )+\frac {e^{2 x} \left (-16+e^4\right )}{x^2}-\frac {2 e^{2 x} \left (-16+e^4\right )}{x}+2 e^{4+2 x} x\right ) \, dx}{e^4} \\ & = x+\frac {\left (2 \log ^2(2)\right ) \int e^{4+2 x} x \, dx}{e^4}-\frac {\left (\left (16-3 e^2\right ) \log ^2(2)\right ) \int e^{2+2 x} \, dx}{e^4}-\frac {\left (\left (16-e^4\right ) \log ^2(2)\right ) \int \frac {e^{2 x}}{x^2} \, dx}{e^4}+\frac {\left (2 \left (16-e^4\right ) \log ^2(2)\right ) \int \frac {e^{2 x}}{x} \, dx}{e^4} \\ & = x-\frac {1}{2} e^{-2+2 x} \left (16-3 e^2\right ) \log ^2(2)+\frac {e^{-4+2 x} \left (16-e^4\right ) \log ^2(2)}{x}+e^{2 x} x \log ^2(2)+\frac {2 \left (16-e^4\right ) \operatorname {ExpIntegralEi}(2 x) \log ^2(2)}{e^4}-\frac {\log ^2(2) \int e^{4+2 x} \, dx}{e^4}-\frac {\left (2 \left (16-e^4\right ) \log ^2(2)\right ) \int \frac {e^{2 x}}{x} \, dx}{e^4} \\ & = x-\frac {1}{2} e^{2 x} \log ^2(2)-\frac {1}{2} e^{-2+2 x} \left (16-3 e^2\right ) \log ^2(2)+\frac {e^{-4+2 x} \left (16-e^4\right ) \log ^2(2)}{x}+e^{2 x} x \log ^2(2) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.59 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.28 \[ \int \frac {e^4 x^2+e^{2 x} \left (-16+32 x-16 e^2 x^2+e^4 \left (1-2 x+3 x^2+2 x^3\right )\right ) \log ^2(2)}{e^4 x^2} \, dx=x+e^{2 x} \left (\frac {-8+e^2}{e^2}+\frac {16-e^4}{e^4 x}+x\right ) \log ^2(2) \]

[In]

Integrate[(E^4*x^2 + E^(2*x)*(-16 + 32*x - 16*E^2*x^2 + E^4*(1 - 2*x + 3*x^2 + 2*x^3))*Log[2]^2)/(E^4*x^2),x]

[Out]

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

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.31

method result size
risch \(x +\frac {\left (x^{2} {\mathrm e}^{4}+x \,{\mathrm e}^{4}-{\mathrm e}^{4}-8 \,{\mathrm e}^{2} x +16\right ) \ln \left (2\right )^{2} {\mathrm e}^{2 x -4}}{x}\) \(38\)
norman \(\frac {\left (x^{2} {\mathrm e}^{2}+{\mathrm e}^{2} \ln \left (2\right )^{2} {\mathrm e}^{2 x} x^{2}+\ln \left (2\right )^{2} \left ({\mathrm e}^{2}-8\right ) x \,{\mathrm e}^{2 x}-\ln \left (2\right )^{2} \left ({\mathrm e}^{4}-16\right ) {\mathrm e}^{-2} {\mathrm e}^{2 x}\right ) {\mathrm e}^{-2}}{x}\) \(64\)
parts \(x +x \ln \left (2\right )^{2} {\mathrm e}^{2 x}+\ln \left (2\right )^{2} {\mathrm e}^{2 x}+\frac {16 \ln \left (2\right )^{2} {\mathrm e}^{-4} {\mathrm e}^{2 x}}{x}-8 \ln \left (2\right )^{2} {\mathrm e}^{-2} {\mathrm e}^{2 x}-\frac {\ln \left (2\right )^{2} {\mathrm e}^{2 x}}{x}\) \(66\)
parallelrisch \(\frac {{\mathrm e}^{-4} \left ({\mathrm e}^{4} \ln \left (2\right )^{2} {\mathrm e}^{2 x} x^{2}+{\mathrm e}^{4} \ln \left (2\right )^{2} {\mathrm e}^{2 x} x -{\mathrm e}^{4} \ln \left (2\right )^{2} {\mathrm e}^{2 x}-8 \,{\mathrm e}^{2} \ln \left (2\right )^{2} x \,{\mathrm e}^{2 x}+x^{2} {\mathrm e}^{4}+16 \ln \left (2\right )^{2} {\mathrm e}^{2 x}\right )}{x}\) \(85\)
default \({\mathrm e}^{-4} \left (x \,{\mathrm e}^{4}+\frac {\ln \left (2\right )^{2} {\mathrm e}^{4} \left (2 x \,{\mathrm e}^{2 x}-{\mathrm e}^{2 x}\right )}{2}-32 \ln \left (2\right )^{2} \left (-\frac {{\mathrm e}^{2 x}}{2 x}-\operatorname {Ei}_{1}\left (-2 x \right )\right )-32 \ln \left (2\right )^{2} \operatorname {Ei}_{1}\left (-2 x \right )-8 \ln \left (2\right )^{2} {\mathrm e}^{2 x} {\mathrm e}^{2}+\frac {3 \,{\mathrm e}^{4} \ln \left (2\right )^{2} {\mathrm e}^{2 x}}{2}+2 \ln \left (2\right )^{2} {\mathrm e}^{4} \left (-\frac {{\mathrm e}^{2 x}}{2 x}-\operatorname {Ei}_{1}\left (-2 x \right )\right )+2 \ln \left (2\right )^{2} {\mathrm e}^{4} \operatorname {Ei}_{1}\left (-2 x \right )\right )\) \(139\)
derivativedivides \(\frac {{\mathrm e}^{-4} \left (2 x \,{\mathrm e}^{4}+\ln \left (2\right )^{2} {\mathrm e}^{4} \left (2 x \,{\mathrm e}^{2 x}-{\mathrm e}^{2 x}\right )-64 \ln \left (2\right )^{2} \left (-\frac {{\mathrm e}^{2 x}}{2 x}-\operatorname {Ei}_{1}\left (-2 x \right )\right )-64 \ln \left (2\right )^{2} \operatorname {Ei}_{1}\left (-2 x \right )-16 \ln \left (2\right )^{2} {\mathrm e}^{2 x} {\mathrm e}^{2}+3 \,{\mathrm e}^{4} \ln \left (2\right )^{2} {\mathrm e}^{2 x}+4 \ln \left (2\right )^{2} {\mathrm e}^{4} \left (-\frac {{\mathrm e}^{2 x}}{2 x}-\operatorname {Ei}_{1}\left (-2 x \right )\right )+4 \ln \left (2\right )^{2} {\mathrm e}^{4} \operatorname {Ei}_{1}\left (-2 x \right )\right )}{2}\) \(140\)

[In]

int((((2*x^3+3*x^2-2*x+1)*exp(2)^2-16*x^2*exp(2)+32*x-16)*ln(2)^2*exp(2*x)+x^2*exp(2)^2)/x^2/exp(2)^2,x,method
=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.31 \[ \int \frac {e^4 x^2+e^{2 x} \left (-16+32 x-16 e^2 x^2+e^4 \left (1-2 x+3 x^2+2 x^3\right )\right ) \log ^2(2)}{e^4 x^2} \, dx=\frac {{\left ({\left ({\left (x^{2} + x - 1\right )} e^{4} - 8 \, x e^{2} + 16\right )} e^{\left (2 \, x\right )} \log \left (2\right )^{2} + x^{2} e^{4}\right )} e^{\left (-4\right )}}{x} \]

[In]

integrate((((2*x^3+3*x^2-2*x+1)*exp(2)^2-16*x^2*exp(2)+32*x-16)*log(2)^2*exp(2*x)+x^2*exp(2)^2)/x^2/exp(2)^2,x
, algorithm="fricas")

[Out]

(((x^2 + x - 1)*e^4 - 8*x*e^2 + 16)*e^(2*x)*log(2)^2 + x^2*e^4)*e^(-4)/x

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 60 vs. \(2 (24) = 48\).

Time = 0.08 (sec) , antiderivative size = 60, normalized size of antiderivative = 2.07 \[ \int \frac {e^4 x^2+e^{2 x} \left (-16+32 x-16 e^2 x^2+e^4 \left (1-2 x+3 x^2+2 x^3\right )\right ) \log ^2(2)}{e^4 x^2} \, dx=x + \frac {\left (x^{2} e^{4} \log {\left (2 \right )}^{2} - 8 x e^{2} \log {\left (2 \right )}^{2} + x e^{4} \log {\left (2 \right )}^{2} - e^{4} \log {\left (2 \right )}^{2} + 16 \log {\left (2 \right )}^{2}\right ) e^{2 x}}{x e^{4}} \]

[In]

integrate((((2*x**3+3*x**2-2*x+1)*exp(2)**2-16*x**2*exp(2)+32*x-16)*ln(2)**2*exp(2*x)+x**2*exp(2)**2)/x**2/exp
(2)**2,x)

[Out]

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

Maxima [C] (verification not implemented)

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

Time = 0.24 (sec) , antiderivative size = 100, normalized size of antiderivative = 3.45 \[ \int \frac {e^4 x^2+e^{2 x} \left (-16+32 x-16 e^2 x^2+e^4 \left (1-2 x+3 x^2+2 x^3\right )\right ) \log ^2(2)}{e^4 x^2} \, dx=-\frac {1}{2} \, {\left (4 \, {\rm Ei}\left (2 \, x\right ) e^{4} \log \left (2\right )^{2} - {\left (2 \, x e^{4} - e^{4}\right )} e^{\left (2 \, x\right )} \log \left (2\right )^{2} - 4 \, e^{4} \Gamma \left (-1, -2 \, x\right ) \log \left (2\right )^{2} - 64 \, {\rm Ei}\left (2 \, x\right ) \log \left (2\right )^{2} - 3 \, e^{\left (2 \, x + 4\right )} \log \left (2\right )^{2} + 16 \, e^{\left (2 \, x + 2\right )} \log \left (2\right )^{2} + 64 \, \Gamma \left (-1, -2 \, x\right ) \log \left (2\right )^{2} - 2 \, x e^{4}\right )} e^{\left (-4\right )} \]

[In]

integrate((((2*x^3+3*x^2-2*x+1)*exp(2)^2-16*x^2*exp(2)+32*x-16)*log(2)^2*exp(2*x)+x^2*exp(2)^2)/x^2/exp(2)^2,x
, algorithm="maxima")

[Out]

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

Giac [B] (verification not implemented)

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

Time = 0.30 (sec) , antiderivative size = 74, normalized size of antiderivative = 2.55 \[ \int \frac {e^4 x^2+e^{2 x} \left (-16+32 x-16 e^2 x^2+e^4 \left (1-2 x+3 x^2+2 x^3\right )\right ) \log ^2(2)}{e^4 x^2} \, dx=\frac {{\left (x^{2} e^{\left (2 \, x + 4\right )} \log \left (2\right )^{2} + x e^{\left (2 \, x + 4\right )} \log \left (2\right )^{2} - 8 \, x e^{\left (2 \, x + 2\right )} \log \left (2\right )^{2} + x^{2} e^{4} + 16 \, e^{\left (2 \, x\right )} \log \left (2\right )^{2} - e^{\left (2 \, x + 4\right )} \log \left (2\right )^{2}\right )} e^{\left (-4\right )}}{x} \]

[In]

integrate((((2*x^3+3*x^2-2*x+1)*exp(2)^2-16*x^2*exp(2)+32*x-16)*log(2)^2*exp(2*x)+x^2*exp(2)^2)/x^2/exp(2)^2,x
, algorithm="giac")

[Out]

(x^2*e^(2*x + 4)*log(2)^2 + x*e^(2*x + 4)*log(2)^2 - 8*x*e^(2*x + 2)*log(2)^2 + x^2*e^4 + 16*e^(2*x)*log(2)^2
- e^(2*x + 4)*log(2)^2)*e^(-4)/x

Mupad [B] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 58, normalized size of antiderivative = 2.00 \[ \int \frac {e^4 x^2+e^{2 x} \left (-16+32 x-16 e^2 x^2+e^4 \left (1-2 x+3 x^2+2 x^3\right )\right ) \log ^2(2)}{e^4 x^2} \, dx=x\,\left ({\mathrm {e}}^{2\,x}\,{\ln \left (2\right )}^2+1\right )-{\mathrm {e}}^{2\,x}\,\left (8\,{\mathrm {e}}^{-2}\,{\ln \left (2\right )}^2-{\ln \left (2\right )}^2\right )+\frac {{\mathrm {e}}^{2\,x}\,\left (16\,{\mathrm {e}}^{-4}\,{\ln \left (2\right )}^2-{\ln \left (2\right )}^2\right )}{x} \]

[In]

int((exp(-4)*(x^2*exp(4) + exp(2*x)*log(2)^2*(32*x + exp(4)*(3*x^2 - 2*x + 2*x^3 + 1) - 16*x^2*exp(2) - 16)))/
x^2,x)

[Out]

x*(exp(2*x)*log(2)^2 + 1) - exp(2*x)*(8*exp(-2)*log(2)^2 - log(2)^2) + (exp(2*x)*(16*exp(-4)*log(2)^2 - log(2)
^2))/x