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

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

Optimal result

Integrand size = 25, antiderivative size = 21 \[ \int \frac {-e^{3+x} x+e^3 \left (-1+x+2 x^2\right )}{x} \, dx=e^3 \left (-1-e^x+x+x^2+\log \left (\frac {2}{x}\right )\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.29, number of steps used = 5, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {14, 2225, 77} \[ \int \frac {-e^{3+x} x+e^3 \left (-1+x+2 x^2\right )}{x} \, dx=e^3 x^2+e^3 x-e^{x+3}-e^3 \log (x) \]

[In]

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

[Out]

-E^(3 + x) + E^3*x + E^3*x^2 - E^3*Log[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 77

Int[((d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_))*((e_) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*
x)*(d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, d, e, f, n}, x] && IGtQ[p, 0] && (NeQ[n, -1] || EqQ[p, 1]) && N
eQ[b*e + a*f, 0] && ( !IntegerQ[n] || LtQ[9*p + 5*n, 0] || GeQ[n + p + 1, 0] || (GeQ[n + p + 2, 0] && Rational
Q[a, b, d, e, f])) && (NeQ[n + p + 3, 0] || EqQ[p, 1])

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]

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.15 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.95

method result size
parts \({\mathrm e}^{3} \left (x^{2}-\ln \left (x \right )+x \right )-{\mathrm e}^{x} {\mathrm e}^{3}\) \(20\)
default \(x^{2} {\mathrm e}^{3}-\ln \left (x \right ) {\mathrm e}^{3}-{\mathrm e}^{x} {\mathrm e}^{3}+x \,{\mathrm e}^{3}\) \(24\)
norman \(x^{2} {\mathrm e}^{3}-\ln \left (x \right ) {\mathrm e}^{3}-{\mathrm e}^{x} {\mathrm e}^{3}+x \,{\mathrm e}^{3}\) \(24\)
risch \(x^{2} {\mathrm e}^{3}-\ln \left (x \right ) {\mathrm e}^{3}+x \,{\mathrm e}^{3}-{\mathrm e}^{3+x}\) \(24\)
parallelrisch \(x^{2} {\mathrm e}^{3}-\ln \left (x \right ) {\mathrm e}^{3}-{\mathrm e}^{x} {\mathrm e}^{3}+x \,{\mathrm e}^{3}\) \(24\)

[In]

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

[Out]

exp(3)*(x^2-ln(x)+x)-exp(x)*exp(3)

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

x**2*exp(3) + x*exp(3) - exp(3)*exp(x) - exp(3)*log(x)

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

exp(3)*(x - exp(x) - log(x) + x^2)