3.7.87 \(\int \frac {-12+e^{3+2 x+x^2} (4 x^2+4 x^3)}{x^2} \, dx\)

Optimal. Leaf size=27 \[ \frac {2 \left (4+\left (e^{x \left (2+\frac {3}{x}+x\right )}+\frac {2}{x}\right ) x\right )}{x} \]

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 18, normalized size of antiderivative = 0.67, number of steps used = 3, number of rules used = 2, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {14, 2236} \begin {gather*} 2 e^{x^2+2 x+3}+\frac {12}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

2*E^(3 + 2*x + x^2) + 12/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 2236

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)*((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[(e*F^(a + b*x + c*x^2))/(
2*c*Log[F]), x] /; FreeQ[{F, a, b, c, d, e}, x] && EqQ[b*e - 2*c*d, 0]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-\frac {12}{x^2}+4 e^{3+2 x+x^2} (1+x)\right ) \, dx\\ &=\frac {12}{x}+4 \int e^{3+2 x+x^2} (1+x) \, dx\\ &=2 e^{3+2 x+x^2}+\frac {12}{x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 18, normalized size = 0.67 \begin {gather*} 2 e^{3+2 x+x^2}+\frac {12}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.59, size = 18, normalized size = 0.67 \begin {gather*} \frac {2 \, {\left (x e^{\left (x^{2} + 2 \, x + 3\right )} + 6\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.28, size = 18, normalized size = 0.67 \begin {gather*} \frac {2 \, {\left (x e^{\left (x^{2} + 2 \, x + 3\right )} + 6\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.02, size = 18, normalized size = 0.67




method result size



default \(\frac {12}{x}+2 \,{\mathrm e}^{x^{2}+2 x +3}\) \(18\)
risch \(\frac {12}{x}+2 \,{\mathrm e}^{x^{2}+2 x +3}\) \(18\)
norman \(\frac {12+2 x \,{\mathrm e}^{x^{2}+2 x +3}}{x}\) \(19\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [C]  time = 0.66, size = 60, normalized size = 2.22 \begin {gather*} -2 i \, \sqrt {\pi } \operatorname {erf}\left (i \, x + i\right ) e^{2} - 2 \, {\left (\frac {\sqrt {\pi } {\left (x + 1\right )} {\left (\operatorname {erf}\left (\sqrt {-{\left (x + 1\right )}^{2}}\right ) - 1\right )}}{\sqrt {-{\left (x + 1\right )}^{2}}} - e^{\left ({\left (x + 1\right )}^{2}\right )}\right )} e^{2} + \frac {12}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*I*sqrt(pi)*erf(I*x + I)*e^2 - 2*(sqrt(pi)*(x + 1)*(erf(sqrt(-(x + 1)^2)) - 1)/sqrt(-(x + 1)^2) - e^((x + 1)
^2))*e^2 + 12/x

________________________________________________________________________________________

mupad [B]  time = 0.09, size = 18, normalized size = 0.67 \begin {gather*} \frac {12}{x}+2\,{\mathrm {e}}^{2\,x}\,{\mathrm {e}}^{x^2}\,{\mathrm {e}}^3 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 14, normalized size = 0.52 \begin {gather*} 2 e^{x^{2} + 2 x + 3} + \frac {12}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*exp(x**2 + 2*x + 3) + 12/x

________________________________________________________________________________________