\(\int \frac {1}{3} (-7-e+3 e^2+6 x-9 x^2) \, dx\) [3352]

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

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.76, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.045, Rules used = {12} \[ \int \frac {1}{3} \left (-7-e+3 e^2+6 x-9 x^2\right ) \, dx=-x^3+x^2-\frac {1}{3} \left (7+e-3 e^2\right ) x \]

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

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

Mathematica [A] (verified)

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

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.35 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.69

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

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.72 \[ \int \frac {1}{3} \left (-7-e+3 e^2+6 x-9 x^2\right ) \, dx=-x^{3} + x^{2} + x e^{2} - \frac {1}{3} \, x e - \frac {7}{3} \, x \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

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

[In]

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

[Out]

-x**3 + x**2 + x*(-7/3 - E/3 + exp(2))

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.72 \[ \int \frac {1}{3} \left (-7-e+3 e^2+6 x-9 x^2\right ) \, dx=-x^{3} + x^{2} + x e^{2} - \frac {1}{3} \, x e - \frac {7}{3} \, x \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 8.74 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.76 \[ \int \frac {1}{3} \left (-7-e+3 e^2+6 x-9 x^2\right ) \, dx=-x^3+x^2+\left ({\mathrm {e}}^2-\frac {\mathrm {e}}{3}-\frac {7}{3}\right )\,x \]

[In]

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

[Out]

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