3.92.18 \(\int \frac {-4+2 x-5 x^2}{2 x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 13, normalized size of antiderivative = 0.52, number of steps used = 3, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {12, 14} \begin {gather*} -\frac {5 x}{2}+\frac {2}{x}+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, 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} &=\frac {1}{2} \int \frac {-4+2 x-5 x^2}{x^2} \, dx\\ &=\frac {1}{2} \int \left (-5-\frac {4}{x^2}+\frac {2}{x}\right ) \, dx\\ &=\frac {2}{x}-\frac {5 x}{2}+\log (x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 13, normalized size = 0.52 \begin {gather*} \frac {2}{x}-\frac {5 x}{2}+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.66, size = 17, normalized size = 0.68 \begin {gather*} -\frac {5 \, x^{2} - 2 \, x \log \relax (x) - 4}{2 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*(5*x^2 - 2*x*log(x) - 4)/x

________________________________________________________________________________________

giac [A]  time = 0.12, size = 12, normalized size = 0.48 \begin {gather*} -\frac {5}{2} \, x + \frac {2}{x} + \log \left ({\left | x \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-5/2*x + 2/x + log(abs(x))

________________________________________________________________________________________

maple [A]  time = 0.03, size = 12, normalized size = 0.48




method result size



default \(-\frac {5 x}{2}+\ln \relax (x )+\frac {2}{x}\) \(12\)
risch \(-\frac {5 x}{2}+\ln \relax (x )+\frac {2}{x}\) \(12\)
norman \(\frac {2-\frac {5 x^{2}}{2}}{x}+\ln \relax (x )\) \(15\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/2*(-5*x^2+2*x-4)/x^2,x,method=_RETURNVERBOSE)

[Out]

-5/2*x+ln(x)+2/x

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 11, normalized size = 0.44 \begin {gather*} -\frac {5}{2} \, x + \frac {2}{x} + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.03, size = 11, normalized size = 0.44 \begin {gather*} \ln \relax (x)-\frac {5\,x}{2}+\frac {2}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.07, size = 10, normalized size = 0.40 \begin {gather*} - \frac {5 x}{2} + \log {\relax (x )} + \frac {2}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*(-5*x**2+2*x-4)/x**2,x)

[Out]

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

________________________________________________________________________________________