\(\int \frac {\frac {e^{2 x} (1-2 x)}{x}-3 x+2 x^2}{x} \, dx\) [6110]

   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 = 27, antiderivative size = 25 \[ \int \frac {\frac {e^{2 x} (1-2 x)}{x}-3 x+2 x^2}{x} \, dx=-7-\frac {e^2}{4}-\frac {e^{2 x}}{x}-3 x+x^2 \]

[Out]

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

Rubi [A] (verified)

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

[In]

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

[Out]

-(E^(2*x)/x) - 3*x + x^2

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 (-3+2 x-\frac {e^{2 x} (-1+2 x)}{x^2}\right ) \, dx \\ & = -3 x+x^2-\int \frac {e^{2 x} (-1+2 x)}{x^2} \, dx \\ & = -\frac {e^{2 x}}{x}-3 x+x^2 \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.68 \[ \int \frac {\frac {e^{2 x} (1-2 x)}{x}-3 x+2 x^2}{x} \, dx=-\frac {e^{2 x}}{x}-3 x+x^2 \]

[In]

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

[Out]

-(E^(2*x)/x) - 3*x + x^2

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.68

method result size
risch \(x^{2}-3 x -\frac {{\mathrm e}^{2 x}}{x}\) \(17\)
default \(x^{2}-3 x -{\mathrm e}^{2 x -\ln \left (x \right )}\) \(19\)
norman \(x^{2}-3 x -{\mathrm e}^{2 x -\ln \left (x \right )}\) \(19\)
parallelrisch \(x^{2}-3 x -{\mathrm e}^{2 x -\ln \left (x \right )}\) \(19\)
parts \(x^{2}-3 x -{\mathrm e}^{2 x -\ln \left (x \right )}\) \(19\)

[In]

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

[Out]

x^2-3*x-exp(2*x)/x

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.72 \[ \int \frac {\frac {e^{2 x} (1-2 x)}{x}-3 x+2 x^2}{x} \, dx=x^{2} - 3 \, x - e^{\left (2 \, x - \log \left (x\right )\right )} \]

[In]

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

[Out]

x^2 - 3*x - e^(2*x - log(x))

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.48 \[ \int \frac {\frac {e^{2 x} (1-2 x)}{x}-3 x+2 x^2}{x} \, dx=x^{2} - 3 x - \frac {e^{2 x}}{x} \]

[In]

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

[Out]

x**2 - 3*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.22 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.80 \[ \int \frac {\frac {e^{2 x} (1-2 x)}{x}-3 x+2 x^2}{x} \, dx=x^{2} - 3 \, x - 2 \, {\rm Ei}\left (2 \, x\right ) + 2 \, \Gamma \left (-1, -2 \, x\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.76 \[ \int \frac {\frac {e^{2 x} (1-2 x)}{x}-3 x+2 x^2}{x} \, dx=\frac {x^{3} - 3 \, x^{2} - e^{\left (2 \, x\right )}}{x} \]

[In]

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

[Out]

(x^3 - 3*x^2 - e^(2*x))/x

Mupad [B] (verification not implemented)

Time = 10.82 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.60 \[ \int \frac {\frac {e^{2 x} (1-2 x)}{x}-3 x+2 x^2}{x} \, dx=x\,\left (x-3\right )-\frac {{\mathrm {e}}^{2\,x}}{x} \]

[In]

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

[Out]

x*(x - 3) - exp(2*x)/x