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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0494096, antiderivative size = 27, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 1, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.05, Rules used = {698} \[ \frac{1}{(\log (x)-1)^2}+\frac{1}{1-\log (x)}-\frac{2}{3 (1-\log (x))^3} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 698

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d +
 e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*
e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && IntegerQ[p] && (GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rubi steps

\begin{align*} \int \frac{1-4 \log (x)+\log ^2(x)}{x (-1+\log (x))^4} \, dx &=\operatorname{Subst}\left (\int \frac{1-4 x+x^2}{(-1+x)^4} \, dx,x,\log (x)\right )\\ &=\operatorname{Subst}\left (\int \left (-\frac{2}{(-1+x)^4}-\frac{2}{(-1+x)^3}+\frac{1}{(-1+x)^2}\right ) \, dx,x,\log (x)\right )\\ &=-\frac{2}{3 (1-\log (x))^3}+\frac{1}{1-\log (x)}+\frac{1}{(-1+\log (x))^2}\\ \end{align*}

Mathematica [A]  time = 0.0414772, size = 22, normalized size = 0.81 \[ \frac{-3 \log ^2(x)+9 \log (x)-4}{3 (\log (x)-1)^3} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.009, size = 24, normalized size = 0.9 \begin{align*} - \left ( -1+\ln \left ( x \right ) \right ) ^{-1}+{\frac{2}{3\, \left ( -1+\ln \left ( x \right ) \right ) ^{3}}}+ \left ( -1+\ln \left ( x \right ) \right ) ^{-2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1-4*ln(x)+ln(x)^2)/x/(-1+ln(x))^4,x)

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.04224, size = 43, normalized size = 1.59 \begin{align*} -\frac{3 \, \log \left (x\right )^{2} - 9 \, \log \left (x\right ) + 4}{3 \,{\left (\log \left (x\right )^{3} - 3 \, \log \left (x\right )^{2} + 3 \, \log \left (x\right ) - 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 2.01171, size = 99, normalized size = 3.67 \begin{align*} -\frac{3 \, \log \left (x\right )^{2} - 9 \, \log \left (x\right ) + 4}{3 \,{\left (\log \left (x\right )^{3} - 3 \, \log \left (x\right )^{2} + 3 \, \log \left (x\right ) - 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.120792, size = 32, normalized size = 1.19 \begin{align*} \frac{- 3 \log{\left (x \right )}^{2} + 9 \log{\left (x \right )} - 4}{3 \log{\left (x \right )}^{3} - 9 \log{\left (x \right )}^{2} + 9 \log{\left (x \right )} - 3} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(-3*log(x)**2 + 9*log(x) - 4)/(3*log(x)**3 - 9*log(x)**2 + 9*log(x) - 3)

________________________________________________________________________________________

Giac [A]  time = 1.35821, size = 27, normalized size = 1. \begin{align*} -\frac{3 \, \log \left (x\right )^{2} - 9 \, \log \left (x\right ) + 4}{3 \,{\left (\log \left (x\right ) - 1\right )}^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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