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

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

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.83, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {6, 12, 14} \[ \int \frac {-\frac {3 e^2}{x}+6 x-3 e^3 x-2 x^2}{3 x} \, dx=-\frac {x^2}{3}+\left (2-e^3\right ) x+\frac {e^2}{x} \]

[In]

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

[Out]

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

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, x]

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

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

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.83 \[ \int \frac {-\frac {3 e^2}{x}+6 x-3 e^3 x-2 x^2}{3 x} \, dx=\frac {e^2}{x}+2 x-e^3 x-\frac {x^2}{3} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.07 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.72

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

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.86 \[ \int \frac {-\frac {3 e^2}{x}+6 x-3 e^3 x-2 x^2}{3 x} \, dx=-\frac {x^{3} + 3 \, x^{2} e^{3} - 6 \, x^{2} - 3 \, e^{2}}{3 \, x} \]

[In]

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

[Out]

-1/3*(x^3 + 3*x^2*e^3 - 6*x^2 - 3*e^2)/x

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.69 \[ \int \frac {-\frac {3 e^2}{x}+6 x-3 e^3 x-2 x^2}{3 x} \, dx=-\frac {1}{3} \, x^{2} - x e^{3} + 2 \, x + \frac {e^{2}}{x} \]

[In]

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

[Out]

-1/3*x^2 - x*e^3 + 2*x + e^2/x

Mupad [B] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.79 \[ \int \frac {-\frac {3 e^2}{x}+6 x-3 e^3 x-2 x^2}{3 x} \, dx=-\frac {\frac {x^3}{3}+\left ({\mathrm {e}}^3-2\right )\,x^2-{\mathrm {e}}^2}{x} \]

[In]

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

[Out]

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