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

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

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 36, normalized size of antiderivative = 1.24, number of steps used = 7, number of rules used = 4, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {14, 2288, 2176, 2194} \begin {gather*} -\frac {2 e^{4-x^2}}{x}+e^{x+3} (x+1)-e^{x+3}+\frac {13}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-E^(3 + x) + 13/x - (2*E^(4 - x^2))/x + E^(3 + x)*(1 + 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 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 2288

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = (v*y)/(Log[F]*D[u, x])}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.28, size = 26, normalized size = 0.90 \begin {gather*} \frac {13-2 e^{4-x^2}+e^{3+x} x^2}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.51, size = 24, normalized size = 0.83 \begin {gather*} \frac {x^{2} e^{\left (x + 3\right )} - 2 \, e^{\left (-x^{2} + 4\right )} + 13}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.12, size = 24, normalized size = 0.83 \begin {gather*} \frac {x^{2} e^{\left (x + 3\right )} - 2 \, e^{\left (-x^{2} + 4\right )} + 13}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 25, normalized size = 0.86




method result size



norman \(\frac {13+x^{2} {\mathrm e}^{3+x}-2 \,{\mathrm e}^{-x^{2}+4}}{x}\) \(25\)
risch \(\frac {13}{x}+{\mathrm e}^{3+x} x -\frac {2 \,{\mathrm e}^{-\left (x -2\right ) \left (2+x \right )}}{x}\) \(27\)
default \({\mathrm e}^{x} {\mathrm e}^{3}+{\mathrm e}^{3} \left ({\mathrm e}^{x} x -{\mathrm e}^{x}\right )+\frac {13}{x}+2 \,{\mathrm e}^{4} \sqrt {\pi }\, \erf \relax (x )+2 \,{\mathrm e}^{4} \left (-\frac {{\mathrm e}^{-x^{2}}}{x}-\sqrt {\pi }\, \erf \relax (x )\right )\) \(56\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [C]  time = 0.39, size = 48, normalized size = 1.66 \begin {gather*} 2 \, \sqrt {\pi } \operatorname {erf}\relax (x) e^{4} + {\left (x e^{3} - e^{3}\right )} e^{x} - \frac {\sqrt {x^{2}} e^{4} \Gamma \left (-\frac {1}{2}, x^{2}\right )}{x} + \frac {13}{x} + e^{\left (x + 3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*sqrt(pi)*erf(x)*e^4 + (x*e^3 - e^3)*e^x - sqrt(x^2)*e^4*gamma(-1/2, x^2)/x + 13/x + e^(x + 3)

________________________________________________________________________________________

mupad [B]  time = 0.13, size = 24, normalized size = 0.83 \begin {gather*} x\,{\mathrm {e}}^{x+3}-\frac {2\,{\mathrm {e}}^{4-x^2}-13}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.36, size = 19, normalized size = 0.66 \begin {gather*} x e^{x + 3} - \frac {2 e^{4 - x^{2}}}{x} + \frac {13}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________