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

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

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 15, normalized size of antiderivative = 0.60, number of steps used = 2, number of rules used = 1, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {14} \begin {gather*} x+\frac {2+e^5}{x}-3 \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rubi steps

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.23, size = 15, normalized size = 0.60 \begin {gather*} x + \frac {e^{5} + 2}{x} - 3 \, \log \left ({\left | x \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 17, normalized size = 0.68




method result size



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



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________