3.54.39 \(\int \frac {1}{9} (5+2 i \pi +2 x+27 x^2+e^x (18 x+9 x^2)) \, dx\)

Optimal. Leaf size=28 \[ x+x^2 \left (e^x+x+\frac {(-2+i \pi +x)^2}{9 x^2}\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 30, normalized size of antiderivative = 1.07, number of steps used = 10, number of rules used = 5, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {12, 1593, 2196, 2176, 2194} \begin {gather*} x^3+e^x x^2+\frac {x^2}{9}+\frac {1}{9} (5+2 i \pi ) x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(5 + (2*I)*Pi + 2*x + 27*x^2 + E^x*(18*x + 9*x^2))/9,x]

[Out]

((5 + (2*I)*Pi)*x)/9 + x^2/9 + E^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]]

Rule 1593

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

Rule 2176

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] &&  !$UseGamma === True

Rule 2194

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 2196

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] &&  !$UseGamma === True

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\frac {1}{9} \int \left (5+2 i \pi +2 x+27 x^2+e^x \left (18 x+9 x^2\right )\right ) \, dx\\ &=\frac {1}{9} (5+2 i \pi ) x+\frac {x^2}{9}+x^3+\frac {1}{9} \int e^x \left (18 x+9 x^2\right ) \, dx\\ &=\frac {1}{9} (5+2 i \pi ) x+\frac {x^2}{9}+x^3+\frac {1}{9} \int e^x x (18+9 x) \, dx\\ &=\frac {1}{9} (5+2 i \pi ) x+\frac {x^2}{9}+x^3+\frac {1}{9} \int \left (18 e^x x+9 e^x x^2\right ) \, dx\\ &=\frac {1}{9} (5+2 i \pi ) x+\frac {x^2}{9}+x^3+2 \int e^x x \, dx+\int e^x x^2 \, dx\\ &=2 e^x x+\frac {1}{9} (5+2 i \pi ) x+\frac {x^2}{9}+e^x x^2+x^3-2 \int e^x \, dx-2 \int e^x x \, dx\\ &=-2 e^x+\frac {1}{9} (5+2 i \pi ) x+\frac {x^2}{9}+e^x x^2+x^3+2 \int e^x \, dx\\ &=\frac {1}{9} (5+2 i \pi ) x+\frac {x^2}{9}+e^x x^2+x^3\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 24, normalized size = 0.86 \begin {gather*} \frac {1}{9} x \left (5+2 i \pi +x+9 e^x x+9 x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(5 + (2*I)*Pi + 2*x + 27*x^2 + E^x*(18*x + 9*x^2))/9,x]

[Out]

(x*(5 + (2*I)*Pi + x + 9*E^x*x + 9*x^2))/9

________________________________________________________________________________________

fricas [A]  time = 0.52, size = 23, normalized size = 0.82 \begin {gather*} x^{3} + x^{2} e^{x} + \frac {1}{9} \, {\left (2 i \, \pi + 5\right )} x + \frac {1}{9} \, x^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/9*(9*x^2+18*x)*exp(x)+2/9*I*pi+3*x^2+2/9*x+5/9,x, algorithm="fricas")

[Out]

x^3 + x^2*e^x + 1/9*(2*I*pi + 5)*x + 1/9*x^2

________________________________________________________________________________________

giac [A]  time = 0.15, size = 22, normalized size = 0.79 \begin {gather*} x^{3} + x^{2} e^{x} + \frac {2}{9} i \, \pi x + \frac {1}{9} \, x^{2} + \frac {5}{9} \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/9*(9*x^2+18*x)*exp(x)+2/9*I*pi+3*x^2+2/9*x+5/9,x, algorithm="giac")

[Out]

x^3 + x^2*e^x + 2/9*I*pi*x + 1/9*x^2 + 5/9*x

________________________________________________________________________________________

maple [A]  time = 0.04, size = 24, normalized size = 0.86




method result size



default \(\frac {5 x}{9}+\frac {2 i x \pi }{9}+\frac {x^{2}}{9}+x^{3}+{\mathrm e}^{x} x^{2}\) \(24\)
norman \(x^{3}+\left (\frac {2 i \pi }{9}+\frac {5}{9}\right ) x +{\mathrm e}^{x} x^{2}+\frac {x^{2}}{9}\) \(24\)
risch \(\frac {5 x}{9}+\frac {2 i x \pi }{9}+\frac {x^{2}}{9}+x^{3}+{\mathrm e}^{x} x^{2}\) \(24\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/9*(9*x^2+18*x)*exp(x)+2/9*I*Pi+3*x^2+2/9*x+5/9,x,method=_RETURNVERBOSE)

[Out]

5/9*x+2/9*I*Pi*x+1/9*x^2+x^3+exp(x)*x^2

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 22, normalized size = 0.79 \begin {gather*} x^{3} + x^{2} e^{x} + \frac {2}{9} i \, \pi x + \frac {1}{9} \, x^{2} + \frac {5}{9} \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/9*(9*x^2+18*x)*exp(x)+2/9*I*pi+3*x^2+2/9*x+5/9,x, algorithm="maxima")

[Out]

x^3 + x^2*e^x + 2/9*I*pi*x + 1/9*x^2 + 5/9*x

________________________________________________________________________________________

mupad [B]  time = 3.44, size = 23, normalized size = 0.82 \begin {gather*} x^2\,{\mathrm {e}}^x+\frac {x^2}{9}+x^3+x\,\left (\frac {5}{9}+\frac {\Pi \,2{}\mathrm {i}}{9}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((Pi*2i)/9 + (2*x)/9 + (exp(x)*(18*x + 9*x^2))/9 + 3*x^2 + 5/9,x)

[Out]

x^2*exp(x) + x^2/9 + x^3 + x*((Pi*2i)/9 + 5/9)

________________________________________________________________________________________

sympy [A]  time = 0.12, size = 26, normalized size = 0.93 \begin {gather*} x^{3} + x^{2} e^{x} + \frac {x^{2}}{9} + x \left (\frac {5}{9} + \frac {2 i \pi }{9}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/9*(9*x**2+18*x)*exp(x)+2/9*I*pi+3*x**2+2/9*x+5/9,x)

[Out]

x**3 + x**2*exp(x) + x**2/9 + x*(5/9 + 2*I*pi/9)

________________________________________________________________________________________