3.72.84 \(\int \frac {-89+4 x+4 x^2-6 \log (x)-\log ^2(x)}{x^2} \, dx\)

Optimal. Leaf size=15 \[ \frac {81+(4+2 x+\log (x))^2}{x} \]

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 28, normalized size of antiderivative = 1.87, number of steps used = 7, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {14, 2304, 2305} \begin {gather*} 4 x+\frac {97}{x}+\frac {\log ^2(x)}{x}+\frac {8 \log (x)}{x}+4 \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

97/x + 4*x + 4*Log[x] + (8*Log[x])/x + Log[x]^2/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
]

Rule 2305

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 28, normalized size = 1.87 \begin {gather*} \frac {97}{x}+4 x+4 \log (x)+\frac {8 \log (x)}{x}+\frac {\log ^2(x)}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

97/x + 4*x + 4*Log[x] + (8*Log[x])/x + Log[x]^2/x

________________________________________________________________________________________

fricas [A]  time = 0.49, size = 22, normalized size = 1.47 \begin {gather*} \frac {4 \, x^{2} + 4 \, {\left (x + 2\right )} \log \relax (x) + \log \relax (x)^{2} + 97}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(4*x^2 + 4*(x + 2)*log(x) + log(x)^2 + 97)/x

________________________________________________________________________________________

giac [A]  time = 0.17, size = 28, normalized size = 1.87 \begin {gather*} 4 \, x + \frac {\log \relax (x)^{2}}{x} + \frac {8 \, \log \relax (x)}{x} + \frac {97}{x} + 4 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4*x + log(x)^2/x + 8*log(x)/x + 97/x + 4*log(x)

________________________________________________________________________________________

maple [A]  time = 0.02, size = 25, normalized size = 1.67




method result size



norman \(\frac {97+\ln \relax (x )^{2}+4 x \ln \relax (x )+4 x^{2}+8 \ln \relax (x )}{x}\) \(25\)
default \(\frac {\ln \relax (x )^{2}}{x}+\frac {8 \ln \relax (x )}{x}+\frac {97}{x}+4 x +4 \ln \relax (x )\) \(29\)
risch \(\frac {\ln \relax (x )^{2}}{x}+\frac {8 \ln \relax (x )}{x}+\frac {4 x \ln \relax (x )+4 x^{2}+97}{x}\) \(33\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(97+ln(x)^2+4*x*ln(x)+4*x^2+8*ln(x))/x

________________________________________________________________________________________

maxima [B]  time = 0.36, size = 34, normalized size = 2.27 \begin {gather*} 4 \, x + \frac {\log \relax (x)^{2} + 2 \, \log \relax (x) + 2}{x} + \frac {6 \, \log \relax (x)}{x} + \frac {95}{x} + 4 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4*x + (log(x)^2 + 2*log(x) + 2)/x + 6*log(x)/x + 95/x + 4*log(x)

________________________________________________________________________________________

mupad [B]  time = 4.28, size = 22, normalized size = 1.47 \begin {gather*} 4\,x+4\,\ln \relax (x)+\frac {{\ln \relax (x)}^2+8\,\ln \relax (x)+97}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4*x + 4*log(x) + (8*log(x) + log(x)^2 + 97)/x

________________________________________________________________________________________

sympy [A]  time = 0.14, size = 24, normalized size = 1.60 \begin {gather*} 4 x + 4 \log {\relax (x )} + \frac {\log {\relax (x )}^{2}}{x} + \frac {8 \log {\relax (x )}}{x} + \frac {97}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4*x + 4*log(x) + log(x)**2/x + 8*log(x)/x + 97/x

________________________________________________________________________________________