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

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

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 27, normalized size of antiderivative = 0.84, number of steps used = 5, number of rules used = 2, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {14, 2194} \begin {gather*} -x^2+x+e^x-\frac {5-e^{\frac {5}{\log (3)}}}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^x - (5 - E^(5/Log[3]))/x + x - 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]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 27, normalized size = 0.84 \begin {gather*} e^x-\frac {5}{x}+\frac {e^{\frac {5}{\log (3)}}}{x}+x-x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.04, size = 26, normalized size = 0.81




method result size



default \(-x^{2}+x +\frac {{\mathrm e}^{\frac {5}{\ln \relax (3)}}}{x}-\frac {5}{x}+{\mathrm e}^{x}\) \(26\)
norman \(\frac {x^{2}+{\mathrm e}^{x} x -x^{3}+{\mathrm e}^{\frac {5}{\ln \relax (3)}}-5}{x}\) \(26\)
risch \(-x^{2}+x +\frac {{\mathrm e}^{\frac {5}{\ln \relax (3)}}}{x}-\frac {5}{x}+{\mathrm e}^{x}\) \(26\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.45, size = 25, normalized size = 0.78 \begin {gather*} -x^{2} + x + \frac {e^{\frac {5}{\log \relax (3)}}}{x} - \frac {5}{x} + e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.06, size = 22, normalized size = 0.69 \begin {gather*} x+{\mathrm {e}}^x+\frac {{\mathrm {e}}^{\frac {5}{\ln \relax (3)}}-5}{x}-x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + exp(x) + (exp(5/log(3)) - 5)/x - x^2

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________