3.24.63 \(\int \frac {-8+4 x-x^2+4 \log (x)}{4 x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 18, normalized size of antiderivative = 0.69, number of steps used = 6, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {12, 14, 2304} \begin {gather*} -\frac {x}{4}+\frac {1}{x}+\log (x)-\frac {\log (x)}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x^(-1) - x/4 + Log[x] - Log[x]/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]]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 18, normalized size = 0.69 \begin {gather*} \frac {1}{x}-\frac {x}{4}+\log (x)-\frac {\log (x)}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x^(-1) - x/4 + Log[x] - Log[x]/x

________________________________________________________________________________________

fricas [A]  time = 0.52, size = 17, normalized size = 0.65 \begin {gather*} -\frac {x^{2} - 4 \, {\left (x - 1\right )} \log \relax (x) - 4}{4 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.24, size = 16, normalized size = 0.62 \begin {gather*} -\frac {1}{4} \, x - \frac {\log \relax (x)}{x} + \frac {1}{x} + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/4*x - log(x)/x + 1/x + log(x)

________________________________________________________________________________________

maple [A]  time = 0.05, size = 17, normalized size = 0.65




method result size



default \(-\frac {\ln \relax (x )}{x}+\frac {1}{x}-\frac {x}{4}+\ln \relax (x )\) \(17\)
norman \(\frac {1+x \ln \relax (x )-\frac {x^{2}}{4}-\ln \relax (x )}{x}\) \(20\)
risch \(-\frac {\ln \relax (x )}{x}+\frac {4 x \ln \relax (x )-x^{2}+4}{4 x}\) \(26\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-ln(x)/x+1/x-1/4*x+ln(x)

________________________________________________________________________________________

maxima [A]  time = 0.57, size = 16, normalized size = 0.62 \begin {gather*} -\frac {1}{4} \, x - \frac {\log \relax (x)}{x} + \frac {1}{x} + \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/4*x - log(x)/x + 1/x + log(x)

________________________________________________________________________________________

mupad [B]  time = 1.37, size = 15, normalized size = 0.58 \begin {gather*} \ln \relax (x)-\frac {x}{4}-\frac {\ln \relax (x)-1}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x) - x/4 - (log(x) - 1)/x

________________________________________________________________________________________

sympy [A]  time = 0.12, size = 14, normalized size = 0.54 \begin {gather*} - \frac {x}{4} + \log {\relax (x )} - \frac {\log {\relax (x )}}{x} + \frac {1}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x/4 + log(x) - log(x)/x + 1/x

________________________________________________________________________________________