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

Optimal. Leaf size=32 \[ e^{e^{x^2}}-x+\frac {-e^x+x}{x}+2 x^2 (5+2 x) \]

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 29, normalized size of antiderivative = 0.91, number of steps used = 8, number of rules used = 5, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {14, 6715, 2282, 2194, 2197} \begin {gather*} 4 x^3+10 x^2+e^{e^{x^2}}-x-\frac {e^x}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^E^x^2 - E^x/x - x + 10*x^2 + 4*x^3

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 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 2197

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> With[{b = Coefficient[v, x, 1], d = Coefficient[u, x, 0],
e = Coefficient[u, x, 1], f = Coefficient[w, x, 0], g = Coefficient[w, x, 1]}, Simp[(g*u^(m + 1)*F^(c*v))/(b*c
*e*Log[F]), x] /; EqQ[e*g*(m + 1) - b*c*(e*f - d*g)*Log[F], 0]] /; FreeQ[{F, c, m}, x] && LinearQ[{u, v, w}, x
]

Rule 2282

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rule 6715

Int[(u_)*(x_)^(m_.), x_Symbol] :> Dist[1/(m + 1), Subst[Int[SubstFor[x^(m + 1), u, x], x], x, x^(m + 1)], x] /
; FreeQ[m, x] && NeQ[m, -1] && FunctionOfQ[x^(m + 1), u, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 29, normalized size = 0.91 \begin {gather*} e^{e^{x^2}}-\frac {e^x}{x}-x+10 x^2+4 x^3 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^E^x^2 - E^x/x - x + 10*x^2 + 4*x^3

________________________________________________________________________________________

fricas [A]  time = 0.60, size = 47, normalized size = 1.47 \begin {gather*} \frac {{\left (x e^{\left (x^{2} + e^{\left (x^{2}\right )}\right )} + {\left (4 \, x^{4} + 10 \, x^{3} - x^{2} - e^{x}\right )} e^{\left (x^{2}\right )}\right )} e^{\left (-x^{2}\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.15, size = 57, normalized size = 1.78 \begin {gather*} \frac {{\left (4 \, x^{4} e^{\left (x^{2}\right )} + 10 \, x^{3} e^{\left (x^{2}\right )} - x^{2} e^{\left (x^{2}\right )} + x e^{\left (x^{2} + e^{\left (x^{2}\right )}\right )} - e^{\left (x^{2} + x\right )}\right )} e^{\left (-x^{2}\right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 27, normalized size = 0.84




method result size



default \(-x -\frac {{\mathrm e}^{x}}{x}+10 x^{2}+4 x^{3}+{\mathrm e}^{{\mathrm e}^{x^{2}}}\) \(27\)
risch \(-x -\frac {{\mathrm e}^{x}}{x}+10 x^{2}+4 x^{3}+{\mathrm e}^{{\mathrm e}^{x^{2}}}\) \(27\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [C]  time = 0.37, size = 28, normalized size = 0.88 \begin {gather*} 4 \, x^{3} + 10 \, x^{2} - x - {\rm Ei}\relax (x) + e^{\left (e^{\left (x^{2}\right )}\right )} + \Gamma \left (-1, -x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4*x^3 + 10*x^2 - x - Ei(x) + e^(e^(x^2)) + gamma(-1, -x)

________________________________________________________________________________________

mupad [B]  time = 0.36, size = 26, normalized size = 0.81 \begin {gather*} {\mathrm {e}}^{{\mathrm {e}}^{x^2}}-x-\frac {{\mathrm {e}}^x}{x}+10\,x^2+4\,x^3 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.24, size = 22, normalized size = 0.69 \begin {gather*} 4 x^{3} + 10 x^{2} - x + e^{e^{x^{2}}} - \frac {e^{x}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________