\(\int \frac {4 x^2+24 x^4+e^{2 x} (-1+2 x)}{x^2} \, dx\) [4253]

   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 = 26, antiderivative size = 22 \[ \int \frac {4 x^2+24 x^4+e^{2 x} (-1+2 x)}{x^2} \, dx=\frac {e^{2 x}}{x}+2 x+x \left (2+8 x^2\right ) \]

[Out]

2*x+(8*x^2+2)*x+exp(x)^2/x

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.82, number of steps used = 4, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {14, 2228} \[ \int \frac {4 x^2+24 x^4+e^{2 x} (-1+2 x)}{x^2} \, dx=8 x^3+4 x+\frac {e^{2 x}}{x} \]

[In]

Int[(4*x^2 + 24*x^4 + E^(2*x)*(-1 + 2*x))/x^2,x]

[Out]

E^(2*x)/x + 4*x + 8*x^3

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

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

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.82 \[ \int \frac {4 x^2+24 x^4+e^{2 x} (-1+2 x)}{x^2} \, dx=\frac {e^{2 x}}{x}+4 x+8 x^3 \]

[In]

Integrate[(4*x^2 + 24*x^4 + E^(2*x)*(-1 + 2*x))/x^2,x]

[Out]

E^(2*x)/x + 4*x + 8*x^3

Maple [A] (verified)

Time = 0.90 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.82

method result size
default \(8 x^{3}+4 x +\frac {{\mathrm e}^{2 x}}{x}\) \(18\)
risch \(8 x^{3}+4 x +\frac {{\mathrm e}^{2 x}}{x}\) \(18\)
parts \(8 x^{3}+4 x +\frac {{\mathrm e}^{2 x}}{x}\) \(18\)
norman \(\frac {8 x^{4}+4 x^{2}+{\mathrm e}^{2 x}}{x}\) \(20\)
parallelrisch \(\frac {8 x^{4}+4 x^{2}+{\mathrm e}^{2 x}}{x}\) \(20\)

[In]

int(((-1+2*x)*exp(x)^2+24*x^4+4*x^2)/x^2,x,method=_RETURNVERBOSE)

[Out]

8*x^3+4*x+exp(x)^2/x

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.86 \[ \int \frac {4 x^2+24 x^4+e^{2 x} (-1+2 x)}{x^2} \, dx=\frac {8 \, x^{4} + 4 \, x^{2} + e^{\left (2 \, x\right )}}{x} \]

[In]

integrate(((-1+2*x)*exp(x)^2+24*x^4+4*x^2)/x^2,x, algorithm="fricas")

[Out]

(8*x^4 + 4*x^2 + e^(2*x))/x

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.64 \[ \int \frac {4 x^2+24 x^4+e^{2 x} (-1+2 x)}{x^2} \, dx=8 x^{3} + 4 x + \frac {e^{2 x}}{x} \]

[In]

integrate(((-1+2*x)*exp(x)**2+24*x**4+4*x**2)/x**2,x)

[Out]

8*x**3 + 4*x + exp(2*x)/x

Maxima [C] (verification not implemented)

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

Time = 0.21 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00 \[ \int \frac {4 x^2+24 x^4+e^{2 x} (-1+2 x)}{x^2} \, dx=8 \, x^{3} + 4 \, x + 2 \, {\rm Ei}\left (2 \, x\right ) - 2 \, \Gamma \left (-1, -2 \, x\right ) \]

[In]

integrate(((-1+2*x)*exp(x)^2+24*x^4+4*x^2)/x^2,x, algorithm="maxima")

[Out]

8*x^3 + 4*x + 2*Ei(2*x) - 2*gamma(-1, -2*x)

Giac [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.86 \[ \int \frac {4 x^2+24 x^4+e^{2 x} (-1+2 x)}{x^2} \, dx=\frac {8 \, x^{4} + 4 \, x^{2} + e^{\left (2 \, x\right )}}{x} \]

[In]

integrate(((-1+2*x)*exp(x)^2+24*x^4+4*x^2)/x^2,x, algorithm="giac")

[Out]

(8*x^4 + 4*x^2 + e^(2*x))/x

Mupad [B] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.86 \[ \int \frac {4 x^2+24 x^4+e^{2 x} (-1+2 x)}{x^2} \, dx=4\,x\,\left (2\,x^2+1\right )+\frac {{\mathrm {e}}^{2\,x}}{x} \]

[In]

int((exp(2*x)*(2*x - 1) + 4*x^2 + 24*x^4)/x^2,x)

[Out]

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