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

Optimal. Leaf size=34 \[ e^x-e^{x \left (x+\frac {(-x+\log (3))^2}{x^2}\right )}-x+(1-2 x) x \]

________________________________________________________________________________________

Rubi [A]  time = 0.27, antiderivative size = 28, normalized size of antiderivative = 0.82, number of steps used = 4, number of rules used = 3, integrand size = 55, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.055, Rules used = {14, 2194, 6706} \begin {gather*} -2 x^2-\frac {1}{9} e^{x^2+x+\frac {\log ^2(3)}{x}}+e^x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 6706

Int[(F_)^(v_)*(u_), x_Symbol] :> With[{q = DerivativeDivides[v, u, x]}, Simp[(q*F^v)/Log[F], x] /;  !FalseQ[q]
] /; FreeQ[F, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.13, size = 28, normalized size = 0.82 \begin {gather*} e^x-\frac {1}{9} e^{x+x^2+\frac {\log ^2(3)}{x}}-2 x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.67, size = 31, normalized size = 0.91 \begin {gather*} -2 \, x^{2} + e^{x} - e^{\left (\frac {x^{3} + x^{2} - 2 \, x \log \relax (3) + \log \relax (3)^{2}}{x}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((log(3)^2-2*x^3-x^2)*exp((log(3)^2-2*x*log(3)+x^3+x^2)/x)+exp(x)*x^2-4*x^3)/x^2,x, algorithm="frica
s")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.41, size = 26, normalized size = 0.76 \begin {gather*} -2 \, x^{2} + e^{x} - \frac {1}{9} \, e^{\left (\frac {x^{3} + x^{2} + \log \relax (3)^{2}}{x}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.07, size = 27, normalized size = 0.79




method result size



risch \(-2 x^{2}+{\mathrm e}^{x}-\frac {{\mathrm e}^{\frac {x^{3}+\ln \relax (3)^{2}+x^{2}}{x}}}{9}\) \(27\)
norman \(\frac {{\mathrm e}^{x} x -2 x^{3}-x \,{\mathrm e}^{\frac {\ln \relax (3)^{2}-2 x \ln \relax (3)+x^{3}+x^{2}}{x}}}{x}\) \(39\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.87, size = 24, normalized size = 0.71 \begin {gather*} -2 \, x^{2} - \frac {1}{9} \, e^{\left (x^{2} + x + \frac {\log \relax (3)^{2}}{x}\right )} + e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((log(3)^2-2*x^3-x^2)*exp((log(3)^2-2*x*log(3)+x^3+x^2)/x)+exp(x)*x^2-4*x^3)/x^2,x, algorithm="maxim
a")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.38, size = 25, normalized size = 0.74 \begin {gather*} {\mathrm {e}}^x-2\,x^2-\frac {{\mathrm {e}}^{x^2}\,{\mathrm {e}}^{\frac {{\ln \relax (3)}^2}{x}}\,{\mathrm {e}}^x}{9} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

exp(x) - 2*x^2 - (exp(x^2)*exp(log(3)^2/x)*exp(x))/9

________________________________________________________________________________________

sympy [A]  time = 0.21, size = 29, normalized size = 0.85 \begin {gather*} - 2 x^{2} + e^{x} - e^{\frac {x^{3} + x^{2} - 2 x \log {\relax (3 )} + \log {\relax (3 )}^{2}}{x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________