\(\int \frac {9 x^2+4 x^3+e^x (-6 x-6 x^2-x^3)}{2 \log (9)} \, dx\) [6562]

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

Optimal result

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

[Out]

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(51\) vs. \(2(21)=42\).

Time = 0.06 (sec) , antiderivative size = 51, normalized size of antiderivative = 2.43, number of steps used = 14, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.135, Rules used = {12, 1608, 2227, 2207, 2225} \[ \int \frac {9 x^2+4 x^3+e^x \left (-6 x-6 x^2-x^3\right )}{2 \log (9)} \, dx=\frac {x^4}{2 \log (9)}-\frac {e^x x^3}{2 \log (9)}+\frac {3 x^3}{2 \log (9)}-\frac {3 e^x x^2}{2 \log (9)} \]

[In]

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

[Out]

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

Rule 12

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

Rule 1608

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^
(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] && PosQ[r - p]

Rule 2207

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^m*
((b*F^(g*(e + f*x)))^n/(f*g*n*Log[F])), x] - Dist[d*(m/(f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !TrueQ[$UseGamma]

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]

Rule 2227

Int[(F_)^((c_.)*(v_))*(u_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), u, x], x] /; FreeQ[{F, c
}, x] && PolynomialQ[u, x] && LinearQ[v, x] &&  !TrueQ[$UseGamma]

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

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.90 \[ \int \frac {9 x^2+4 x^3+e^x \left (-6 x-6 x^2-x^3\right )}{2 \log (9)} \, dx=-\frac {\left (e^x-x\right ) x^2 (3+x)}{\log (81)} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.12 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.43

method result size
default \(\frac {-3 \,{\mathrm e}^{x} x^{2}-{\mathrm e}^{x} x^{3}+3 x^{3}+x^{4}}{4 \ln \left (3\right )}\) \(30\)
parallelrisch \(\frac {-3 \,{\mathrm e}^{x} x^{2}-{\mathrm e}^{x} x^{3}+3 x^{3}+x^{4}}{4 \ln \left (3\right )}\) \(30\)
parts \(\frac {x^{4}+3 x^{3}}{4 \ln \left (3\right )}-\frac {{\mathrm e}^{x} x^{3}+3 \,{\mathrm e}^{x} x^{2}}{4 \ln \left (3\right )}\) \(37\)
risch \(\frac {x^{4}}{4 \ln \left (3\right )}+\frac {3 x^{3}}{4 \ln \left (3\right )}+\frac {\left (-x^{3}-3 x^{2}\right ) {\mathrm e}^{x}}{4 \ln \left (3\right )}\) \(39\)
norman \(\frac {3 x^{3}}{4 \ln \left (3\right )}+\frac {x^{4}}{4 \ln \left (3\right )}-\frac {3 x^{2} {\mathrm e}^{x}}{4 \ln \left (3\right )}-\frac {x^{3} {\mathrm e}^{x}}{4 \ln \left (3\right )}\) \(42\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.33 \[ \int \frac {9 x^2+4 x^3+e^x \left (-6 x-6 x^2-x^3\right )}{2 \log (9)} \, dx=\frac {x^{4} + 3 \, x^{3} - {\left (x^{3} + 3 \, x^{2}\right )} e^{x}}{4 \, \log \left (3\right )} \]

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 36 vs. \(2 (15) = 30\).

Time = 0.07 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.71 \[ \int \frac {9 x^2+4 x^3+e^x \left (-6 x-6 x^2-x^3\right )}{2 \log (9)} \, dx=\frac {x^{4}}{4 \log {\left (3 \right )}} + \frac {3 x^{3}}{4 \log {\left (3 \right )}} + \frac {\left (- x^{3} - 3 x^{2}\right ) e^{x}}{4 \log {\left (3 \right )}} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.33 \[ \int \frac {9 x^2+4 x^3+e^x \left (-6 x-6 x^2-x^3\right )}{2 \log (9)} \, dx=\frac {x^{4} + 3 \, x^{3} - {\left (x^{3} + 3 \, x^{2}\right )} e^{x}}{4 \, \log \left (3\right )} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.33 \[ \int \frac {9 x^2+4 x^3+e^x \left (-6 x-6 x^2-x^3\right )}{2 \log (9)} \, dx=\frac {x^{4} + 3 \, x^{3} - {\left (x^{3} + 3 \, x^{2}\right )} e^{x}}{4 \, \log \left (3\right )} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.43 \[ \int \frac {9 x^2+4 x^3+e^x \left (-6 x-6 x^2-x^3\right )}{2 \log (9)} \, dx=-\frac {3\,x^2\,{\mathrm {e}}^x+x^3\,{\mathrm {e}}^x-3\,x^3-x^4}{4\,\ln \left (3\right )} \]

[In]

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

[Out]

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